Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -72,43 +72,27 @@ pipe.load_lora_weights(
|
|
| 72 |
|
| 73 |
pipe.load_lora_weights(
|
| 74 |
"GiorgioV/LoRA_for_WAN_22",
|
| 75 |
-
weight_name="
|
| 76 |
adapter_name="high_noise_lora",
|
| 77 |
token=os.environ.get("HF_TOKEN")
|
| 78 |
)
|
| 79 |
# 新增:加载你提供的low noise LoRA
|
| 80 |
pipe.load_lora_weights(
|
| 81 |
-
"
|
| 82 |
-
weight_name="
|
| 83 |
adapter_name="low_noise_lora",
|
| 84 |
token=os.environ.get("HF_TOKEN"),
|
| 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.5, 1., 1., 1., 0., 0.])
|
| 108 |
# 修改了lora_scale
|
| 109 |
-
pipe.fuse_lora(adapter_names=["lightx2v", "high_noise_lora"
|
| 110 |
# 修改了lora_scale
|
| 111 |
-
pipe.fuse_lora(adapter_names=["lightx2v_2", "low_noise_lora"
|
| 112 |
|
| 113 |
|
| 114 |
|
|
|
|
| 72 |
|
| 73 |
pipe.load_lora_weights(
|
| 74 |
"GiorgioV/LoRA_for_WAN_22",
|
| 75 |
+
weight_name="DR34ML4Y_I2V_14B_HIGH.safetensors",
|
| 76 |
adapter_name="high_noise_lora",
|
| 77 |
token=os.environ.get("HF_TOKEN")
|
| 78 |
)
|
| 79 |
# 新增:加载你提供的low noise LoRA
|
| 80 |
pipe.load_lora_weights(
|
| 81 |
+
"Passman22231/DR34ML4Y_I2V_14B_LOW_V2",
|
| 82 |
+
weight_name="DR34ML4Y_I2V_14B_LOW_V2.safetensors",
|
| 83 |
adapter_name="low_noise_lora",
|
| 84 |
token=os.environ.get("HF_TOKEN"),
|
| 85 |
load_into_transformer_2=True
|
| 86 |
)
|
| 87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
|
| 90 |
pipe.set_adapters(["lightx2v", "lightx2v_2",
|
| 91 |
+
"high_noise_lora", "low_noise_lora"], adapter_weights=[1.5, 1., 1.5, 1.5])
|
|
|
|
| 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 |
|