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: shape '[2, 6, 2, 30, 2, 45, 2, 16]' is invalid for input of size 2246400 #728

Open
2 tasks
NXZXH opened this issue Mar 1, 2025 · 0 comments
Open
2 tasks
Assignees

Comments

@NXZXH
Copy link

NXZXH commented Mar 1, 2025

System Info / 系統信息

Help!
hidden_states三三三 torch.Size([2, 13, 16, 60, 90])
encoder_hidden_states三三三 torch.Size([2, 226, 4096])
0%| | 0/50 [00:02<?, ?it/s]
Traceback (most recent call last):
File "/root/miniconda3/envs/CogVideo/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/root/miniconda3/envs/CogVideo/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/root/autodl-tmp/CogVideo/cogvideox-controlnet/inference/cli_demo.py", line 201, in
generate_video(
File "/root/miniconda3/envs/CogVideo/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/root/autodl-tmp/CogVideo/cogvideox-controlnet/inference/cli_demo.py", line 147, in generate_video
video_generate = pipe(
File "/root/miniconda3/envs/CogVideo/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/root/autodl-tmp/CogVideo/cogvideox-controlnet/controlnet_pipeline.py", line 625, in call
noise_pred = self.transformer(
File "/root/miniconda3/envs/CogVideo/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/root/miniconda3/envs/CogVideo/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1750, in _call_impl
return forward_call(*args, **kwargs)
File "/root/miniconda3/envs/CogVideo/lib/python3.10/site-packages/accelerate/hooks.py", line 170, in new_forward
output = module._old_forward(*args, **kwargs)
File "/root/autodl-tmp/CogVideo/cogvideox-controlnet/cogvideo_transformer.py", line 49, in forward
hidden_states = self.patch_embed(encoder_hidden_states, hidden_states)
File "/root/miniconda3/envs/CogVideo/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/root/miniconda3/envs/CogVideo/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1750, in _call_impl
return forward_call(*args, **kwargs)
File "/root/miniconda3/envs/CogVideo/lib/python3.10/site-packages/diffusers/models/embeddings.py", line 724, in forward
image_embeds = image_embeds.reshape(
RuntimeError: shape '[2, 6, 2, 30, 2, 45, 2, 16]' is invalid for input of size 2246400

2. Patch embedding

    print("hidden_states三三三", hidden_states.shape)
    print("encoder_hidden_states三三三", encoder_hidden_states.shape)
    hidden_states = self.patch_embed(encoder_hidden_states, hidden_states)

Information / 问题信息

  • The official example scripts / 官方的示例脚本
  • My own modified scripts / 我自己修改的脚本和任务

Reproduction / 复现过程

Expected behavior / 期待表现

@zRzRzRzRzRzRzR zRzRzRzRzRzRzR self-assigned this Mar 3, 2025
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