Fix .sft file loading (they are safetensors files).

This commit is contained in:
comfyanonymous 2024-08-01 11:32:58 -04:00
parent 5f98de7697
commit eb96c3bd82
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ import itertools
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: