nalin0503 commited on
Commit
ad5b4b7
·
1 Parent(s): a3368d4

Update run_morphing.py

Browse files
Files changed (1) hide show
  1. run_morphing.py +6 -11
run_morphing.py CHANGED
@@ -74,8 +74,8 @@ def parse_arguments():
74
  help="Number of keyframes to generate (default: %(default)s)"
75
  )
76
  parser.add_argument(
77
- "--duration", type=int, default=100,
78
- help="Duration of each keyframe in the final .gif (default: %(default)s ms)"
79
  )
80
  parser.add_argument(
81
  "--no_lora", action="store_true",
@@ -99,10 +99,6 @@ def parse_arguments():
99
  "--film_output_folder", type=str, default="./FILM_Results",
100
  help="Folder where FILM's final interpolated video is saved (default: %(default)s)"
101
  )
102
- parser.add_argument(
103
- "--film_fps", type=int, default=30,
104
- help="FPS for the final video - 'Pseudo-Playback-Speed', since total frames are same (default: %(default)s)"
105
- )
106
  parser.add_argument(
107
  "--film_num_recursions", type=int, default=3,
108
  help="Number of recursive interpolations to perform in FILM (default: %(default)s)"
@@ -127,8 +123,7 @@ def run_diffmorpher(args):
127
  "--output_path", args.output_path,
128
  "--save_lora_dir", args.save_lora_dir,
129
  "--lamb", str(args.lamb),
130
- "--num_frames", str(args.num_frames),
131
- "--duration", str(args.duration),
132
  ]
133
 
134
  if args.load_lora_path_0:
@@ -157,7 +152,7 @@ def run_diffmorpher(args):
157
  end = time.time()
158
  print(f"[INFO] DiffMorpher completed in {end - start:.2f} seconds.")
159
 
160
- def create_simple_video_from_keyframes(keyframes_folder, output_folder, fps=40):
161
  """
162
  If the user does NOT want FILM, we still make a basic video from keyframes.
163
  Assumes frames are saved as .png or .jpg in keyframes_folder.
@@ -226,7 +221,7 @@ def main():
226
  success = run_film_interpolation(
227
  input_folder=keyframes_folder,
228
  output_folder=args.film_output_folder,
229
- fps=args.film_fps,
230
  num_recursions=args.film_num_recursions
231
  )
232
 
@@ -241,7 +236,7 @@ def main():
241
  create_simple_video_from_keyframes(
242
  keyframes_folder=keyframes_folder,
243
  output_folder=args.film_output_folder,
244
- fps=args.film_fps
245
  )
246
 
247
  # 5) Print total execution time
 
74
  help="Number of keyframes to generate (default: %(default)s)"
75
  )
76
  parser.add_argument(
77
+ "--fps", type=int, default=30,
78
+ help="FPS for the output video (default: %(default)s)"
79
  )
80
  parser.add_argument(
81
  "--no_lora", action="store_true",
 
99
  "--film_output_folder", type=str, default="./FILM_Results",
100
  help="Folder where FILM's final interpolated video is saved (default: %(default)s)"
101
  )
 
 
 
 
102
  parser.add_argument(
103
  "--film_num_recursions", type=int, default=3,
104
  help="Number of recursive interpolations to perform in FILM (default: %(default)s)"
 
123
  "--output_path", args.output_path,
124
  "--save_lora_dir", args.save_lora_dir,
125
  "--lamb", str(args.lamb),
126
+ "--num_frames", str(args.num_frames)
 
127
  ]
128
 
129
  if args.load_lora_path_0:
 
152
  end = time.time()
153
  print(f"[INFO] DiffMorpher completed in {end - start:.2f} seconds.")
154
 
155
+ def create_simple_video_from_keyframes(keyframes_folder, output_folder, fps):
156
  """
157
  If the user does NOT want FILM, we still make a basic video from keyframes.
158
  Assumes frames are saved as .png or .jpg in keyframes_folder.
 
221
  success = run_film_interpolation(
222
  input_folder=keyframes_folder,
223
  output_folder=args.film_output_folder,
224
+ fps=args.fps,
225
  num_recursions=args.film_num_recursions
226
  )
227
 
 
236
  create_simple_video_from_keyframes(
237
  keyframes_folder=keyframes_folder,
238
  output_folder=args.film_output_folder,
239
+ fps=args.fps
240
  )
241
 
242
  # 5) Print total execution time