wenquanlu / HandRefiner

MIT License
754 stars 35 forks source link

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 1 month ago

g711ab commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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.