GiorgioV commited on
Commit
5828a5c
·
verified ·
1 Parent(s): f970386

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -73,9 +73,19 @@ pipe.load_lora_weights(
73
  weight_name="Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank128_bf16.safetensors",
74
  adapter_name="lightx2v_2", **kwargs_lora
75
  )
76
- pipe.set_adapters(["lightx2v", "lightx2v_2"], adapter_weights=[1., 1.])
 
 
 
 
 
 
 
 
 
77
  pipe.fuse_lora(adapter_names=["lightx2v"], lora_scale=3., components=["transformer"])
78
  pipe.fuse_lora(adapter_names=["lightx2v_2"], lora_scale=1., components=["transformer_2"])
 
79
  pipe.unload_lora_weights()
80
 
81
  quantize_(pipe.text_encoder, Int8WeightOnlyConfig())
 
73
  weight_name="Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank128_bf16.safetensors",
74
  adapter_name="lightx2v_2", **kwargs_lora
75
  )
76
+
77
+ kwargs_lora_exp = {}
78
+ kwargs_lora_exp["load_into_transformer_2"] = True
79
+ pipe.load_lora_weights(
80
+ "GiorgioV/LoRA_for_WAN_22",
81
+ weight_name="LoRA_exp.safetensors",
82
+ adapter_name="lora_exp", **kwargs_lora_exp
83
+ )
84
+
85
+ pipe.set_adapters(["lightx2v", "lightx2v_2", "lora_exp"], adapter_weights=[1., 1., 1.])
86
  pipe.fuse_lora(adapter_names=["lightx2v"], lora_scale=3., components=["transformer"])
87
  pipe.fuse_lora(adapter_names=["lightx2v_2"], lora_scale=1., components=["transformer_2"])
88
+ pipe.fuse_lora(adapter_names=["lora_exp"], lora_scale=1., components=["transformer_2"])
89
  pipe.unload_lora_weights()
90
 
91
  quantize_(pipe.text_encoder, Int8WeightOnlyConfig())