fffiloni commited on
Commit
b0ca684
1 Parent(s): 833e264

Update inference.py

Browse files
Files changed (1) hide show
  1. inference.py +2 -1
inference.py CHANGED
@@ -53,6 +53,7 @@ def get_args():
53
  parser.add_argument("--video_length", type=int, default=15, help="Length of synthesized video")
54
  parser.add_argument("--height", type=int, default=512, help="Height of synthesized video, and should be a multiple of 32")
55
  parser.add_argument("--width", type=int, default=512, help="Width of synthesized video, and should be a multiple of 32")
 
56
  parser.add_argument("--smoother_steps", nargs='+', default=[19, 20], type=int, help="Timesteps at which using interleaved-frame smoother")
57
  parser.add_argument("--is_long_video", action='store_true', help="Whether to use hierarchical sampler to produce long video")
58
  parser.add_argument("--seed", type=int, default=42, help="Random seed of generator")
@@ -110,7 +111,7 @@ if __name__ == "__main__":
110
 
111
  # Save condition video
112
  video_cond = [np.array(p).astype(np.uint8) for p in pil_annotation]
113
- imageio.mimsave(os.path.join(args.output_path, f"{args.condition}_condition.mp4"), video_cond, fps=8)
114
 
115
  # Reduce memory (optional)
116
  del annotator; torch.cuda.empty_cache()
 
53
  parser.add_argument("--video_length", type=int, default=15, help="Length of synthesized video")
54
  parser.add_argument("--height", type=int, default=512, help="Height of synthesized video, and should be a multiple of 32")
55
  parser.add_argument("--width", type=int, default=512, help="Width of synthesized video, and should be a multiple of 32")
56
+ parser.add_argument("--fps", type=int, default=8, help="FPS for final output")
57
  parser.add_argument("--smoother_steps", nargs='+', default=[19, 20], type=int, help="Timesteps at which using interleaved-frame smoother")
58
  parser.add_argument("--is_long_video", action='store_true', help="Whether to use hierarchical sampler to produce long video")
59
  parser.add_argument("--seed", type=int, default=42, help="Random seed of generator")
 
111
 
112
  # Save condition video
113
  video_cond = [np.array(p).astype(np.uint8) for p in pil_annotation]
114
+ imageio.mimsave(os.path.join(args.output_path, f"{args.condition}_condition.mp4"), video_cond, fps=args.fps)
115
 
116
  # Reduce memory (optional)
117
  del annotator; torch.cuda.empty_cache()