mcmonkeyprojects / sd-dynamic-thresholding

Dynamic Thresholding (CFG Scale Fix) for Stable Diffusion (eSwarmUI, ComfyUI, and Auto WebUI)
MIT License
1.1k stars 103 forks source link

make this for diffusers #53

Closed alexblattner closed 1 year ago

alexblattner commented 1 year ago

Hi, I would like to use this in diffusers, but I lack the overall understanding of the code. Could you implement this or teach me the code so I could do so myself?

Thanks in advance :)

mcmonkey4eva commented 1 year ago

idk about diffusers. The impl is all in https://github.com/mcmonkeyprojects/sd-dynamic-thresholding/blob/master/dynthres_core.py Experiment modes can be ignored. I tried my best to keep clean variable names and add explanatory # comment lines. Some of the way stuff is handled is weird cursed auto-webui-specific value formatting that I'd struggle to explain as I don't even entirely understand it myself. (particularly the cond shaping at the top to compensate for the way auto webui batches stuff)

alexblattner commented 1 year ago

Hey, man. I've tried this and came to the conclusion that it'll be a big pain in the ass. Would you be interested in doing this for cash?

@mcmonkey4eva

alexblattner commented 11 months ago

I made it for diffusers.