Download models/animatdiff.py from Trkaga/King: direct link, hf CLI and curl.
- Browser
- Download file 196 Bytes
-
https://huggingface.co/spaces/Trkaga/King/resolve/main/models/animatdiff.py
- Command line
-
hf download hf://spaces/Trkaga/King/models/animatdiff.py
-
curl -L -o animatdiff.py https://huggingface.co/spaces/Trkaga/King/resolve/main/models/animatdiff.py
196 Bytes
| from diffusers import AnimateDiffPipeline | |
| pipe = AnimateDiffPipeline.from_pretrained("animatediff") | |
| def generate_frames(prompt): | |
| result = pipe(prompt, num_frames=16) | |
| return result.frames |