Skip to content

Commit c5da192

Browse files
SunMarcyiyixuxu
andauthored
Update src/diffusers/models/modeling_utils.py
Co-authored-by: YiYi Xu <[email protected]>
1 parent 00f0bd1 commit c5da192

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)