tsi-org commited on
Commit
b7c1a41
·
verified ·
1 Parent(s): 9982441

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -10
app.py CHANGED
@@ -347,21 +347,15 @@ 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
-
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
358
- noise = torch.randn([1, total_frames, 16, 60, 104], device=gpu, dtype=torch.float16, generator=rnd)
359
-
360
  vae_cache, latents_cache = None, None
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
 
 
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
+ noise = torch.randn([1, 21, 16, 60, 104], device=gpu, dtype=torch.float16, generator=rnd)
 
 
 
 
351
 
 
 
 
 
352
  vae_cache, latents_cache = None, None
353
  if not APP_STATE["current_use_taehv"] and not args.trt:
354
  vae_cache = [c.to(device=gpu, dtype=torch.float16) for c in ZERO_VAE_CACHE]
355
 
356
+ num_blocks = 7
357
+ current_start_frame = 0
358
+ all_num_frames = [pipeline.num_frame_per_block] * num_blocks
359
 
360
  total_frames_yielded = 0
361