Spaces:
Sleeping
Sleeping
Reel candidate: 2-step, portrait 384x672
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ from safetensors.torch import load_file
|
|
| 18 |
|
| 19 |
DEVICE = "cpu"
|
| 20 |
DTYPE = torch.float32 # CPU must use float32
|
| 21 |
-
STEP =
|
| 22 |
REPO = "ByteDance/AnimateDiff-Lightning"
|
| 23 |
CKPT = f"animatediff_lightning_{STEP}step_diffusers.safetensors"
|
| 24 |
BASE = "emilianJR/epiCRealism" # an SD1.5 checkpoint (runwayml/sd-v1-5 was removed)
|
|
@@ -50,7 +50,7 @@ def generate(prompt, negative_prompt="", num_frames=8):
|
|
| 50 |
num_inference_steps=STEP,
|
| 51 |
num_frames=int(num_frames),
|
| 52 |
width=384,
|
| 53 |
-
height=
|
| 54 |
)
|
| 55 |
return export_to_video(out.frames[0], "output.mp4", fps=8)
|
| 56 |
|
|
|
|
| 18 |
|
| 19 |
DEVICE = "cpu"
|
| 20 |
DTYPE = torch.float32 # CPU must use float32
|
| 21 |
+
STEP = 2 # AnimateDiff-Lightning: 1 / 2 / 4 / 8 steps
|
| 22 |
REPO = "ByteDance/AnimateDiff-Lightning"
|
| 23 |
CKPT = f"animatediff_lightning_{STEP}step_diffusers.safetensors"
|
| 24 |
BASE = "emilianJR/epiCRealism" # an SD1.5 checkpoint (runwayml/sd-v1-5 was removed)
|
|
|
|
| 50 |
num_inference_steps=STEP,
|
| 51 |
num_frames=int(num_frames),
|
| 52 |
width=384,
|
| 53 |
+
height=672, # portrait 9:16-ish for reels
|
| 54 |
)
|
| 55 |
return export_to_video(out.frames[0], "output.mp4", fps=8)
|
| 56 |
|