fast-stable-diffusion icon indicating copy to clipboard operation
fast-stable-diffusion copied to clipboard

Inpainting returns the same image when using "Inpaint masked"

Open KShivendu opened this issue 2 years ago • 8 comments

Hi @TheLastBen,

I have been trying to use the inpainting feature with my custom SD model (trained using this repo) but it doesn't work "Inpaint masked". It literally returns the same image back without showing any errors in Colab or the UI.

However, it works when "Inpaint not masked" is used, it works.

When "Inpaint not masked" is selected

inpaint-not-masked

When "Inpaint masked" is selected

inpainting-masked

Thanks a lot!

KShivendu avatar Nov 08 '22 14:11 KShivendu

Hi, update the repo and use the latest notebook, I tested and it works fine, must be your repo not being up to date

TheLastBen avatar Nov 08 '22 15:11 TheLastBen

everything up to date. still not working. it seems like it doesnt recognize the mask exists.
if you select inpaint not masked it will apply its result to everything. the result is also either a black screen or noise. i cant get anything else out of it

bayoumedic avatar Nov 08 '22 23:11 bayoumedic

@bayoumedic do you see the new samplers in the webui (DPM2++2S ...etc) ?

TheLastBen avatar Nov 09 '22 00:11 TheLastBen

yes, i have 12 on the inpaint screen

bayoumedic avatar Nov 09 '22 00:11 bayoumedic

I'll update gradio shortly, that should fix the issue

TheLastBen avatar Nov 09 '22 18:11 TheLastBen

now i get this

Error completing request Arguments: (1, 'High-res photograph tesla logo on a bird, artstation, sharp focus', '', 'None', 'None', None, {'image': <PIL.Image.Image image mode=RGBA size=512x512 at 0x7FD0F634AB50>, 'mask': <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=512x512 at 0x7FD0F6303710>}, None, None, 0, 53, 11, 4, 2, False, False, 1, 4, 7, 0.75, -1.0, -1.0, 0, 0, 0, False, 512, 512, 0, True, 32, 0, '', '', 0, '

    \n
  • CFG Scale should be 2 or lower.
  • \n
\n', True, True, '', '', True, 50, True, 1, 0, False, 4, 1, '

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, 1, '', 0, '', True, False, False) {} Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui.py", line 185, in f res = list(func(*args, **kwargs)) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 54, in f res = func(*args, **kwargs) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/img2img.py", line 139, in img2img processed = process_images(p) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 423, in process_images res = process_images_inner(p) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 485, in process_images_inner p.init(p.all_prompts, p.all_seeds, p.all_subseeds) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 767, in init mask = mask.crop(crop_region) File "/usr/local/lib/python3.7/dist-packages/PIL/Image.py", line 1171, in crop raise ValueError("Coordinate 'right' is less than 'left'") ValueError: Coordinate 'right' is less than 'left'

bayoumedic avatar Nov 10 '22 17:11 bayoumedic

remove or rename the folder "sd" and do a clean run with the latest colab

TheLastBen avatar Nov 10 '22 18:11 TheLastBen

still the same

bayoumedic avatar Nov 10 '22 18:11 bayoumedic