dagloop5 commited on
Commit
7c85561
·
verified ·
1 Parent(s): c1892c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -285,14 +285,14 @@ print(f"Downloaded LoRAs: {pose_lora_path}, {general_lora_path}, {motion_lora_pa
285
 
286
  def build_loras_tuple(pose_strength: float, general_strength: float, motion_strength: float):
287
  """
288
- Return a tuple of LoraPathStrengthAndSDOps matching LTX loader expectations.
289
  Uses the LTX renaming map for SD key remapping (helps with some LoRA formats).
290
  """
291
- return (
292
  LoraPathStrengthAndSDOps(path=str(pose_lora_path), strength=float(pose_strength), sd_ops=LTXV_LORA_COMFY_RENAMING_MAP),
293
  LoraPathStrengthAndSDOps(path=str(general_lora_path), strength=float(general_strength), sd_ops=LTXV_LORA_COMFY_RENAMING_MAP),
294
  LoraPathStrengthAndSDOps(path=str(motion_lora_path), strength=float(motion_strength), sd_ops=LTXV_LORA_COMFY_RENAMING_MAP),
295
- )
296
 
297
  # initial strengths (you can change defaults)
298
  INITIAL_LORAS = build_loras_tuple(1.0, 1.0, 1.0)
@@ -302,7 +302,7 @@ pipeline = LTX23DistilledA2VPipeline(
302
  distilled_checkpoint_path=checkpoint_path,
303
  spatial_upsampler_path=spatial_upsampler_path,
304
  gemma_root=gemma_root,
305
- loras=[INITIAL_LORAS],
306
  quantization=QuantizationPolicy.fp8_cast(),
307
  )
308
 
@@ -388,7 +388,7 @@ def generate_video(
388
 
389
  current_seed = random.randint(0, MAX_SEED) if randomize_seed else int(seed)
390
 
391
- # --- LoRA dynamic update: rebuild ledger models in-place when strengths change ---
392
  try:
393
  current_ledger = pipeline.model_ledger
394
  # helper to compare strengths quickly
 
285
 
286
  def build_loras_tuple(pose_strength: float, general_strength: float, motion_strength: float):
287
  """
288
+ Return a list of LoraPathStrengthAndSDOps matching LTX loader expectations.
289
  Uses the LTX renaming map for SD key remapping (helps with some LoRA formats).
290
  """
291
+ return [
292
  LoraPathStrengthAndSDOps(path=str(pose_lora_path), strength=float(pose_strength), sd_ops=LTXV_LORA_COMFY_RENAMING_MAP),
293
  LoraPathStrengthAndSDOps(path=str(general_lora_path), strength=float(general_strength), sd_ops=LTXV_LORA_COMFY_RENAMING_MAP),
294
  LoraPathStrengthAndSDOps(path=str(motion_lora_path), strength=float(motion_strength), sd_ops=LTXV_LORA_COMFY_RENAMING_MAP),
295
+ ]
296
 
297
  # initial strengths (you can change defaults)
298
  INITIAL_LORAS = build_loras_tuple(1.0, 1.0, 1.0)
 
302
  distilled_checkpoint_path=checkpoint_path,
303
  spatial_upsampler_path=spatial_upsampler_path,
304
  gemma_root=gemma_root,
305
+ loras=INITIAL_LORAS,
306
  quantization=QuantizationPolicy.fp8_cast(),
307
  )
308
 
 
388
 
389
  current_seed = random.randint(0, MAX_SEED) if randomize_seed else int(seed)
390
 
391
+ # --- LoRA dynamic update: rebuild ledger models in-place when strengths change ---
392
  try:
393
  current_ledger = pipeline.model_ledger
394
  # helper to compare strengths quickly