Instructions to use bluestarburst/AnimateDiff-SceneFusion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use bluestarburst/AnimateDiff-SceneFusion with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("bluestarburst/AnimateDiff-SceneFusion", 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
Commit ·
771ee15
1
Parent(s): f8bc965
Update handler.py
Browse files- handler.py +2 -2
handler.py
CHANGED
|
@@ -10,7 +10,7 @@ from animatediff.utils.util import load_weights
|
|
| 10 |
from diffusers.utils.import_utils import is_xformers_available
|
| 11 |
from typing import Any
|
| 12 |
import torch
|
| 13 |
-
|
| 14 |
import torchvision
|
| 15 |
|
| 16 |
import numpy as np
|
|
@@ -71,7 +71,7 @@ class EndpointHandler():
|
|
| 71 |
video_length= 5,
|
| 72 |
).videos
|
| 73 |
|
| 74 |
-
videos = rearrange(vids, "b c t h w -> t b c h w")
|
| 75 |
n_rows=6
|
| 76 |
fps=1
|
| 77 |
loop = True
|
|
|
|
| 10 |
from diffusers.utils.import_utils import is_xformers_available
|
| 11 |
from typing import Any
|
| 12 |
import torch
|
| 13 |
+
import einops
|
| 14 |
import torchvision
|
| 15 |
|
| 16 |
import numpy as np
|
|
|
|
| 71 |
video_length= 5,
|
| 72 |
).videos
|
| 73 |
|
| 74 |
+
videos = einops.rearrange(vids, "b c t h w -> t b c h w")
|
| 75 |
n_rows=6
|
| 76 |
fps=1
|
| 77 |
loop = True
|