AILab-CVC / VideoCrafter

VideoCrafter2: Overcoming Data Limitations for High-Quality Video Diffusion Models
https://ailab-cvc.github.io/videocrafter2/
Other
4.58k stars 342 forks source link

AttributeError: 'VisionTransformer' object has no attribute 'input_patchnorm' error #41

Closed 447806664 closed 1 year ago

447806664 commented 1 year ago

When I want to generate video from image, run shell with follow error: (videocrafter) [x@public VideoCrafter]# sh scripts/run_image2video.sh @CoLVDM Inference: 2023-11-02-11-52-43 Global seed set to 123 AE working on z of shape (1, 4, 64, 64) = 16384 dimensions.

model checkpoint loaded. [rank:0] 2/2 samples loaded. [rank:0] batch-1 (1)x1 ... Traceback (most recent call last): File "scripts/evaluation/inference.py", line 139, in run_inference(args, gpu_num, rank) File "scripts/evaluation/inference.py", line 117, in run_inference img_emb = model.get_image_embeds(cond_images) File "/home/share/VideoCrafter/scripts/evaluation/../../lvdm/models/ddpm3d.py", line 691, in get_image_embeds img_token = self.embedder(batch_imgs) File "/opt/miniconda3/envs/videocrafter/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "/home/share/VideoCrafter/scripts/evaluation/../../lvdm/modules/encoders/condition.py", line 341, in forward z = self.encode_with_vision_transformer(image) File "/home/share/VideoCrafter/scripts/evaluation/../../lvdm/modules/encoders/condition.py", line 348, in encode_with_vision_transformer if self.model.visual.input_patchnorm: File "/opt/miniconda3/envs/videocrafter/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1614, in getattr raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'VisionTransformer' object has no attribute 'input_patchnorm'

dillfrescott commented 1 year ago

Same error!

dillfrescott commented 1 year ago

https://github.com/AILab-CVC/VideoCrafter/issues/39#issuecomment-1790586654

scutpaul commented 1 year ago

This problem is solved in issue #39