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

v5 7b 报错,t2v 和 i2v 都报错 #167

Open
sunjian2015 opened this issue Dec 11, 2024 · 2 comments
Open

v5 7b 报错,t2v 和 i2v 都报错 #167

sunjian2015 opened this issue Dec 11, 2024 · 2 comments

Comments

@sunjian2015
Copy link

Traceback (most recent call last):
  File "/mnt/personal/code/EasyAnimate/predict_i2v.py", line 314, in <module>
    sample = pipeline(
             ^^^^^^^^^
  File "/opt/miniconda/envs/py311/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/personal/code/EasyAnimate/easyanimate/pipeline/pipeline_easyanimate_multi_text_encoder_inpaint.py", line 1250, in __call__
    noise_pred = self.transformer(
                 ^^^^^^^^^^^^^^^^^
  File "/opt/miniconda/envs/py311/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda/envs/py311/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda/envs/py311/lib/python3.11/site-packages/accelerate/hooks.py", line 169, in new_forward
    output = module._old_forward(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/personal/code/EasyAnimate/easyanimate/models/transformer3d.py", line 1469, in forward
    hidden_states, encoder_hidden_states = block(
                                           ^^^^^^
  File "/opt/miniconda/envs/py311/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda/envs/py311/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/personal/code/EasyAnimate/easyanimate/models/attention.py", line 1119, in forward
    attn_hidden_states, attn_encoder_hidden_states = self.attn1(
                                                     ^^^^^^^^^^^
  File "/opt/miniconda/envs/py311/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda/envs/py311/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "diffusers/models/attention_processor.py", line 502, in EasyAnimate.diffusers.models.attention_processor.Attention.forward
  File "/mnt/personal/code/EasyAnimate/easyanimate/models/processor.py", line 283, in __call__
    query[:, :, text_seq_length:] = apply_rotary_emb(query[:, :, text_seq_length:], image_rotary_emb)
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "diffusers/models/embeddings.py", line 629, in EasyAnimate.diffusers.models.embeddings.apply_rotary_emb
RuntimeError: The size of tensor a (48) must match the size of tensor b (13104) at non-singleton dimension 1

@bubbliiiing
Copy link
Collaborator

能否提供具体都修改了什么参数呢?

@sunjian2015
Copy link
Author

能否提供具体都修改了什么参数呢?

没有修改参数,就是把代码里的 12B 改称了 7B
image

我好像找到了原因,把 apply_rotary_emb 这个函数直接写到 processor.py 里能跑,import 好像没有成功。
辛苦大佬看下~

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