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

Local image masking tool for stable-diffusion-webui

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mask is not working anymore

Rogal80 opened this issue · comments

I have this issue each time - and your mask is really super extension :)

Error completing request
Arguments: (0, 'a group of people standing next to each other in front of a group of people with lights in their hands, by Antoine Le Nain', '', 'None', 'None', <PIL.Image.Image image mode=RGB size=3362x1500 at 0x1983A85D3C0>, None, None, None, 0, 50, 9, 4, 0, False, False, 1, 1, 12, 0.75, -1.0, -1.0, 0, 0, 0, False, 704, 1408, 2, False, 32, 0, '', '', 3, 0, 0, 0.25, 0.9, 5, '0.0001', False, 'None', '', 0.1, False, True, '', '', 2, 'Not set', 'Not set', 'Not set', 'Not set', 'No focus', 1.3, 'Not set', 1.3, 'Not set', 4.0, 1, 1, 0, 0, 0.0, 4.0, 0.1, 0.1, 1, True, False, False, 0, False, '', 1, False, 0, 1, False, False, 1390, True, False, '

    \n
  • CFG Scale should be 2 or lower.
  • \n
\n', True, True, '', '', True, 50, True, 1, 0, False, 4, 1, 4, 0.09, True, 1, 0, 7, False, False, 'Show/Hide AlphaCanvas', 0, '

Recommended settings: Sampling Steps: 80-100, Sampler: Euler a, Denoising strength: 0.8

', 128, 8, ['left', 'right', 'up', 'down'], 1, 0.05, 128, 4, 0, ['left', 'right', 'up', 'down'], False, False, False, '', '

Will upscale the image to twice the dimensions; use width and height sliders to set tile size

', 64, 0, 10.0, True, 30.0, True, '', False, [], [], [], [], [], 'Positive', 0, ', ', 32, 1, '', 0, '', True, True, False, '

Deforum v0.5-webui-beta

', '

This script is deprecated. Please use the full Deforum extension instead.
\nUpdate instructions:

', '

github.com/deforum-art/deforum-for-automatic1111-webui/blob/automatic1111-webui/README.md

', '

discord.gg/deforum

', '
\n

Combinations

\n\n Choose a number of terms from a list, in this case we choose two artists: \n {2$artist1|artist2|artist3}\n\n If $ is not provided, then 1$ is assumed.\n\n Terms are selected with replacement, so the same term can be selected more than once. \n {2$artist} is now equivalent to {2$artist|artist}\n\n A range can be provided:\n {1-3$artist1|artist2|artist3}\n\n In this case, a random number of artists between 1 and 3 is chosen.\n\n

\n\n

Wildcards

\n \n\n
\n If the groups wont drop down click here to fix the issue.\n\n

\n\n WILDCARD_DIR: I:\Github\stable-diffusion-webui\extensions\sd-dynamic-prompts\wildcards
\n You can add more wildcards by creating a text file with one term per line and name is mywildcards.txt. Place it in I:\Github\stable-diffusion-webui\extensions\sd-dynamic-prompts\wildcards. <folder>/mywildcards will then become available.\n
\n\n', False, 1, False, False, 1.0, 2.0, 'a painting in', 'style', 'picture frame, portrait photo', None) {}
Traceback (most recent call last):
File "I:\Github\stable-diffusion-webui\modules\ui.py", line 185, in f
res = list(func(*args, **kwargs))
File "I:\Github\stable-diffusion-webui\webui.py", line 54, in f
res = func(*args, **kwargs)
File "I:\Github\stable-diffusion-webui\modules\img2img.py", line 137, in img2img
processed = modules.scripts.scripts_img2img.run(p, *args)
File "I:\Github\stable-diffusion-webui\modules\scripts.py", line 296, in run
processed = script.run(p, *script_args)
File "I:\Github\stable-diffusion-webui\scripts\external_masking.py", line 227, in run
p.image_mask,self.lastPolys = display_mask_ui(p.init_images[0],p.image_mask,max_size,self.lastPolys)
File "I:\Github\stable-diffusion-webui\scripts\external_masking.py", line 69, in display_mask_ui
cv2.namedWindow('MaskingWindow', cv2.WINDOW_AUTOSIZE)
cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1250: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvNamedWindow'

commented

Looks like you have the headless opencv that can't open windows installed.
try a py -m pip install --upgrade opencv-python or venv\Scripts\python.exe -m pip install --upgrade opencv-python to update your venv version.

image
still same issue :(

Error completing request
Arguments: (0, '', '', 'None', 'None', <PIL.Image.Image image mode=RGB size=1536x768 at 0x2E3E894B100>, None, None, None, 0, 50, 7, 4, 0, False, False, 1, 1, 8, 0.6, -1.0, -1.0, 0, 0, 0, False, 704, 1408, 0, False, 32, 0, '', '', 3, 0, 0, 0.25, 0.9, 5, '0.0001', False, 'None', '', 0.1, False, True, '', '', 2, 'Not set', 'Not set', 'Not set', 'Not set', 'No focus', 1.3, 'Not set', 1.3, 'Not set', 4.0, 1, 1, 0, 0, 0.0, 4.0, 0.1, 0.1, 1, True, False, False, 0, False, '', 1, False, 0, 1, False, False, 1390, True, False, '

    \n
  • CFG Scale should be 2 or lower.
  • \n
\n', True, True, '', '', True, 50, True, 1, 0, False, 4, 1, 4, 0.09, True, 1, 0, 7, False, False, 'Show/Hide AlphaCanvas', 0, '

Recommended settings: Sampling Steps: 80-100, Sampler: Euler a, Denoising strength: 0.8

', 128, 8, ['left', 'right', 'up', 'down'], 1, 0.05, 128, 4, 0, ['left', 'right', 'up', 'down'], False, False, False, '', '

Will upscale the image to twice the dimensions; use width and height sliders to set tile size

', 64, 0, 10.0, True, 30.0, True, '', False, [], [], [], [], [], 'Positive', 0, ', ', 32, 1, '', 0, '', True, True, False, '

Deforum v0.5-webui-beta

', '

This script is deprecated. Please use the full Deforum extension instead.
\nUpdate instructions:

', '

github.com/deforum-art/deforum-for-automatic1111-webui/blob/automatic1111-webui/README.md

', '

discord.gg/deforum

', '
\n

Combinations

\n\n Choose a number of terms from a list, in this case we choose two artists: \n {2$$artist1|artist2|artist3}
\n\n If $$ is not provided, then 1$$ is assumed.

\n\n If the chosen number of terms is greater than the available terms, then some terms will be duplicated, otherwise chosen terms will be unique. This is useful in the case of wildcards, e.g.\n {2$$artist} is equivalent to {2$$artist|artist}

\n\n A range can be provided:\n {1-3$$artist1|artist2|artist3}
\n In this case, a random number of artists between 1 and 3 is chosen.

\n\n Wildcards can be used and the joiner can also be specified:\n {{1-$$and$$adjective}}
\n\n Here, a random number between 1 and 3 words from adjective.txt will be chosen and joined together with the word 'and' instead of the default comma.\n\n

\n\n

Wildcards

\n \n\n
\n If the groups wont drop down click here to fix the issue.\n\n

\n\n WILDCARD_DIR: I:\Github\stable-diffusion-webui\extensions\sd-dynamic-prompts\wildcards
\n You can add more wildcards by creating a text file with one term per line and name is mywildcards.txt. Place it in I:\Github\stable-diffusion-webui\extensions\sd-dynamic-prompts\wildcards. <folder>/mywildcards will then become available.\n
\n\n', False, 1, False, False, 1.0, 2.0, 'a painting in', 'style', 'picture frame, portrait photo', None) {}
Traceback (most recent call last):
File "I:\Github\stable-diffusion-webui\modules\ui.py", line 185, in f
res = list(func(*args, **kwargs))
File "I:\Github\stable-diffusion-webui\webui.py", line 54, in f
res = func(*args, **kwargs)
File "I:\Github\stable-diffusion-webui\modules\img2img.py", line 137, in img2img
processed = modules.scripts.scripts_img2img.run(p, *args)
File "I:\Github\stable-diffusion-webui\modules\scripts.py", line 296, in run
processed = script.run(p, *script_args)
File "I:\Github\stable-diffusion-webui\scripts\external_masking.py", line 227, in run
p.image_mask,self.lastPolys = display_mask_ui(p.init_images[0],p.image_mask,max_size,self.lastPolys)
File "I:\Github\stable-diffusion-webui\scripts\external_masking.py", line 69, in display_mask_ui
cv2.namedWindow('MaskingWindow', cv2.WINDOW_AUTOSIZE)
cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1250: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvNamedWindow

commented

Still seems to be the headless version, can you try an uninstall and install run?

py -m pip uninstall opencv-python-headless
py -m pip uninstall opencv-python
py -m pip install --upgrade opencv-python
commented

closing as duplicate of #13