Instructions to use ali-vilab/text-to-video-ms-1.7b-legacy with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ali-vilab/text-to-video-ms-1.7b-legacy with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ali-vilab/text-to-video-ms-1.7b-legacy", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Update readme to include citation and correct code snippet
Code snippet correction from https://huggingface.co/damo-vilab/text-to-video-ms-1.7b/discussions/2/
text-to-video-ms-1.7b and text-to-video-ms-1.7b-legacy what is the difference?
---> 11 video_path = export_to_video(video_frames)
/usr/local/lib/python3.10/dist-packages/diffusers/utils/export_utils.py in export_to_video(video_frames, output_video_path, fps)
133
134 fourcc = cv2.VideoWriter_fourcc(*"mp4v")
--> 135 h, w, c = video_frames[0].shape
136 video_writer = cv2.VideoWriter(output_video_path, fourcc, fps=fps, frameSize=(w, h))
137 for i in range(len(video_frames)):
ValueError: too many values to unpack (expected 3)
how to solve this error
hey, where is the spaces/ADOPLE/Video-Generator-AI?
it was very cool, can you or your team bring it back?
thank you