Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -347,6 +347,11 @@ def video_generation_handler_streaming(prompt, seed=42, fps=15, save_frames=True
|
|
347 |
rnd = torch.Generator(gpu).manual_seed(int(seed))
|
348 |
pipeline._initialize_kv_cache(1, torch.float16, device=gpu)
|
349 |
pipeline._initialize_crossattn_cache(1, torch.float16, device=gpu)
|
|
|
|
|
|
|
|
|
|
|
350 |
|
351 |
# Calculate total frames needed for your desired number of blocks
|
352 |
total_frames = num_blocks * pipeline.num_frame_per_block
|
@@ -356,9 +361,7 @@ def video_generation_handler_streaming(prompt, seed=42, fps=15, save_frames=True
|
|
356 |
if not APP_STATE["current_use_taehv"] and not args.trt:
|
357 |
vae_cache = [c.to(device=gpu, dtype=torch.float16) for c in ZERO_VAE_CACHE]
|
358 |
|
359 |
-
|
360 |
-
current_start_frame = 0
|
361 |
-
all_num_frames = [pipeline.num_frame_per_block] * num_blocks
|
362 |
|
363 |
total_frames_yielded = 0
|
364 |
|
|
|
347 |
rnd = torch.Generator(gpu).manual_seed(int(seed))
|
348 |
pipeline._initialize_kv_cache(1, torch.float16, device=gpu)
|
349 |
pipeline._initialize_crossattn_cache(1, torch.float16, device=gpu)
|
350 |
+
|
351 |
+
|
352 |
+
num_blocks = 9
|
353 |
+
current_start_frame = 0
|
354 |
+
all_num_frames = [pipeline.num_frame_per_block] * num_blocks
|
355 |
|
356 |
# Calculate total frames needed for your desired number of blocks
|
357 |
total_frames = num_blocks * pipeline.num_frame_per_block
|
|
|
361 |
if not APP_STATE["current_use_taehv"] and not args.trt:
|
362 |
vae_cache = [c.to(device=gpu, dtype=torch.float16) for c in ZERO_VAE_CACHE]
|
363 |
|
364 |
+
|
|
|
|
|
365 |
|
366 |
total_frames_yielded = 0
|
367 |
|