rahul7star commited on
Commit
8e63e84
·
verified ·
1 Parent(s): b4fc2db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -16
app.py CHANGED
@@ -38,25 +38,18 @@ pipe.to("cuda")
38
  lora_adapters = []
39
  lora_weights = []
40
 
 
 
41
  try:
42
- # Load CausVid LoRA (strength 1.0 as per FusionX)
43
- causvid_path = hf_hub_download(repo_id=LORA_REPO_ID, filename=LORA_FILENAME)
44
- pipe.load_lora_weights(causvid_path, adapter_name="causvid_lora")
45
- lora_adapters.append("causvid_lora")
46
- lora_weights.append(1.0) # FusionX uses 1.0 for CausVid
47
- print("✅ CausVid LoRA loaded (strength: 1.0)")
48
  except Exception as e:
49
- print(f"⚠️ CausVid LoRA not loaded: {e}")
50
-
51
 
52
-
53
- # Apply LoRA adapters if any were loaded
54
- if lora_adapters:
55
- pipe.set_adapters(lora_adapters, adapter_weights=lora_weights)
56
- pipe.fuse_lora()
57
- print(f"🔥 FusionX Enhancement Applied: {len(lora_adapters)} LoRAs fused")
58
- else:
59
- print("📝 No LoRAs loaded - using base Wan model")
60
 
61
  MOD_VALUE = 32
62
  DEFAULT_H_SLIDER_VALUE = 576 # FusionX optimized default
 
38
  lora_adapters = []
39
  lora_weights = []
40
 
41
+ # --- Load and apply FusionX LoRA ---
42
+ print("🧩 Loading FusionX LoRA adapter...")
43
  try:
44
+ lora_path = hf_hub_download(repo_id=LORA_REPO_ID, filename=LORA_FILENAME)
45
+ pipe.load_lora_weights(lora_path, adapter_name="fusionx_lora")
46
+ pipe.set_adapters(["fusionx_lora"], adapter_weights=[1.0])
47
+ pipe.fuse_lora()
48
+ print("✅ FusionX LoRA successfully applied at strength 1.0")
 
49
  except Exception as e:
50
+ print(f"⚠️ Failed to load FusionX LoRA: {e}")
 
51
 
52
+ print("✨ Pipeline ready for text-to-video generation!")
 
 
 
 
 
 
 
53
 
54
  MOD_VALUE = 32
55
  DEFAULT_H_SLIDER_VALUE = 576 # FusionX optimized default