Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Create masks out of depthmaps in img2img
| Date | Stars |
|---|---|
| 2026-07-24 | 359 |
| 2026-07-25 | 359 |
| 2026-07-28 | 359 |
| 2026-07-30 | 359 |
| 2026-08-06 | 359 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# depthmap2mask
Made as a script for the [AUTOMATIC1111/stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui) repository.
## 💥 Installation 💥
Copy the url of that repository into the extension tab :

OR copy that repository in your extension folder :

You might need to restart the whole UI. Maybe twice.
if you are on colab you can also add this line in a code block before starting the UI/after the installation cells :
!git clone https://github.com/Extraltodeus/depthmap2mask.git /content/stable-diffusion-webui/extensions/depthmap2mask
## The look

## What does this extension do?
It creates masks for img2img based on a depth estimation made by [MiDaS](https://github.com/isl-org/MiDaS).

## Where to find it after installing it?
Go to your img2img tab then select it from the custom scripts list at the bottom.
## Explanations of the different UI elements
- Contrasts cut level

This slider is **purely optional**.
The depthmap is in levels of gray. Each pixel has a value in between 0 and 255 depending if they are black (0) or white (255). That threshold slider will cut to black every pixel below the selected value and scale from black to white what is above its value.
Or in a more human language, it will give more depth to your depthmaps while removing a lot of information.
Example before/after with the slider's value around 220 and using the MiDaS-Large model:

Using the MiDaS small model will give you similar if not more interesting results.

So that's more of an extra-extra option or a way to make sure that your backgrounds are untouched by using a low value (like 50).
- Match input size/Net width/Net height

Match input size (On by default) will make the depth analysis at the same size as the original image. Better not to touch it unless you are having performance issues.
The sliders below will be the resolution of the analysis if Match input size is turned off.
You can also just use these functionalities to test out different results.
- Misc options

- Override options :
These two options simply overrides the inpainting Masked content method and mask blur. I added these because using "original" for Masked content and Mask Blur at 0 just works better. This saves you the clics needed to switch to the intpaint tab/reupload the image to that tab and select the right options.
- MiDaS models :
I'll let you try what suits your needs the most.
- Turn the depthmap into absolute black/white
![image](https://user-images.githubusercontent.com/15731540Excerpt of 6,349 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:3d1c2d05e1143c38, topic:stable-diffusion, readme:stable diffusion, readme:inpainting