Skip to content

Commit

Permalink
Fix .sft file loading (they are safetensors files).
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Aug 1, 2024
1 parent 5f98de7 commit eb96c3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion comfy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
def load_torch_file(ckpt, safe_load=False, device=None):
if device is None:
device = torch.device("cpu")
if ckpt.lower().endswith(".safetensors"):
if ckpt.lower().endswith(".safetensors") or ckpt.lower().endswith(".sft"):
sd = safetensors.torch.load_file(ckpt, device=device.type)
else:
if safe_load:
Expand Down

0 comments on commit eb96c3b

Please sign in to comment.