Skip to content
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

[Bug]: Skip Early CFG does not affect the image output at all #9

Closed
4 of 6 tasks
rytt0001 opened this issue Jul 12, 2024 · 5 comments
Closed
4 of 6 tasks

[Bug]: Skip Early CFG does not affect the image output at all #9

rytt0001 opened this issue Jul 12, 2024 · 5 comments

Comments

@rytt0001
Copy link

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

The Skip Early CFG Feature / Ignore negative prompt during early sampling (skip_early_cond) does not affect the image output at all.

Steps to reproduce the problem

Generate two images, one with skip_early_cond at 0 and one with it at 1.0

What should have happened?

according to the pull request adding the feature on auto webui : AUTOMATIC1111/stable-diffusion-webui#15607

it should at least affect the image a little

What browsers do you use to access the UI ?

No response

Sysinfo

sysinfo-2024-07-12-10-45.json

Console logs

Begin to load 1 model
[Memory Management] Current Free GPU Memory (MB) =  10716.9228515625
[Memory Management] Model Memory (MB) =  1639.4412307739258
[Memory Management] Minimal Inference Memory (MB) =  1024.0
[Memory Management] Estimated Remaining GPU Memory (MB) =  8053.481620788574
Moving model(s) has taken 0.23 seconds
100%|██████████████████████████████████████████████████████████████████████████| 30/30 [00:14<00:00,  2.03it/s]
100%|██████████████████████████████████████████████████████████████████████████| 30/30 [00:14<00:00,  2.06it/s]

Additional information

skip_early cond at 1.0 (enabled):
image
image

skip_early_cond at 0.0 (disabled):
image
image

@rytt0001
Copy link
Author

also i checked if it passed in the condition

if skip_uncond:
           # Ensure we keep at least one element
           print('Test 1')
           if x.shape[0] > 1:
               print('Test 2')
               x = x[:-1]
               sigma = sigma[:-1]
           assert x.numel() > 0 and sigma.numel() > 0, "x or sigma became empty after skip_uncond"

sd_sampler_cfg_denoiser.py line 321-327
and it pass on the Test 1 print
but NOT on the Test 2 print ever

@rytt0001 rytt0001 changed the title [Bug]: [Bug]: Skip Early CFG does not affect the image output at all Jul 12, 2024
@Panchovix
Copy link
Owner

Thanks for the report, I'm a bit busy at the moment but will check it out when I have time.

@Panchovix
Copy link
Owner

I have added a new commit that should fix this, can you try and see if it works? ea29f74

@sashasubbbb
Copy link

Tested it out, seems to work now i guess, thank you.
Now, completely irrelevant, i don't think Clip Skip L on SDXL is doing anything. AUTOMATIC1111/stable-diffusion-webui#15992
Should i open a separate issue?

@Panchovix
Copy link
Owner

Tested it out, seems to work now i guess, thank you. Now, completely irrelevant, i don't think Clip Skip L on SDXL is doing anything. AUTOMATIC1111/stable-diffusion-webui#15992 Should i open a separate issue?

Yes please, to have separated issues, gonna close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants