Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
0de16d8
1
Parent(s):
f9dfa50
Lora Fix
Browse files
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.
|
44 |
-
|
45 |
-
|
|
|
46 |
except Exception as e:
|
47 |
-
print(f"⚠️
|
48 |
-
|
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
|