Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -54,9 +54,9 @@ pipe = StableVideoDiffusionPipeline.from_pretrained(
|
|
| 54 |
variant="fp16",
|
| 55 |
)
|
| 56 |
pipe.to("cuda")
|
| 57 |
-
pipe.enable_model_cpu_offload() # for smaller cost
|
| 58 |
model_select("AnimateLCM-SVD-xt.safetensors")
|
| 59 |
-
|
| 60 |
|
| 61 |
|
| 62 |
max_64_bit_int = 2**63 - 1
|
|
@@ -68,7 +68,7 @@ def sample(
|
|
| 68 |
randomize_seed: bool = False,
|
| 69 |
motion_bucket_id: int = 80,
|
| 70 |
fps_id: int = 8,
|
| 71 |
-
max_guidance_scale: float = 1.
|
| 72 |
min_guidance_scale: float = 1,
|
| 73 |
width: int = 1024,
|
| 74 |
height: int = 576,
|
|
@@ -200,7 +200,7 @@ with gr.Blocks() as demo:
|
|
| 200 |
max_guidance_scale = gr.Slider(
|
| 201 |
label="Max guidance scale",
|
| 202 |
info="classifier-free guidance strength",
|
| 203 |
-
value=1.
|
| 204 |
minimum=1,
|
| 205 |
maximum=2,
|
| 206 |
)
|
|
|
|
| 54 |
variant="fp16",
|
| 55 |
)
|
| 56 |
pipe.to("cuda")
|
| 57 |
+
# pipe.enable_model_cpu_offload() # for smaller cost
|
| 58 |
model_select("AnimateLCM-SVD-xt.safetensors")
|
| 59 |
+
pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True) # for faster inference
|
| 60 |
|
| 61 |
|
| 62 |
max_64_bit_int = 2**63 - 1
|
|
|
|
| 68 |
randomize_seed: bool = False,
|
| 69 |
motion_bucket_id: int = 80,
|
| 70 |
fps_id: int = 8,
|
| 71 |
+
max_guidance_scale: float = 1.3,
|
| 72 |
min_guidance_scale: float = 1,
|
| 73 |
width: int = 1024,
|
| 74 |
height: int = 576,
|
|
|
|
| 200 |
max_guidance_scale = gr.Slider(
|
| 201 |
label="Max guidance scale",
|
| 202 |
info="classifier-free guidance strength",
|
| 203 |
+
value=1.3,
|
| 204 |
minimum=1,
|
| 205 |
maximum=2,
|
| 206 |
)
|