thankfulcarp commited on
Commit
7d3e4a8
·
1 Parent(s): 0de16d8

Trying to get the lora to load properly

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -33,21 +33,18 @@ pipe = WanImageToVideoPipeline.from_pretrained(
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
 
 
33
  pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=8.0)
34
  pipe.to("cuda")
35
 
36
+ # Load 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
+ # Load the LoRA weights into the transformer model component
44
  pipe.load_lora_weights(lora_path, adapter_name="fusionx")
45
+ # Set the adapter to be active
46
+ pipe.set_adapters(["fusionx"])
47
+ print("✅ FusionX LoRA loaded and activated. Use the slider to control its strength.")
48
  except Exception as e:
49
  print(f"⚠️ FusionX LoRA not loaded: {e}")
50