mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-25 15:55:18 +00:00
Try to fix a vram issue with controlnets.
This commit is contained in:
parent
64ca71757a
commit
edfc4ca663
@ -595,6 +595,9 @@ def load_controlnet(ckpt_path, model=None):
|
|||||||
else:
|
else:
|
||||||
control_model.load_state_dict(controlnet_data, strict=False)
|
control_model.load_state_dict(controlnet_data, strict=False)
|
||||||
|
|
||||||
|
if use_fp16:
|
||||||
|
control_model = control_model.half()
|
||||||
|
|
||||||
control = ControlNet(control_model)
|
control = ControlNet(control_model)
|
||||||
return control
|
return control
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user