GiorgioV commited on
Commit
c6b278a
·
verified ·
1 Parent(s): ff89f6c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -17
app.py CHANGED
@@ -87,20 +87,20 @@ pipe.load_lora_weights(
87
 
88
 
89
  ## 2 attempt
90
- pipe.load_lora_weights(
91
- "rahul7star/wan2.2Lora",
92
- weight_name="wan2.2_i2v_highnoise_pov_missionary_v1.0.safetensors",
93
- adapter_name="high_noise_lora1",
94
- token=os.environ.get("HF_TOKEN")
95
- )
96
- # 新增:加载你提供的low noise LoRA
97
- pipe.load_lora_weights(
98
- "rahul7star/wan2.2Lora",
99
- weight_name="wan2.2_i2v_lownoise_pov_missionary_v1.0.safetensors",
100
- adapter_name="low_noise_lora1",
101
- token=os.environ.get("HF_TOKEN"),
102
- load_into_transformer_2=True
103
- )
104
 
105
 
106
 
@@ -140,11 +140,11 @@ pipe.load_lora_weights(
140
 
141
 
142
 
143
- pipe.set_adapters(["lightx2v", "lightx2v_2", "high_noise_lora", "low_noise_lora","high_noise_lora1", "low_noise_lora1"], adapter_weights=[1.5, 1., 1., 1.,1.,1.])
144
  # 修改了lora_scale
145
- pipe.fuse_lora(adapter_names=["lightx2v", "high_noise_lora","high_noise_lora1"], lora_scales=[3.0, 3.0,3.0], components=["transformer"])
146
  # 修改了lora_scale
147
- pipe.fuse_lora(adapter_names=["lightx2v_2", "low_noise_lora","low_noise_lora1"], lora_scales=[1.0, 1.0,1.0], components=["transformer_2"])
148
 
149
 
150
 
 
87
 
88
 
89
  ## 2 attempt
90
+ # pipe.load_lora_weights(
91
+ # "rahul7star/wan2.2Lora",
92
+ # weight_name="wan2.2_i2v_highnoise_pov_missionary_v1.0.safetensors",
93
+ # adapter_name="high_noise_lora1",
94
+ # token=os.environ.get("HF_TOKEN")
95
+ # )
96
+ # # 新增:加载你提供的low noise LoRA
97
+ # pipe.load_lora_weights(
98
+ # "rahul7star/wan2.2Lora",
99
+ # weight_name="wan2.2_i2v_lownoise_pov_missionary_v1.0.safetensors",
100
+ # adapter_name="low_noise_lora1",
101
+ # token=os.environ.get("HF_TOKEN"),
102
+ # load_into_transformer_2=True
103
+ # )
104
 
105
 
106
 
 
140
 
141
 
142
 
143
+ pipe.set_adapters(["lightx2v", "lightx2v_2", "high_noise_lora", "low_noise_lora"], adapter_weights=[1.5, 1., 1., 1.])
144
  # 修改了lora_scale
145
+ pipe.fuse_lora(adapter_names=["lightx2v", "high_noise_lora"], lora_scales=[3.0, 3.0], components=["transformer"])
146
  # 修改了lora_scale
147
+ pipe.fuse_lora(adapter_names=["lightx2v_2", "low_noise_lora"], lora_scales=[1.0, 1.0], components=["transformer_2"])
148
 
149
 
150