Skip to content

Commit 02a368b

Browse files
SunMarcyiyixuxu
andauthored
Update src/diffusers/models/model_loading_utils.py
Co-authored-by: YiYi Xu <[email protected]>
1 parent c9e08da commit 02a368b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/models/model_loading_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def _merge_sharded_checkpoints(
340340
# Load tensors from each unique file
341341
for file_name in files_to_load:
342342
part_file_path = os.path.join(sharded_ckpt_cached_folder, file_name)
343-
if not os.path.exists(part_file_path) and (dduf_entries and part_file_path not in dduf_entries):
343+
if not os.path.exists(part_file_path) or (dduf_entries and part_file_path not in dduf_entries):
344344
raise FileNotFoundError(f"Part file {file_name} not found.")
345345

346346
if is_safetensors:

0 commit comments

Comments
 (0)