Skip to content
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

RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 64 but got size 128 for tensor number 1 in the list. #40

Open
g711ab opened this issue Sep 19, 2024 · 2 comments

Comments

@g711ab
Copy link

g711ab commented Sep 19, 2024

Traceback (most recent call last):
File "/data/HandRefiner/handrefiner.py", line 220, in
cats = torch.cat([mask, masked_image], dim=1)
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 64 but got size 128 for tensor number 1 in the list.

May I ask what the problem is? How to solve it?

The test case was successful, my image failed to repair.

@wenquanlu
Copy link
Owner

Hi, I guess your original image has size 1024x1024?
HandRefiner is based on SD1.5 which only supports 512x512 size image input
You can either downsize it to 512x512 (then super-resolute to original size) or crop it to 512x512

@g711ab
Copy link
Author

g711ab commented Sep 23, 2024

Hi, I guess your original image has size 1024x1024? HandRefiner is based on SD1.5 which only supports 512x512 size image input You can either downsize it to 512x512 (then super-resolute to original size) or crop it to 512x512

Thank you,I'll try after modifying the image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants