Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -85,14 +85,30 @@ pipe.load_lora_weights(
|
|
| 85 |
load_into_transformer_2=True
|
| 86 |
)
|
| 87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
|
| 90 |
pipe.set_adapters(["lightx2v", "lightx2v_2",
|
| 91 |
-
"high_noise_lora", "low_noise_lora"
|
|
|
|
| 92 |
# 修改了lora_scale
|
| 93 |
-
pipe.fuse_lora(adapter_names=["lightx2v", "high_noise_lora"], lora_scales=[3.0, 3.0], components=["transformer"])
|
| 94 |
# 修改了lora_scale
|
| 95 |
-
pipe.fuse_lora(adapter_names=["lightx2v_2", "low_noise_lora"], lora_scales=[1.0, 1.0], components=["transformer_2"])
|
| 96 |
|
| 97 |
|
| 98 |
|
|
|
|
| 85 |
load_into_transformer_2=True
|
| 86 |
)
|
| 87 |
|
| 88 |
+
pipe.load_lora_weights(
|
| 89 |
+
"GiorgioV/LoRA_for_WAN_22",
|
| 90 |
+
weight_name="DR34ML4Y_I2V_14B_HIGH.safetensors",
|
| 91 |
+
adapter_name="high_noise_lora1",
|
| 92 |
+
token=os.environ.get("HF_TOKEN")
|
| 93 |
+
)
|
| 94 |
+
# 新增:加载你提供的low noise LoRA
|
| 95 |
+
pipe.load_lora_weights(
|
| 96 |
+
"GiorgioV/LoRA_for_WAN_22",
|
| 97 |
+
weight_name="DR34ML4Y_I2V_14B_LOW.safetensors",
|
| 98 |
+
adapter_name="low_noise_lora1",
|
| 99 |
+
token=os.environ.get("HF_TOKEN"),
|
| 100 |
+
load_into_transformer_2=True
|
| 101 |
+
)
|
| 102 |
+
|
| 103 |
|
| 104 |
|
| 105 |
pipe.set_adapters(["lightx2v", "lightx2v_2",
|
| 106 |
+
"high_noise_lora", "low_noise_lora",
|
| 107 |
+
"high_noise_lora1", "low_noise_lora1"], adapter_weights=[1., 1., 0.3, 0.3, 0.8, 0.8])
|
| 108 |
# 修改了lora_scale
|
| 109 |
+
pipe.fuse_lora(adapter_names=["lightx2v", "high_noise_lora", "high_noise_lora1"], lora_scales=[3.0, 3.0, 3.0], components=["transformer"])
|
| 110 |
# 修改了lora_scale
|
| 111 |
+
pipe.fuse_lora(adapter_names=["lightx2v_2", "low_noise_lora", "low_noise_lora1"], lora_scales=[1.0, 1.0, 1.0], components=["transformer_2"])
|
| 112 |
|
| 113 |
|
| 114 |
|