Skip to content

Commit

Permalink
fix SD loading when safetensors weights only
Browse files Browse the repository at this point in the history
  • Loading branch information
echarlaix committed Jul 27, 2023
1 parent ab0df1b commit d3ce904
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimum/exporters/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ def determine_framework(
framework = "pt"
elif any(is_tf_weight_file):
framework = "tf"
elif "model_index.json" in all_files and any(file.endswith(Path(WEIGHTS_NAME).suffix) for file in all_files):
elif "model_index.json" in all_files and any(file.endswith((pt_weight_extension, safe_weight_extension)) for file in all_files):
# stable diffusion case
framework = "pt"
else:
Expand Down

0 comments on commit d3ce904

Please sign in to comment.