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.

Set model to fp16 before loading the state dict to lower ram bump.

comfyanonymous6b774589a5a7
diff --git a/comfy/sd.py b/comfy/sd.py
index 5237df3a0..db04e0426 100644
--- a/comfy/sd.py
+++ b/comfy/sd.py
@@ -1155,9 +1155,9 @@ def load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, o
else:
model = model_base.BaseModel(unet_config, v_prediction=v_prediction)
- model = load_model_weights(model, sd, verbose=False, load_state_dict_to=load_state_dict_to)
-
if fp16:
model = model.half()
+ model = load_model_weights(model, sd, verbose=False, load_state_dict_to=load_state_dict_to)
+
return (ModelPatcher(model), clip, vae, clipvision)