sddebz / stable-diffusion-krita-plugin

GNU Affero General Public License v3.0
423 stars 34 forks source link

img2im2 results alignment #4

Open 1blackbar opened 2 years ago

1blackbar commented 2 years ago

When i want to change clothes from long sleeve to short sleeve on a painting then i cant get it to work unless i give it denoising_strength: 0.88 or so but then alignment is off by a lot. In webui by hkly it works fine and i dont need such high values and its aligned more precisly with body shape. Am i doing something wrong that i dont getr similar results to webui ?

sddebz commented 2 years ago

Well, parameters like denoising_strength, cfg_scale, ddim_steps and sampler_name should work exactly like in webui. If there is any difference in outputs, it may be because of up/downscaling of selected area. This doesn't work exactly like in webui. Most importantly if you select small area of image, only rectangle around this area is sent to the model. That may cause significant difference since the model doesn't see whole image, but only its small part.

Of course there may be some bug. If you could provide some examples with parameter values and image/selection dimensions, it will be easier for me to find the cause. I've checked outputs myself with fixed seed and without selection and results of img2img with same input from plugin and from webui seems to be the same.

1blackbar commented 2 years ago

i noticed that when i use rectangle to select my region then i get better alignment but then most of the time it switches to that slow speed mode, with lasso i almost all the time have fast speed mode, do you know why is that ? Sometimes i try to touch the rectangle selection once and it activates fast mode, but not every time, i cant fitgure out whats causing it to go much slower even tho its the same selected area. can you synthesize rectangle once and immediately do ctrl+alt + W to do it again and again ? cause i only get fast speed first time and if i synthesize again it falls back to slow mode

i just measured, when i lasso a region and do ctrl+alt +W then i get synthesized in 6 seconds, then when i press the shortcut again - im getting 26 seconds (!!!!) to synthesize identical region, there must be something off here. And its not only lasso, its like this with all selection tools.

sddebz commented 2 years ago

I'm still not sure what's going on here. Sometimes I get solowdowns too. Mainly if I go close to my VRAM limit. But right now I'm not sure how to fix it.

1blackbar commented 2 years ago

You thoufght about flushin previous image from ram?Friom my experience lasso works best cause it goes slow ony sometimes but rectange marquee slows down most of the time so... maybe the differences between how they sent data to SD will get you on the track on how to solve this, one is clearly working more often than other