Spaces:
Runtime error
Runtime error
Update app_lora.py
Browse files- app_lora.py +12 -4
app_lora.py
CHANGED
|
@@ -24,10 +24,18 @@ pipe = WanImageToVideoPipeline.from_pretrained(
|
|
| 24 |
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=8.0)
|
| 25 |
pipe.to("cuda")
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
MOD_VALUE = 32
|
| 33 |
DEFAULT_H_SLIDER_VALUE = 640
|
|
|
|
| 24 |
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=8.0)
|
| 25 |
pipe.to("cuda")
|
| 26 |
|
| 27 |
+
try:
|
| 28 |
+
causvid_path = hf_hub_download(repo_id=LORA_REPO_ID, filename=LORA_FILENAME)
|
| 29 |
+
print("β
LoRA downloaded to:", causvid_path)
|
| 30 |
+
|
| 31 |
+
pipe.load_lora_weights(causvid_path, adapter_name="causvid_lora")
|
| 32 |
+
pipe.set_adapters(["causvid_lora"], adapter_weights=[0.75])
|
| 33 |
+
pipe.fuse_lora()
|
| 34 |
+
|
| 35 |
+
except Exception as e:
|
| 36 |
+
import traceback
|
| 37 |
+
print("β Error during LoRA loading:")
|
| 38 |
+
traceback.print_exc()
|
| 39 |
|
| 40 |
MOD_VALUE = 32
|
| 41 |
DEFAULT_H_SLIDER_VALUE = 640
|