Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
SunMarc committed Feb 14, 2025
1 parent d1c4a61 commit bcbd493
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/diffusers/models/modeling_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1167,9 +1167,7 @@ def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.P
state_dict = None
if not is_sharded:
# Time to load the checkpoint
state_dict = load_state_dict(
resolved_model_file[0], disable_mmap=disable_mmap, dduf_entries=dduf_entries
)
state_dict = load_state_dict(resolved_model_file[0], disable_mmap=disable_mmap, dduf_entries=dduf_entries)
# We only fix it for non sharded checkpoints as we don't need it yet for sharded one.
model._fix_state_dict_keys_on_load(state_dict)

Expand Down

0 comments on commit bcbd493

Please sign in to comment.