embedding.1.weight expected shape tensor(..., device='meta', size=(320, 64, 1, 1)), but got torch.Size([320, 16, 1, 1]).

#27
by loong - opened

ValueError: Cannot load /mnt/data/loong/stable-cascade/decoder because embedding.1.weight expected shape tensor(..., device='meta', size=(320, 64, 1, 1)), but got torch.Size([320, 16, 1, 1]). 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.

change c_in in decoder/config.json to in_channels

This comment has been hidden
This comment has been hidden

Im having the exact same issue, @uni-tianyan How can one change c_in in decoder/config.json to in_channels, when just calling the decoder using:
decoder = StableCascadeDecoderPipeline.from_pretrained("stabilityai/stable-cascade", torch_dtype=dtype,ignore_mismatched_sizes=True)

?

Im having the exact same issue, @uni-tianyan How can one change c_in in decoder/config.json to in_channels, when just calling the decoder using:
decoder = StableCascadeDecoderPipeline.from_pretrained("stabilityai/stable-cascade", torch_dtype=dtype,ignore_mismatched_sizes=True)

?

prior = StableCascadePriorPipeline.from_pretrained("stabilityai/stable-cascade-prior", torch_dtype=dtype).to(device)
decoder = StableCascadeDecoderPipeline.from_pretrained("stabilityai/stable-cascade", torch_dtype=dtype, revision="refs/pr/17").to(device)
deleted

modifying the config.json of the model. From '"c_in": 4' to '"in_channels": 4' in C:\Users\YourUserName.cache\huggingface\hub\models--stabilityai--stable-cascade\snapshots\f2a84281d6f8db3c757195dd0c9a38dbdea90bb4\decoder\config.json

Sign up or log in to comment