-
Notifications
You must be signed in to change notification settings - Fork 27.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 'Skip CFG during early sampling' to the XYZ_grid script #16281
Add 'Skip CFG during early sampling' to the XYZ_grid script #16281
Conversation
thanks for the pr but sorry your implementation is way over complicated stable-diffusion-webui/scripts/xyz_grid.py Line 262 in 8ec80b2
I added you as co-author for the commit |
That's how i started. But if you'll take a look at the modules/sd_samplers_cfg_denoiser.py you'll find that it checks an option value rather than a passed parameter. So when you set a parameter in the script file it is not passed further until you actually read it's value in the modules/processing.py, pass it further to the denoiser, then use it there instead of Just take a look at how You could also add the |
no
stable-diffusion-webui/modules/processing.py Lines 832 to 847 in 82a973c
I even triple checked by verifying my PR your PR and manually adjusting the settings all produce the exact same output (pixel perfect) AUTO also have a commit that made skip_early_cond work with override see 5429e4c |
Aha, thanks, missed that detail. Then you're right, your way is much easier. |
Closed in favor of #16282 |
@w-e-w BTW i would prefer an integer value to set precise step to activate CFG rather than a progress float. It might be much easier than dividing step number i want it to be activated by the total steps. Does it makes sense to propose such a change? For example 1.5, 1.6, 1.7 will all activate CFG on step 4 so it might be quite confusing for users. It will be much easier to use the step number instead as we use for Prompt Editing feature |
the current scale from if you really think it's important make a PR but I won't support it
if you think about it an absolute step doesn't make sense if you change the step size depending on your sampler and scheduler your results may vary but you can see that the same |
With the current state any non-zero value will make a first step skip (current_step 0 / total_steps is always 0). It's not logical but that's indeed a breaking change so probably not worth it.
Yup, makes sense. I'll make more tests and think it through. Thanks for feedback! |
if you don't want any steps to be skipped set it to 0 it's disabled I don't see it really impact the usage unless you are constantly switching between LCM (4~ step) and other normal ones (20~ step) and want Skip Early CFG to be "automatically disabled" for LCM by setting it to a value <=~0.25 |
tip |
I'm quite an experienced dude in SD but thanks anyway =) |
Description
skip_early_cond
(the first step is zero so to have 1.0 at 100% progress we need to add one)Screenshots/videos:
Checklist: