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.

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

comfyanonymouseb96c3bd82ba
diff --git a/comfy/utils.py b/comfy/utils.py
index 1e4b5ef88..0db9fbb62 100644
--- a/comfy/utils.py
+++ b/comfy/utils.py
@@ -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: