NVlabs / affordance_diffusion

Codes for "Affordance Diffusion: Synthesizing Hand-Object Interactions"
https://github.com/NVlabs/affordance_diffusion/blob/master
101 stars 5 forks source link

RuntimeError: Error(s) in loading state_dict for Text2ImUNet: size mismatch for input_blocks.0.0.weight: copying a param with shape torch.Size([192, 7, 3, 3]) from checkpoint, the shape in current model is torch.Size([192, 3, 3, 3]). #14

Closed ZwanGZZ closed 10 months ago

ZwanGZZ commented 10 months ago

Your project is really impressive, but I encountered some issues while trying to reproduce it. I hope to get your help. I encountered the following error during the data generation phase in the inpainting stage.

[Error message]: Traceback (most recent call last): File "/affordance_diffusion/preprocess/generate_data.py", line 495, in batch_main(args) File "/affordance_diffusion/preprocess/generate_data.py", line 301, in batch_main glide['base'] = load_base() File "/affordance_diffusion/preprocess/generate_data.py", line 88, in load_base model.load_state_dict(load_checkpoint('base-inpaint', device)) File "miniconda3/envs/afford_diff/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1482, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for Text2ImUNet: size mismatch for input_blocks.0.0.weight: copying a param with shape torch.Size([192, 7, 3, 3]) from checkpoint, the shape in current model is torch.Size([192, 3, 3, 3]).

Process finished with exit code 1

Could you please help me understand the cause of this? It has been bothering me for a while. By the way, I also wanted to ask about the first stage of data generation, the decoding phase. I couldn't find any data in the output path. Is this normal? I hope to receive your response. Thank you!

lym29 commented 6 months ago

Hi, I am wondering if you have solved this issue? I met the same error in data generation.

ZWanG0802 commented 5 days ago

You need to delete the built-in glide_text2im in the project and re-download it from GitHub