v0xie / sd-webui-incantations

Enhance Stable Diffusion image quality, prompt following, and more through multiple implementations of novel algorithms for Automatic1111 WebUI.
GNU General Public License v3.0
136 stars 8 forks source link

Seeing no changes despite selecting different CFG schedulers #30

Closed ilazarte closed 5 months ago

ilazarte commented 5 months ago

Hello!

First off, thanks for the awesome plugin. Been having a lot of fun retrying my earliest awful prompts with PAG and seeing if they improve. I just updated the plugin for the CFG schedulers feature and then added the following A1111 PRs manually (but have them disabled): https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/15608 (skip cfg) https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/15607 (kl sampler)

When I tried testing though with the below xyz prompt, it looks like the cfg schedules have no impact at all as the x plot below shows. Shouldn't there be a larger variety? It seems like they are pixel exact?

an apple resting on a letter written in ink cursive, next to a quil pen
Steps: 30, Sampler: Euler a, Schedule type: Automatic, CFG scale: 7, Seed: 3056496578, Size: 512x512, Model hash: cc6cb27103, Model: v1-5-pruned-emaonly, VAE hash: 63aeecb90f, VAE: vae-ft-mse-840000-ema-pruned.vae.pt, PAG Active: True, PAG Scale: 0, PAG Start Step: 0, PAG End Step: 150, CFG Interval Enable: True, CFG Interval Schedule: Constant, CFG Interval Low: 0, CFG Interval High: 100, Downcast alphas_cumprod: True, Script: X/Y/Z plot, X Type: [PAG] CFG Schedule, X Values: "Constant,Clamp-Linear (c=4.0),Linear,Cosine,Clamp-Cosine (c=4.0)", Version: v1.9.0

Any guidance on this would help (no pun intended). Could the A1111 above PRs be having an impact? They worked fine before updating this plugin

cfg-scheduler-test

v0xie commented 5 months ago

Hello!

Thanks for the report. I just updated the extension and docs to fix some bugs with the CFG Scheduler and to hopefully better reflect how to use the thing.

I've been developing on the latest dev branch with those two PRs merged for the past week and the Skip Cond option appears to somehow work without issue for with PAG and the scheduler.

Let me know if this addresses the issue.

Also apparently sd-dynamic-thresholding has had CFG scheduling since forever. Might be worth looking into.

xyz_grid-3388-1-A cute puppy

ilazarte commented 5 months ago

@v0xie that looks to have fixed it, seeing variation. Thanks again!