nalin0503 commited on
Commit
ca501e3
·
1 Parent(s): d40dbb3
Files changed (1) hide show
  1. run_morphing.py +7 -7
run_morphing.py CHANGED
@@ -1,5 +1,3 @@
1
- # T.B.C.
2
-
3
  import os
4
  import sys
5
  import time
@@ -95,8 +93,8 @@ def parse_arguments():
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(
@@ -125,9 +123,9 @@ def parse_arguments():
125
  def run_diffmorpher(args):
126
  """
127
  Calls DiffMorpher's main.py via subprocess using the CLI arguments.
128
- Expects `DiffMorpher/` to be a submodule in the current repo.
129
  """
130
- diffmorpher_script = os.path.join("DiffMorpher", "main.py")
131
 
132
  cmd = [
133
  sys.executable, diffmorpher_script,
@@ -157,6 +155,9 @@ def run_diffmorpher(args):
157
  cmd.append("--save_inter")
158
  if args.no_lora:
159
  cmd.append("--no_lora")
 
 
 
160
 
161
  print("[INFO] Running DiffMorpher with command:")
162
  print(" ".join(cmd))
@@ -166,7 +167,6 @@ def run_diffmorpher(args):
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
  """
172
  If the user does NOT want FILM, we still make a basic video from keyframes.
 
 
 
1
  import os
2
  import sys
3
  import time
 
93
  )
94
  parser.add_argument(
95
  "--use_lcm", action="store_true",
96
+ help="Enable LCM-LoRA acceleration for faster sampling"
97
+ )
98
 
99
  # ------------------- FILM ARGS -------------------
100
  parser.add_argument(
 
123
  def run_diffmorpher(args):
124
  """
125
  Calls DiffMorpher's main.py via subprocess using the CLI arguments.
126
+ Expects `Image-Morpher/` to be a submodule in the current repo.
127
  """
128
+ diffmorpher_script = os.path.join("Image-Morpher", "main.py")
129
 
130
  cmd = [
131
  sys.executable, diffmorpher_script,
 
155
  cmd.append("--save_inter")
156
  if args.no_lora:
157
  cmd.append("--no_lora")
158
+ # ---- Add LCM-LoRA flag if set ----
159
+ if args.use_lcm:
160
+ cmd.append("--use_lcm")
161
 
162
  print("[INFO] Running DiffMorpher with command:")
163
  print(" ".join(cmd))
 
167
  end = time.time()
168
  print(f"[INFO] DiffMorpher completed in {end - start:.2f} seconds.")
169
 
 
170
  def create_simple_video_from_keyframes(keyframes_folder, output_folder, fps=40):
171
  """
172
  If the user does NOT want FILM, we still make a basic video from keyframes.