mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-20 03:13:30 +00:00
Set model to fp16 before loading the state dict to lower ram bump.
This commit is contained in:
parent
0c7cad404c
commit
6b774589a5
@ -1155,9 +1155,9 @@ def load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, o
|
|||||||
else:
|
else:
|
||||||
model = model_base.BaseModel(unet_config, v_prediction=v_prediction)
|
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:
|
if fp16:
|
||||||
model = model.half()
|
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)
|
return (ModelPatcher(model), clip, vae, clipvision)
|
||||||
|
Loading…
Reference in New Issue
Block a user