VideoCrafter icon indicating copy to clipboard operation
VideoCrafter copied to clipboard

Got TypeError when running default image2video script

Open jiangyurong609 opened this issue 2 years ago • 1 comments

Traceback (most recent call last): File "/VideoCrafter/scripts/evaluation/inference.py", line 137, in run_inference(args, gpu_num, rank) File "/VideoCrafter/scripts/evaluation/inference.py", line 115, in run_inference img_emb = model.get_image_embeds(cond_images) File "/VideoCrafter/scripts/evaluation/../../lvdm/models/ddpm3d.py", line 691, in get_image_embeds img_token = self.embedder(batch_imgs) File "//miniconda3/envs/dev/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "/VideoCrafter/scripts/evaluation/../../lvdm/modules/encoders/condition.py", line 341, in forward z = self.encode_with_vision_transformer(image) File "/VideoCrafter/scripts/evaluation/../../lvdm/modules/encoders/condition.py", line 345, in encode_with_vision_transformer x = self.preprocess(x) File "/VideoCrafter/scripts/evaluation/../../lvdm/modules/encoders/condition.py", line 326, in preprocess x = kornia.geometry.resize(x, (224, 224), File "//miniconda3/envs/dev/lib/python3.10/site-packages/kornia/geometry/transform/affwarp.py", line 570, in resize input_tmp = kornia.filters.gaussian_blur2d(input_tmp, ks, sigmas) File "//miniconda3/envs/dev/lib/python3.10/site-packages/kornia/filters/gaussian.py", line 38, in gaussian_blur2d get_gaussian_kernel2d(kernel_size, sigma), dim=0) File "//miniconda3/envs/dev/lib/python3.10/site-packages/kornia/filters/kernels.py", line 541, in get_gaussian_kernel2d kernel_x: torch.Tensor = get_gaussian_kernel1d(ksize_x, sigma_x, force_even) File "//miniconda3/envs/dev/lib/python3.10/site-packages/kornia/filters/kernels.py", line 418, in get_gaussian_kernel1d raise TypeError( TypeError: kernel_size must be an odd positive integer. Got 6

jiangyurong609 avatar Nov 01 '23 16:11 jiangyurong609

At first it gave me similar mistakes, but apparently they were for the Torch. that installed me version 2.0 Then I could solve it with this. pip3 install torch==2.1.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 Looking in indexes: https://download.pytorch.org/whl/cu118

I also gave me xformers problems pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu118

OTHERS IS TO SAY THAT REQUES TO HAVE THE CUDA INSTALLED

I am testing in Windows with a 12GB RTX 2060 He is processing, I guess something is doing: D I will leave it until

zephirusgit avatar Nov 13 '23 21:11 zephirusgit