Skip to content

Commit

Permalink
Fix for use_safetensors parameters, allow use of parameter on loading…
Browse files Browse the repository at this point in the history
… submodels (#9576)
  • Loading branch information
elismasilva committed Oct 4, 2024
1 parent 751893d commit b185955
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file added image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/diffusers/models/modeling_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.P
use_safetensors = kwargs.pop("use_safetensors", None)

allow_pickle = False
if use_safetensors is None or use_safetensors:
if use_safetensors is None:
use_safetensors = True
allow_pickle = True

Expand Down

0 comments on commit b185955

Please sign in to comment.