Is there an existing issue for this?
What happened?
Second to Last Sampling step is better than final result, very visible in DPM2 a and similar sampler Karras,
Changing the amount of steps does not fix it, it is always the second to last sampling the one with good results.
Sad to see underrated [DPM2 a] sampler just because a bug, Here is a comparison from current build 6bd6154

Steps to reproduce the problem
- Select DPM2 a
- Generate
What should have happened?
Perhaps shared.state.sampling_step is not updated and the sample process goes one more step when it shouldn't.
Commit where the problem happens
the good: perhaps there is no good commit yet...
the bad: 7ce7fb0 it ruins last step since Sep 6 2022!
and the ugly: 5766ce2 it defeats "Clip skip: 2" feature since Oct 11 2022
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Mozilla Firefox
Command Line Arguments
--deepdanbooru --xformers --medvram
Additional information, context and logs
This custom script will help you save Sampling steps during testing:
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Custom-Scripts#saving-steps-of-the-sampling-process
however, the iteration of steps is not counting from 1, but 0
The other problem is in sd_samplers.py > def store_latent(decoded)
This function access shared.state.sampling_step before its update.
For this reason [Show image creation progress every N sampling steps. Set 0 to disable.] will display step 1 and step 2 regardless of bigger N interval, say 5 or 6.
Perhaps this is the reason for the OP bug.
Is there an existing issue for this?
What happened?
Second to Last Sampling step is better than final result, very visible in DPM2 a and similar sampler Karras,

Changing the amount of steps does not fix it, it is always the second to last sampling the one with good results.
Sad to see underrated [DPM2 a] sampler just because a bug, Here is a comparison from current build 6bd6154
Steps to reproduce the problem
What should have happened?
Perhaps shared.state.sampling_step is not updated and the sample process goes one more step when it shouldn't.
Commit where the problem happens
the good: perhaps there is no good commit yet...
the bad: 7ce7fb0 it ruins last step since Sep 6 2022!
and the ugly: 5766ce2 it defeats "Clip skip: 2" feature since Oct 11 2022
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Mozilla Firefox
Command Line Arguments
Additional information, context and logs
This custom script will help you save Sampling steps during testing:
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Custom-Scripts#saving-steps-of-the-sampling-process
however, the iteration of steps is not counting from 1, but 0
The other problem is in sd_samplers.py > def store_latent(decoded)
This function access shared.state.sampling_step before its update.
For this reason [Show image creation progress every N sampling steps. Set 0 to disable.] will display step 1 and step 2 regardless of bigger N interval, say 5 or 6.
Perhaps this is the reason for the OP bug.