Try to fix a vram issue with controlnets.

This commit is contained in:
comfyanonymous 2023-03-19 10:50:38 -04:00
parent 212851a874
commit 29728e1119

View File

@ -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