Extraltodeus / ComfyUI-AutomaticCFG

If your image was a pizza and the CFG the temperature of your oven: this is a thermostat that ensures it is always cooked like you want. Also adds a 30% speed increase. For ComfyUI / StableDiffusion
https://www.patreon.com/extraltodeus
357 stars 23 forks source link

Subsequent runs produce worse/different results #45

Open ghostsquad opened 4 months ago

ghostsquad commented 4 months ago

I've found that if I run a ComfyUI workflow multiple times (everything the same except seed), every result after the first is worse and/or significantly different in style/etc. If I close ComfyUI, then regenerate the image that came 2nd (from original workflow), I get the desired quality and style back. Run again with another seed, and I lose that. It's like AutomaticCFG is mutating something about the model, and not restoring that mutation after the workflow is done, thus, when another image is generated, that mutation is applied on top of the previous mutation. Hopefully this makes sense.

ghostsquad commented 4 months ago

I looked into PromptControl, and I noticed that there's an explicit "unpatching" step done there for the model. I don't see that being done in this. https://github.com/asagi4/comfyui-prompt-control/blob/master/prompt_control/utils.py#L139

https://github.com/asagi4/comfyui-prompt-control/blob/b8c83c2eb0d4d8be7b4574b5ec0499d8f8b4fd54/prompt_control/node_lora.py#L127-L133