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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -38,18 +38,17 @@ pipe.to("cuda")
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
 
38
  lora_adapters = []
39
  lora_weights = []
40
 
41
+ # Download LoRA file
42
+ lora_path = hf_hub_download(repo_id=LORA_REPO_ID, filename=LORA_FILENAME)
43
+
44
+ # Load and fuse it — use any adapter name (e.g., "default", "main", etc.)
45
  try:
46
+ pipe.load_lora_weights(lora_path, adapter_name="main")
47
+ pipe.set_adapters(["main"], adapter_weights=[1.0])
 
48
  pipe.fuse_lora()
49
+ print("✅ LoRA applied successfully.")
50
  except Exception as e:
51
+ print(f" Failed to load LoRA: {e}")
 
 
52
 
53
  MOD_VALUE = 32
54
  DEFAULT_H_SLIDER_VALUE = 576 # FusionX optimized default