yuanxion / Text2Video-Zero

Text-to-Image Diffusion Models are Zero-Shot Video Generators
Other
2 stars 1 forks source link

Failed to run Text-To-Video demo with video_length=8 on machine with GPU #1

Closed yuanxion closed 1 year ago

yuanxion commented 1 year ago

CPU: 12th Gen Intel(R) Core(TM) i7-12700, 20cores, 31GB GPU: NVIDIA GeForce RTX 3080, 10GB

When trying the Text-To-Video demo according to the README.md:

import torch
import os
os.environ['CURL_CA_BUNDLE'] = ''

from model import Model
model = Model(device = "cuda", dtype = torch.float16)
print(f'--> model {model}')

prompt = "A horse galloping on a street"
params = {"t0": 44, "t1": 47 , "motion_field_strength_x" : 12, "motion_field_strength_y" : 12, "video_length": 8}

out_path, fps = f"./text2video_{prompt.replace(' ','_')}.mp4", 4
model.process_text2video(prompt, fps = fps, path = out_path, **params)

Log: t2v-video-config-failed-20230512.txt

Log: t2v-video-config-ok-20230512.txt

XianFuWongIntel commented 1 year ago

I'm able to generate videos with > 1 frame on NVIDIA GeForce RTX 2080 Ti (11 GB), there are at least 2 ways to do it:

https://github.com/yuanxion/Text2Video-Zero/assets/8991906/3f6e7182-7afd-435e-be39-8b823401745d

https://github.com/yuanxion/Text2Video-Zero/assets/8991906/c219a3c4-d72d-42dc-9192-35339226501a

https://github.com/yuanxion/Text2Video-Zero/assets/8991906/725ea82c-4899-4708-979e-fe909dff0105

XianFuWongIntel commented 1 year ago

Examples with higher FPS and video length:

https://github.com/yuanxion/Text2Video-Zero/assets/8991906/bfd94dde-3197-45be-a602-ab1559395ac2

https://github.com/yuanxion/Text2Video-Zero/assets/8991906/3e9e3210-954c-4e08-bf97-14a8f0c6ef66

XianFuWongIntel commented 1 year ago

In short, we should be able to generate videos on GPU with memory size >7G.