p1atdev / LECO

Low-rank adaptation for Erasing COncepts from diffusion models.
https://arxiv.org/abs/2303.07345
Apache License 2.0
307 stars 23 forks source link

Bug: Guidance Rescale doesn't appear to be used #17

Open torridgristle opened 1 year ago

torridgristle commented 1 year ago

https://github.com/p1atdev/LECO/blob/2ea422b7fd113cbb2fbe8b1bab30585dd03eabc3/train_util.py#L253

rescale_noise_cfg() is used to create noise_pred, but this isn't used in what's returned (guided_target).

Also, wouldn't this work for all Stable Diffusion models, not just XL? I use it in SD 1.5 based models via the Neutral Prompt extension and it does seem to work, however if the setting is too high then the resulting images appear faded / low contrast, so perhaps it's not intended for anything but SD XL?