Skip to content

Commit 21f94a1

Browse files
committed
Merge remote-tracking branch 'upstream/model-loading-refactor' into model-loading-refactor
2 parents 039eef5 + c5da192 commit 21f94a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/models/modeling_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.P
946946
"Defaulting to unsafe serialization. Pass `allow_pickle=False` to raise an error instead."
947947
)
948948

949-
if resolved_archive_file is None:
949+
if resolved_archive_file is None and not is_sharded:
950950
resolved_archive_file = _get_model_file(
951951
pretrained_model_name_or_path,
952952
weights_name=_add_variant(WEIGHTS_NAME, variant),

0 commit comments

Comments
 (0)