thankfulcarp commited on
Commit
0de16d8
·
1 Parent(s): f9dfa50
Files changed (1) hide show
  1. app.py +10 -5
app.py CHANGED
@@ -33,19 +33,24 @@ pipe = WanImageToVideoPipeline.from_pretrained(
33
  pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=8.0)
34
  pipe.to("cuda")
35
 
 
 
36
  # Load and fuse the single merged FusionX LoRA
 
37
  try:
 
38
  lora_path = hf_hub_download(
39
  repo_id=LORA_REPO_ID,
40
  filename=LORA_FILENAME,
41
  subfolder=LORA_SUBFOLDER
42
  )
43
- pipe.transformer.load_lora_weights(lora_path, adapter_name="fusionx")
44
- pipe.set_adapters(["fusionx"])
45
- print("✅ Merged FusionX LoRA loaded. Use the 'LoRA Strength' slider to control the effect.")
 
46
  except Exception as e:
47
- print(f"⚠️ Merged FusionX LoRA not loaded: {e}")
48
- print("📝 Using base Wan model without LoRA enhancement. The 'LoRA Strength' slider will have no effect.")
49
 
50
  MOD_VALUE = 32
51
  DEFAULT_H_SLIDER_VALUE = 576 # FusionX optimized default
 
33
  pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=8.0)
34
  pipe.to("cuda")
35
 
36
+ lora_adapters = []
37
+ lora_weights = []
38
  # Load and fuse the single merged FusionX LoRA
39
+
40
  try:
41
+ # Load CausVid LoRA (strength 1.0 as per FusionX)
42
  lora_path = hf_hub_download(
43
  repo_id=LORA_REPO_ID,
44
  filename=LORA_FILENAME,
45
  subfolder=LORA_SUBFOLDER
46
  )
47
+ pipe.load_lora_weights(lora_path, adapter_name="fusionx")
48
+ lora_adapters.append("fusionx")
49
+ lora_weights.append(1.0) # FusionX uses 1.0
50
+ print("✅ FusionX LoRA loaded (strength: 1.0)")
51
  except Exception as e:
52
+ print(f"⚠️ FusionX LoRA not loaded: {e}")
53
+
54
 
55
  MOD_VALUE = 32
56
  DEFAULT_H_SLIDER_VALUE = 576 # FusionX optimized default