ljleb / sd-webui-neutral-prompt

Collision-free AND keywords for a1111 webui!
MIT License
187 stars 13 forks source link

X/Y/Z plot support for CFG rescale #52

Closed Miczu closed 11 months ago

Miczu commented 11 months ago

Hi, I was testing CFG rescale and it looks useful, but has some issues.

The as value goes up, I notice image becoming more gray (below example with 0.0, 0.5, 0.75). It looks like there is some gain in quality, so I'm trying to figure out if I can combat the gray part with CFG value or something. Alternatively I'm considering to use some CFG tweaking from https://github.com/mcmonkeyprojects/sd-dynamic-thresholding - but This is hard to do without X/Y/Z plot.

Is this something I can request to be added? 😇

01724-1_eeb82c5a 01725-1_eeb82c5a 01726-1_eeb82c5a

ljleb commented 11 months ago

We can add an option for this, sure. CFG Rescale works best with models that were trained with offset noise. I assume your model wasn't trained with offset noise, which is why you get more washed out results. Try for example with https://huggingface.co/Xynon/SD-Silicon/blob/main/Silicon29/Silicon29-dark.safetensors

Miczu commented 11 months ago

Are there different types of models based on how they are trained? Is there easy way to tell them apart when browsing on civita for example?

Miczu commented 11 months ago

Silicon29-dark appears to handle it better, but there is still the gray effect (0, 0.75, 1.0). Probably it's fine for this one to use paper recommended 0.7 value, but most models I have don't handle it as well 😞 01739-1_e8910ab7 01740-1_e8910ab7 01741-1_e8910ab7

ljleb commented 11 months ago

Are there different types of models based on how they are trained? Is there easy way to tell them apart when browsing on civita for example?

AFAIK no, you have to check the details of the model. It isn't an architectural change, but a feature the model either learns or doesn't. TL;DR: the model is trained with random noise offsets instead of having the mean constantly at 0

Miczu commented 11 months ago

No CFG rescale, Disabled FreeU grid-0037 0.92 Cfg Rescale, complex FreeU settings: grid-0038

I think CFG rescale with some FreeU fixes looks solid. Manually messing with CFG rescale is so slow 😭

ljleb commented 11 months ago

Sorry for taking so long here, I don't want to make any promises but I should get xyz grid to work soon ™️

Miczu commented 11 months ago

Thanks, looking forward to experimenting with it ❤️