chaojie / ComfyUI-AniPortrait

Apache License 2.0
249 stars 21 forks source link

down_blocks.0.attentions.0.transformer_blocks.0.attn2.to_k.weight expected shape tensor(..., device='meta', size=(320, 1280)), but got torch.Size([320, 768]) #11

Open Leo-86 opened 7 months ago

Leo-86 commented 7 months ago

Error occurred when executing AniPortraitLoader:

Cannot load C:\Users\HP\Desktop\ComfyUI\custom_nodes\ComfyUI-AniPortrait\pretrained_model\stable-diffusion-v1-5 because down_blocks.0.attentions.0.transformer_blocks.0.attn2.to_k.weight expected shape tensor(..., device='meta', size=(320, 1280)), but got torch.Size([320, 768]). 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.

File "C:\Users\HP\Desktop\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "C:\Users\HP\Desktop\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "C:\Users\HP\Desktop\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(*slice_dict(input_data_all, i))) File "C:\Users\HP\Desktop\ComfyUI\custom_nodes\ComfyUI-AniPortrait\nodes.py", line 120, in run reference_unet = UNet2DConditionModel.from_pretrained( File "C:\Users\HP\Desktop\ComfyUI\python\lib\site-packages\huggingface_hub\utils_validators.py", line 118, in _inner_fn return fn(args, **kwargs) File "C:\Users\HP\Desktop\ComfyUI\python\lib\site-packages\diffusers\models\modeling_utils.py", line 667, in from_pretrained unexpected_keys = load_model_dict_into_meta( File "C:\Users\HP\Desktop\ComfyUI\python\lib\site-packages\diffusers\models\modeling_utils.py", line 152, in load_model_dict_into_meta raise ValueError( 纯萌新,有大佬遇到过这类模型问题吗,求求解答