AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
131.7k stars 25.27k forks source link

add code for skipping CFG on early steps #15607

Open drhead opened 4 weeks ago

drhead commented 4 weeks ago

Description

Screenshots/videos:

25 steps, no skipped CFG steps: grid-23147 25 steps, skipped CFG on first four steps: grid-23146 50 steps, no CFG skipping: grid-23148 50 steps, skipped CFG on first eight steps: grid-23149

As you can see, the image with CFG skipping converged much faster. There are some noticeable side effects on image brightness (prompt on this image contained (dark,:1.3), so this is somewhat less dark than I would typically expect).

Checklist:

v0xie commented 2 weeks ago

Awesome PR!

Skip Early Cond should be written in metadata for reproducibility.