Unload Controlnet model from buffer? #1820
DragonHawkAlpha
started this conversation in
General
Replies: 1 comment 6 replies
-
This is code that should be put in a webui extension. There is no endpoint to disable controlnet at the moment, but as long as you don't ask for controlnet to run through the API, it shouldn't do any processing. Just remove Does your use case require you to permanently disable controlnet for some reason? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This code disables controlnet once used. But I don't see a controlling API endpoint to disable. Anyone know how to disable once used via txt2img API in Automatic1111 without server restart?
Code from Wiki does not have an endpoint in the API to run it. I do not understand how this would be called either, where do you find StableDiffusionProcessing object? Can someone add a disable endpoint? Leaving out of txt2img request is not enough because it does not unload from buffer as far as I can workout.
import importlib
external_code = importlib.import_module('extensions.sd-webui-controlnet.scripts.external_code', 'external_code')
def disable_controlnet(p: StableDiffusionProcessing):
external_code.update_cn_script_in_processing(p, [])
Beta Was this translation helpful? Give feedback.
All reactions