Instructions to use stabilityai/stable-video-diffusion-img2vid-xt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use stabilityai/stable-video-diffusion-img2vid-xt with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image, export_to_video # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-video-diffusion-img2vid-xt", dtype=torch.bfloat16, device_map="cuda") pipe.to("cuda") prompt = "A man with short gray hair plays a red electric guitar." image = load_image( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png" ) output = pipe(image=image, prompt=prompt).frames[0] export_to_video(output, "output.mp4") - Notebooks
- Google Colab
- Kaggle
Did anyone figured it out how to run it in low vRAM like 15-25 GB
#21
by zohadev - opened
I just wonder if it is possible to run it in low vRAM devices because it's not not cheap to run it on a A100 GPU
Wtf. I just use comfy and my 3090 is enough. For low res it uses below 15 for sure
Well I use fp16 though, but dunno if it matters
Here is a link to my thread where I have posted my solution to the issue: https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt/discussions/23
runs on 8gb RTX 3070, i tested. 512x512.