VGen icon indicating copy to clipboard operation
VGen copied to clipboard

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

Open aimll101 opened this issue 1 year ago • 3 comments

-- 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).

aimll101 avatar Dec 17 '24 15:12 aimll101

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.

weilllllls avatar Dec 18 '24 07:12 weilllllls

OK!

---Original--- From: "Yujie @.> Date: Wed, Dec 18, 2024 15:09 PM To: @.>; Cc: @.@.>; Subject: Re: [ali-vilab/VGen] DreamVideo:When performing Step 1: learning atextual identity using Textual Inversion with DreamVideo, the following erroroccurred. (Issue #155)

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.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

aimll101 avatar Dec 18 '24 09:12 aimll101

Excuse me, has it been solved? I also encountered this problem.

schhaohao avatar Jul 06 '25 09:07 schhaohao