Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -72,14 +72,14 @@ 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 |
"GiorgioV/LoRA_for_WAN_22",
|
| 82 |
-
weight_name="
|
| 83 |
adapter_name="low_noise_lora",
|
| 84 |
token=os.environ.get("HF_TOKEN"),
|
| 85 |
load_into_transformer_2=True
|
|
@@ -88,59 +88,29 @@ pipe.load_lora_weights(
|
|
| 88 |
|
| 89 |
pipe.load_lora_weights(
|
| 90 |
"GiorgioV/LoRA_for_WAN_22",
|
| 91 |
-
weight_name="
|
| 92 |
adapter_name="high_noise_lora1",
|
| 93 |
token=os.environ.get("HF_TOKEN")
|
| 94 |
)
|
| 95 |
# 新增:加载你提供的low noise LoRA
|
| 96 |
pipe.load_lora_weights(
|
| 97 |
"GiorgioV/LoRA_for_WAN_22",
|
| 98 |
-
weight_name="
|
| 99 |
adapter_name="low_noise_lora1",
|
| 100 |
token=os.environ.get("HF_TOKEN"),
|
| 101 |
load_into_transformer_2=True
|
| 102 |
)
|
| 103 |
|
| 104 |
-
pipe.load_lora_weights(
|
| 105 |
-
"KeyOpening8063587/ZoomRevealI2V",
|
| 106 |
-
weight_name="wan22-zoom-reveal-400epoc-high-k3nk.safetensors",
|
| 107 |
-
adapter_name="high_noise_lora2",
|
| 108 |
-
token=os.environ.get("HF_TOKEN")
|
| 109 |
-
)
|
| 110 |
-
# 新增:加载你提供的low noise LoRA
|
| 111 |
-
pipe.load_lora_weights(
|
| 112 |
-
"KeyOpening8063587/ZoomRevealI2V",
|
| 113 |
-
weight_name="wan22-zoom-reveal-295epoc-low-k3nk.safetensors",
|
| 114 |
-
adapter_name="low_noise_lora2",
|
| 115 |
-
token=os.environ.get("HF_TOKEN"),
|
| 116 |
-
load_into_transformer_2=True
|
| 117 |
-
)
|
| 118 |
|
| 119 |
pipe.set_adapters(["lightx2v", "lightx2v_2",
|
| 120 |
"high_noise_lora", "low_noise_lora",
|
| 121 |
-
"high_noise_lora1", "low_noise_lora1",
|
| 122 |
-
"high_noise_lora2", "low_noise_lora2"], adapter_weights=[1., 1., 0.3, 0.3, 1., 1., 0.6, 0.6])
|
| 123 |
# 修改了lora_scale
|
| 124 |
-
pipe.fuse_lora(adapter_names=["lightx2v", "high_noise_lora", "high_noise_lora1"
|
| 125 |
# 修改了lora_scale
|
| 126 |
-
pipe.fuse_lora(adapter_names=["lightx2v_2", "low_noise_lora", "low_noise_lora1"
|
| 127 |
|
| 128 |
-
#######
|
| 129 |
|
| 130 |
-
#pipe.load_lora_weights(
|
| 131 |
-
# "KeyOpening8063587/ZoomRevealI2V",
|
| 132 |
-
# weight_name="wan22-zoom-reveal-400epoc-high-k3nk.safetensors",
|
| 133 |
-
# adapter_name="high_noise_lora2",
|
| 134 |
-
# token=os.environ.get("HF_TOKEN")
|
| 135 |
-
#)
|
| 136 |
-
# 新增:加载你提供的low noise LoRA
|
| 137 |
-
#pipe.load_lora_weights(
|
| 138 |
-
# "KeyOpening8063587/ZoomRevealI2V",
|
| 139 |
-
# weight_name="wan22-zoom-reveal-295epoc-low-k3nk.safetensors",
|
| 140 |
-
# adapter_name="low_noise_lora2",
|
| 141 |
-
# token=os.environ.get("HF_TOKEN"),
|
| 142 |
-
# load_into_transformer_2=True
|
| 143 |
-
#)
|
| 144 |
|
| 145 |
########testing all. 4 together
|
| 146 |
|
|
|
|
| 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 |
"GiorgioV/LoRA_for_WAN_22",
|
| 82 |
+
weight_name="DR34ML4Y_I2V_14B_LOW.safetensors",
|
| 83 |
adapter_name="low_noise_lora",
|
| 84 |
token=os.environ.get("HF_TOKEN"),
|
| 85 |
load_into_transformer_2=True
|
|
|
|
| 88 |
|
| 89 |
pipe.load_lora_weights(
|
| 90 |
"GiorgioV/LoRA_for_WAN_22",
|
| 91 |
+
weight_name="wan-doubleblowjob-70epo-k3nk.safetensors",
|
| 92 |
adapter_name="high_noise_lora1",
|
| 93 |
token=os.environ.get("HF_TOKEN")
|
| 94 |
)
|
| 95 |
# 新增:加载你提供的low noise LoRA
|
| 96 |
pipe.load_lora_weights(
|
| 97 |
"GiorgioV/LoRA_for_WAN_22",
|
| 98 |
+
weight_name="wan-doubleblowjob-70epo-k3nk.safetensors",
|
| 99 |
adapter_name="low_noise_lora1",
|
| 100 |
token=os.environ.get("HF_TOKEN"),
|
| 101 |
load_into_transformer_2=True
|
| 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., 1., 1.])
|
|
|
|
| 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 |
|
| 115 |
########testing all. 4 together
|
| 116 |
|