rahul7star commited on
Commit
286fc99
·
verified ·
1 Parent(s): 79c330b

Update app_lora.py

Browse files
Files changed (1) hide show
  1. 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
- causvid_path = hf_hub_download(repo_id=LORA_REPO_ID, filename=LORA_FILENAME)
28
- pipe.load_lora_weights(causvid_path, adapter_name="causvid_lora")
29
- pipe.set_adapters(["causvid_lora"], adapter_weights=[0.75])
30
- pipe.fuse_lora()
 
 
 
 
 
 
 
 
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