Run this model with HF Jobs
Run ByteDance/AnimateDiff-Lightning on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/ByteDance/AnimateDiff-Lightning. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/ByteDance/AnimateDiff-Lightning on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use ByteDance/AnimateDiff-Lightning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ByteDance/AnimateDiff-Lightning with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ByteDance/AnimateDiff-Lightning", 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
Help in locking keyframes in diffusers like the sliding context in the comfyui nodes
Hi, first of all, great release!
Its mind blowing seeing animatediff go from like hours of generation time to THIS lol
Anyways, Im not that confident with the python code so Im not quite sure where to start,
I'd need to lock the first 2-4 frames in each generation with the last frames from the previous generation (like the sliding context window implementations, but I dont care about the "sliding context" part as I need it to be able to be called sequentially)
Effectively a AnimDiffVideo2VideoPipeline with an extra argument to lock the first few frames.
Ive tried to to realtime vid2vid and it works really great, but obv its more like individual clips stitched together.
Maybe you can help me guide in the right direction? I could probably hack together an animatediff controlnet pipeline and try to lock frames with controlnet tile but that feels like a dirty solution, since the "correct" way of locking keyframes has already been solved, just cant wrap my head around the different implementations and hacks.
Here a showcase of my efforts so far :)
https://www.youtube.com/watch?v=C0B5X24sU7s
https://www.youtube.com/watch?v=5RjnO5stbMg
It feels like realtime AI video is just around the corner!