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 6 but got size 5 for tensor number 1 in the list. #53

Open
AsynFusion opened this issue May 10, 2024 · 5 comments

Comments

@AsynFusion
Copy link

when it runs:

model_pred = unet(
inp_noisy_latents, timesteps, encoder_hidden_states, added_time_ids=added_time_ids).sample

The error is
"RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 6 but got size 5 for tensor number 1 in the list."

could you please tell me how to fix this
thanks

@xiangweifeng
Copy link

have you sovled it?I meet same problem.

@xiangweifeng
Copy link

Hi, its related to the size of the input image.

@Yww12
Copy link

Yww12 commented Jun 14, 2024

when i set batch_size==2, i also meet the same problem. When the batch_size is set to 1, this problem was solved.

@danielvegamyhre
Copy link
Contributor

@Yww12 @xiangweifeng my input images are 320x240 and I am running into the same error here. I am using a batch size of 1. How did you solve this?

@xiangweifeng
Copy link

try to multiple of 64.

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

4 participants