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

DreamVideo:When performing Step 1: learning a textual identity using Textual Inversion with DreamVideo, the following error occurred. #155

Open
aimll101 opened this issue Dec 17, 2024 · 2 comments

Comments

@aimll101
Copy link

-- Process 6 terminated with the following error:
Traceback (most recent call last):
File "/home/jundu/anaconda3/envs/dl/lib/python3.9/site-packages/torch/multiprocessing/spawn.py", line 76, in _wrap
fn(i, *args)
File "/home/jundu/VGen-main/tools/train/train_dreamvideo_entrance.py", line 145, in worker
white_feature, _, zero_y = clip_encoder(image=clip_encoder.white_image, text="")
File "/home/jundu/anaconda3/envs/dl/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/jundu/anaconda3/envs/dl/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/jundu/VGen-main/tools/modules/clip_embedder.py", line 344, in forward
xt, x = self.encode_with_transformer(tokens.to(self.device), **kwargs)
File "/home/jundu/VGen-main/tools/modules/clip_embedder.py", line 353, in encode_with_transformer
x = self.text_transformer_forward(x, attn_mask=self.model.attn_mask)
File "/home/jundu/VGen-main/tools/modules/clip_embedder.py", line 366, in text_transformer_forward
x = r(x, attn_mask=attn_mask)
File "/home/jundu/anaconda3/envs/dl/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/jundu/anaconda3/envs/dl/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/jundu/anaconda3/envs/dl/lib/python3.9/site-packages/open_clip/transformer.py", line 263, in forward
x = q_x + self.ls_1(self.attention(q_x=self.ln_1(q_x), k_x=k_x, v_x=v_x, attn_mask=attn_mask))
File "/home/jundu/anaconda3/envs/dl/lib/python3.9/site-packages/open_clip/transformer.py", line 250, in attention
return self.attn(
File "/home/jundu/anaconda3/envs/dl/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/jundu/anaconda3/envs/dl/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/jundu/anaconda3/envs/dl/lib/python3.9/site-packages/torch/nn/modules/activation.py", line 1275, in forward
attn_output, attn_output_weights = F.multi_head_attention_forward(
File "/home/jundu/anaconda3/envs/dl/lib/python3.9/site-packages/torch/nn/functional.py", line 5438, in multi_head_attention_forward
raise RuntimeError(f"The shape of the 2D attn_mask is {attn_mask.shape}, but should be {correct_2d_size}.")
RuntimeError: The shape of the 2D attn_mask is torch.Size([77, 77]), but should be (1, 1).

@weilllllls
Copy link
Contributor

Hello, I could run DreamVideo without errors by following the environment setup in the Installation guide. Please check your environment and look for any potential package conflicts.

If you only need to run the DreamVideo-related code, you can comment out the videolcm import statements in tools/inferences/init.py#L7, tools/inferences/init.py#L9 and tools/train/init.py#L3, as they require the diffusers dependency.

@aimll101
Copy link
Author

aimll101 commented Dec 18, 2024 via email

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