IceClear commited on
Commit
7fe120b
·
1 Parent(s): 61e51d7
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -385,10 +385,14 @@ def generation_loop(video_path='./test_videos', seed=666, batch_size=1, cfg_scal
385
  sample = sample.clip(-1, 1).mul_(0.5).add_(0.5).mul_(255).round()
386
  sample = sample.to(torch.uint8).numpy()
387
 
 
 
 
 
 
388
  gc.collect()
389
  torch.cuda.empty_cache()
390
- print(f"Generated video size: {sample.size()}")
391
- return sample, output_dir
392
 
393
 
394
  title = "SeedVR2: One-Step Video Restoration via Diffusion Adversarial Post-Training"
 
385
  sample = sample.clip(-1, 1).mul_(0.5).add_(0.5).mul_(255).round()
386
  sample = sample.to(torch.uint8).numpy()
387
 
388
+ mediapy.write_video(
389
+ output_dir, sample, fps=self.config.dit_generation.get("fps", 12)
390
+ )
391
+
392
+ print(f"Generated video size: {sample.size()}")
393
  gc.collect()
394
  torch.cuda.empty_cache()
395
+ return output_dir, output_dir
 
396
 
397
 
398
  title = "SeedVR2: One-Step Video Restoration via Diffusion Adversarial Post-Training"