Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Try to fix a vram issue with controlnets.

comfyanonymousedfc4ca66316
diff --git a/comfy/sd.py b/comfy/sd.py
index 0eba58fc5..6d1e8bb9b 100644
--- a/comfy/sd.py
+++ b/comfy/sd.py
@@ -595,6 +595,9 @@ def load_controlnet(ckpt_path, model=None):
else:
control_model.load_state_dict(controlnet_data, strict=False)
+ if use_fp16:
+ control_model = control_model.half()
+
control = ControlNet(control_model)
return control