Skip to content

Commit 89e42d9

Browse files
authored
Merge pull request #5 from huggingface/small-flux2-transformer-fix
allow sft files to go.
2 parents cceffc4 + cfdd005 commit 89e42d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/convert_flux2_to_diffusers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def load_original_checkpoint(
185185
else:
186186
raise ValueError("Please provide either `repo_id` or a local `checkpoint_path`")
187187

188-
if "safetensors" in model_file:
188+
if "safetensors" in model_file or "sft" in model_file:
189189
original_state_dict = safetensors.torch.load_file(ckpt_path)
190190
else:
191191
original_state_dict = torch.load(ckpt_path, map_location="cpu")

0 commit comments

Comments
 (0)