-
-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request]: #874
Comments
Users can schedule CN weights; my concern is that if we read a weight of 0 as meaning "disable this CN", then that CN will get switched off during a normal weight schedule |
Well, I’m running it like this (in my private version of deforumation <-> deforum), and it works just fine… it’s 2 rows of tweek if you want to test it yourself in deforum_controlnet.py together with a cn schedule as you yourself suggested above 🤗 |
It's why it has an enable and a weight. The weight decides the influence, the enable decides if it's enabled. I can't say it any simpler than that. If you want to cache 5 CN's at the beginning and not use any of the weights until frame 1000, you can do that. |
Not sure I agree on that. Controlnet was made for on and off for simple render, regardless of weight. Your telling me that they could just not bothered with on or of and just stick with the weight (0 == off?)? For a fact I know it takes much less time when using 5 cn's on 0 weight, compared to 5 cn's turned off. |
Is there an existing issue for this?
What would your feature do ?
The future would not load the Controlnet model, if the weight is 0.
Because I am developing the extension Deforumation that uses Deforum, I would like if the Controlnet model did not load if a user uses a weight schedule value of 0... A value of zero (to my knowledge means that the controlnet module doesn't influence the img2img render.
A simple solution that I tried is to just put these line in the function "create_cnu_dict" in "deforum_controlnet.py" (currently after row 302 (cnu['weight'] = getattr(CnSchKeys, f"cn_{model_num}_weight_schedule_series")[frame_idx]):
if cnu['weight'] == 0:
cnu['enabled'] = False
This will prevent the module to be loaded at all if the weight is 0, and also saves some time, as to not load all enabled controlnet modules. If I'm using 5 controlnet modules that I want to switch on/off realtime this really saves time.
I have tried it and it seems to work, well now with the latest fix, that you did and which closes the StableDiffusionProcessingTxt2Img pipeline.
Well met
//Rakila
Proposed workflow
Add the two line:
if cnu['weight'] == 0:
cnu['enabled'] = False
Additional information
No response
Are you going to help adding it?
I'll let you decide upon this.
The text was updated successfully, but these errors were encountered: