Skip to content

sabi3293043/stable-diffusion-webui-cv2-external-masking-script

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Provides an external cv2 powered masking tool for https://github.com/AUTOMATIC1111/stable-diffusion-webui

requires cv2 to be installed

py -m pip install opencv-python

The UI inside stable-diffusion-webui is pretty simple Screenshot 2022-09-16 091930

Masking preview size controls the size of the popup CV2 window

Draw new mask on every run will popup a new window for a new mask each time generate is clicked, usually it'll only appear on the first run, or when the input image is changed.

The masking window itself is pretty minimal Screenshot 2022-09-16 091427

Showing the polygon currently being drawn in pink, left clicking starts a new polygon, right clicking closes the current polycon being drawn.

C to the clear current mask.

Q to quit and pass the current mask back to stable-diffusion-webui

The mask drawn with the script will not be shown on the input image, but will be used for all outputs:

Screenshot 2022-09-16 091911

About

Local image masking tool for stable-diffusion-webui

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%