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

[Bug]: InPainting runs on default sampler

Open malcolmamal opened this issue 3 years ago • 5 comments

Is there an existing issue for this?

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

What happened?

I've pulled the repo after a week or two and noticed the following problem:

In the InPainting the sampler choice does not work anymore - it will always use the same one (default?).

This can be verified by running Euler A and Heun at 150 steps. The first clue is that if you have a sampler in the name path then the sampler part will show '[sampler]' instead of 'Euler A' or 'Heun'. The second clue is that the time to generate both samples is pretty much the same (normally Heun is twice as slow as Euler A), but the most conclusive clue is that the content of the files is the same.

When I switch back to the commit from some day ago: 30b1bcc64e67ad50c5d3af3a6fe1bd1e9553f34e then this works fine. The Heun works longer and produces different content.

Steps to reproduce the problem

  1. checkout master
  2. user InPainting, select any sampler, click Generate, select another sampler and Generate
  3. the result is the same and the sampler in the path name tells us [sampler] instead of sampler's name
  4. checkouting to branch 30b1bcc64e67ad50c5d3af3a6fe1bd1e9553f34e and rerunning step 2 has the following result:
  5. the filename properly recognized the specific sampler, the generation times differ as well as the content.

What should have happened?

The proper sampler should have been used. Currently it seems that always the same one is used (default?)

Commit where the problem happens

ff35ae9abb0e2d680bd881e219baf6c998019a9a

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

COMMANDLINE_ARGS=--port 27016 --vae-path models/VAE/vae-ft-mse-840000-ema-pruned.ckpt --no-half-vae

Additional information, context and logs

No response

malcolmamal avatar Nov 19 '22 23:11 malcolmamal

Was getting same behaviour for inpaint on build 47a44c7. Reverted to build f1bdf2b, the step just before "change StableDiffusionProcessing to internally use sampler name instead of sampler index". Re-ran gens and, yes, inpaint had been using Euler A instead of my selected Euler. With the reversion to f1bdf2b different samplers generate different images for me again and I'm now getting the sampler name in my output files instead of "[sampler]".

chromesun avatar Nov 20 '22 00:11 chromesun

I quick fixed this issue in img2img.py:

Screenshot 2022-11-20 105208

Hangover3832 avatar Nov 20 '22 09:11 Hangover3832

I quick fixed this issue in img2img.py:

Screenshot 2022-11-20 105208

I'm not seeing this in the repo nor a pull request, will you make one? :-)

malcolmamal avatar Nov 20 '22 17:11 malcolmamal

I'm not seeing this in the repo nor a pull request, will you make one? :-)

Unfortunately I'm not familiar with GIT 😭, so no, i will not

Hangover3832 avatar Nov 20 '22 18:11 Hangover3832

I try this PR #4910 and I think it fix this.

SingL3 avatar Nov 24 '22 11:11 SingL3

closing as it is already fixed, thanks!

malcolmamal avatar Dec 22 '22 10:12 malcolmamal