Fix syntax error - remove orphaned except block and fix indentation

- Remove orphaned 'except Exception as e:' block that had no matching try
- Fix indentation for wan scheduler configuration
- Change 'I2V model loaded' to generic 'Model loaded' message
parent 05831edb
...@@ -8780,22 +8780,18 @@ def main(args): ...@@ -8780,22 +8780,18 @@ def main(args):
except: except:
pass pass
if "wan" in args.model and hasattr(pipe, "scheduler"): if "wan" in args.model and hasattr(pipe, "scheduler"):
try: try:
pipe.scheduler = UniPCMultistepScheduler.from_config( pipe.scheduler = UniPCMultistepScheduler.from_config(
pipe.scheduler.config, pipe.scheduler.config,
prediction_type="flow_prediction", prediction_type="flow_prediction",
flow_shift=extra.get("flow_shift", 3.0) flow_shift=extra.get("flow_shift", 3.0)
) )
except: except:
pass pass
print(f" ✅ I2V model loaded successfully") print(f" ✅ Model loaded successfully")
timing.end_step() # i2v_model_loading timing.end_step() # model_loading
except Exception as e:
print(f"❌ Failed to load I2V model: {e}")
sys.exit(1)
# ─── Audio Generation (Pre-video) ────────────────────────────────────────── # ─── Audio Generation (Pre-video) ──────────────────────────────────────────
audio_path = None audio_path = None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment