"src/git@developer.sourcefind.cn:OpenDAS/lmdeploy.git" did not exist on "ab1767cf035e5a6f68ae6a744c0d744326ce12ff"
Unverified Commit 3c2e2aa8 authored by Thien Tran's avatar Thien Tran Committed by GitHub
Browse files

`.from_single_file()` - Add missing `.shape` (#10332)

Add missing `.shape`
parent b58868e6
...@@ -228,7 +228,7 @@ def load_model_dict_into_meta( ...@@ -228,7 +228,7 @@ def load_model_dict_into_meta(
else: else:
model_name_or_path_str = f"{model_name_or_path} " if model_name_or_path is not None else "" model_name_or_path_str = f"{model_name_or_path} " if model_name_or_path is not None else ""
raise ValueError( raise ValueError(
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." 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."
) )
if is_quantized and ( if is_quantized and (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment