-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dict key error in demo #49
Comments
have you fixed it yet? |
no , I do not have a fix for this |
I have the same problem. |
I replaced keywords and it worked. |
Same! I have replaced it like this and now it doesn't give me this error anymore:
|
@LaiaTarres hi Laia can u plz help me to find, where should replace this keywords (file name + ligne) . and thank you so much |
@LaiaTarres Can you send any code that needs to be changed or replaced? I would love to be able to test it because it really amazes me [email protected] Thank you |
I fixed this by modifying the line (this is a common issues so all you need to do is toc change the state dict names such that they match your expected state: for k, v in vae_state_dict.items():
name1 = k.replace('module.', '') #name = k[7:] if k[:7] == 'module' else k
name2 = name1.replace('query', 'to_q') #name = k[7:] if k[:7] == 'module' else k
name3 = name2.replace('key', 'to_k')
name4 = name3.replace('value', 'to_v')
name = name4.replace('proj_attn', 'to_out.0')
new_state_dict[name] = v
pipe.vae.load_state_dict(new_state_dict)
pipe.vae = pipe.vae.cuda() |
Hello,
When I am running demo, I am getting the following dictionary key error. I am using PyTorch 2.0.1 and cuda 11.7. Is that specific version of PyTorch that I should use? Any ideas how I can resolve this?
Thank you
The text was updated successfully, but these errors were encountered: