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

[Bug]: Inpaint at full resolution with wildcards cause unmasked part being changed

Open Kurogawa opened this issue 3 years ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

when inpaint at full resolution is checked, the area that is not masked will be changed in the generated picture.

Steps to reproduce the problem

  1. check inpaint at full resolution
  2. draw mask on picture
  3. generate
  4. area without mask is changed

What should have happened?

should work like before, inpaint at full resolution only change the masked area

Commit where the problem happens

6bd6154a92eb05c80d66df661a38f8b70cc13729

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--autolaunch --xformers --ckpt D:\stable-diffusion-webui\models\Stable-diffusion\model.ckpt --gradio-img2img-tool color-sketch --opt-split-attention --deepdanbooru

Additional information, context and logs

original image 00000-112007614-28-12-Euler a-(masterpiece_1 3), (extremely detailed_1 3), (best quality_1 3), (highres_1 3), full body, gray hair,  gray eyes, beautiful face mask area Snipaste_2022-10-24_00-05-43 without full reso 00002-2456006221-28-11-Euler a-sad with full reso 00001-2997151557-28-11-Euler a-sad

Kurogawa avatar Oct 24 '22 06:10 Kurogawa

In hint.js, the hint for "Inpaint at full resolution" says it "[Upscales] masked region to target resolution, [does] inpainting, [downscales] back and [pastes] into original image." Notice how the changed area roughly matches the shape of your original mask, scaled up:

vaguely-face-shaped-region-is-changed I suspect it's only upscaling the mask, and not the image underneath. And I'm assuming it's SUPPOSED to upscale both the image and the mask, run inpainting, then downscale the output back over the original image. I will take a look at trying to implement this.

In the mean time, if anyone reads this and finds my interpretation incorrect, please let me know.

timntorres avatar Oct 26 '22 00:10 timntorres

I'm not able to replicate this. Are you sure there isn't anything else going on? Some other special settings or something you're using besides the default?

it's working for me

timntorres avatar Oct 26 '22 02:10 timntorres

@timntorres just find out that you need both wildcards script and inpaint at full resolution to replicate. None + inpaint OK none + full reso inpaint OK wildcards + inpaint OK wildcards + full reso inpaint, things get crazy.

Kurogawa avatar Oct 26 '22 05:10 Kurogawa

Closing as stale.

catboxanon avatar Aug 03 '23 16:08 catboxanon