Skip to content

Commit 3c2e2aa

Browse files
authored
.from_single_file() - Add missing .shape (#10332)
Add missing `.shape`
1 parent b58868e commit 3c2e2aa

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
@@ -228,7 +228,7 @@ def load_model_dict_into_meta(
228228
else:
229229
model_name_or_path_str = f"{model_name_or_path} " if model_name_or_path is not None else ""
230230
raise ValueError(
231-
f"Cannot load {model_name_or_path_str} because {param_name} expected shape {empty_state_dict[param_name]}, but got {param.shape}. If you want to instead overwrite randomly initialized weights, please make sure to pass both `low_cpu_mem_usage=False` and `ignore_mismatched_sizes=True`. For more information, see also: https://github.com/huggingface/diffusers/issues/1619#issuecomment-1345604389 as an example."
231+
f"Cannot load {model_name_or_path_str} because {param_name} expected shape {empty_state_dict[param_name].shape}, but got {param.shape}. If you want to instead overwrite randomly initialized weights, please make sure to pass both `low_cpu_mem_usage=False` and `ignore_mismatched_sizes=True`. For more information, see also: https://github.com/huggingface/diffusers/issues/1619#issuecomment-1345604389 as an example."
232232
)
233233

234234
if is_quantized and (

0 commit comments

Comments
 (0)