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
New node idea for ComfyUI
#46
by Xcom88 - opened
Any chance someone could make a node that takes the last frame from the img2vid video to run a new iteration from to make longer videos?
Can do it manually but would be nice to have it in one workflow.
Did you find anything to do this?
Not really, i don't use this anymore. because it is so unpredictable and a lot of energy gets wasted for stuff you don't want. I just do video2video now. But it easy to do. just make a image preview node at end before it go in video combine then copy last frame and paste it in the load image at start. maybe use a match color node as the color seems to shift as the animation gets longer.