nalin0503 commited on
Commit
bcf0a9f
·
1 Parent(s): 963b1a5
Files changed (3) hide show
  1. app.py +2 -2
  2. requirements.txt +1 -1
  3. run_morphing.py +5 -9
app.py CHANGED
@@ -297,8 +297,8 @@ def main():
297
  "--output_path", output_dir,
298
  "--film_output_folder", film_output_dir,
299
  "--num_frames", str(num_frames),
300
- "--keyframe_duration", str(keyframe_duration)
301
- ]
302
  if enable_lcm_lora:
303
  cmd.append("--use_lcm")
304
  if use_adain:
 
297
  "--output_path", output_dir,
298
  "--film_output_folder", film_output_dir,
299
  "--num_frames", str(num_frames),
300
+ "--duration", str(keyframe_duration)
301
+ ] + (["--save_inter"] if use_film else []) # to ensure we have intermediate folder for FILM
302
  if enable_lcm_lora:
303
  cmd.append("--use_lcm")
304
  if use_adain:
requirements.txt CHANGED
@@ -16,4 +16,4 @@ lpips
16
  # peft
17
  tensorflow==2.18.0
18
  tensorflow_hub==0.16.1
19
-
 
16
  # peft
17
  tensorflow==2.18.0
18
  tensorflow_hub==0.16.1
19
+ opencv_python
run_morphing.py CHANGED
@@ -26,7 +26,7 @@ def parse_arguments():
26
 
27
  # ------------------- DIFFMORPHER ARGS -------------------
28
  parser.add_argument(
29
- "--model_path", type=str, default="stabilityai/stable-diffusion-2-1-base", # yeah this needs to be chnaged TODO
30
  help="Pretrained model to use for DiffMorpher (default: %(default)s)"
31
  )
32
  parser.add_argument(
@@ -93,6 +93,10 @@ def parse_arguments():
93
  "--no_lora", action="store_true",
94
  help="Disable LoRA usage in DiffMorpher"
95
  )
 
 
 
 
96
 
97
  # ------------------- FILM ARGS -------------------
98
  parser.add_argument(
@@ -162,14 +166,6 @@ def run_diffmorpher(args):
162
  end = time.time()
163
  print(f"[INFO] DiffMorpher completed in {end - start:.2f} seconds.")
164
 
165
- def run_lcm_lora(args):
166
- """
167
- Run the LCM-LoRA accelerated Keyframe generator
168
-
169
- """
170
- # THIS would be a flag passed to diffmorpher instead.
171
- pass
172
-
173
 
174
  def create_simple_video_from_keyframes(keyframes_folder, output_folder, fps=40):
175
  """
 
26
 
27
  # ------------------- DIFFMORPHER ARGS -------------------
28
  parser.add_argument(
29
+ "--model_path", type=str, default="stabilityai/stable-diffusion-2-1-base",
30
  help="Pretrained model to use for DiffMorpher (default: %(default)s)"
31
  )
32
  parser.add_argument(
 
93
  "--no_lora", action="store_true",
94
  help="Disable LoRA usage in DiffMorpher"
95
  )
96
+ parser.add_argument(
97
+ "--use_lcm", action="store_true",
98
+ help="Enable LCM-LoRA acceleration for faster sampling")
99
+
100
 
101
  # ------------------- FILM ARGS -------------------
102
  parser.add_argument(
 
166
  end = time.time()
167
  print(f"[INFO] DiffMorpher completed in {end - start:.2f} seconds.")
168
 
 
 
 
 
 
 
 
 
169
 
170
  def create_simple_video_from_keyframes(keyframes_folder, output_folder, fps=40):
171
  """