rahul7star commited on
Commit
2bbd278
ยท
verified ยท
1 Parent(s): e2b310d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -23
app.py CHANGED
@@ -55,30 +55,34 @@ pipe = WanPipeline.from_pretrained(MODEL_ID,
55
 
56
  # ## TEST LORA
57
 
58
- # pipe.load_lora_weights(
59
- # "rahul7star/wan2.2Lora",
60
- # weight_name="DR34ML4Y_I2V_14B_HIGH.safetensors",
61
- # adapter_name="high_noise_lora",
62
- # token=os.environ.get("HF_TOKEN")
63
- # )
64
- # # ๆ–ฐๅขž๏ผšๅŠ ่ฝฝไฝ ๆไพ›็š„low noise LoRA
65
- # pipe.load_lora_weights(
66
- # "rahul7star/wan2.2Lora",
67
- # weight_name="DR34ML4Y_I2V_14B_LOW.safetensors",
68
- # adapter_name="low_noise_lora",
69
- # token=os.environ.get("HF_TOKEN"),
70
- # load_into_transformer_2=True
71
- # )
72
-
73
-
74
-
75
- # pipe.set_adapters(["lightning", "lightning_2", "high_noise_lora", "low_noise_lora"], adapter_weights=[1., 1., 1., 1.])
76
- # # ไฟฎๆ”นไบ†lora_scale
77
- # pipe.fuse_lora(adapter_names=["lightning", "high_noise_lora"], lora_scales=[3.0, 3.0], components=["transformer"])
78
- # # ไฟฎๆ”นไบ†lora_scale
79
- # pipe.fuse_lora(adapter_names=["lightning_2", "low_noise_lora"], lora_scales=[1.0, 1.0], components=["transformer_2"])
80
- # pipe.unload_lora_weights()
81
  # ##
 
 
 
 
82
 
83
  for i in range(3):
84
  gc.collect()
 
55
 
56
  # ## TEST LORA
57
 
58
+ pipe.load_lora_weights(
59
+ "wangkanai/wan22-fp8-loras-nsfw",
60
+ weight_name="loras/wan/wan22-action-doggystyle-t2v-14b-high.safetensors",
61
+ adapter_name="high_noise_lora",
62
+ token=os.environ.get("HF_TOKEN")
63
+ )
64
+ # ๆ–ฐๅขž๏ผšๅŠ ่ฝฝไฝ ๆไพ›็š„low noise LoRA
65
+ pipe.load_lora_weights(
66
+ "wangkanai/wan22-fp8-loras-nsfw",
67
+ weight_name="loras/wan/wan22-action-doggystyle-t2v-14b-low.safetensors",
68
+ adapter_name="low_noise_lora",
69
+ token=os.environ.get("HF_TOKEN"),
70
+ load_into_transformer_2=True
71
+ )
72
+
73
+
74
+
75
+ pipe.set_adapters(["lightning", "lightning_2", "high_noise_lora", "low_noise_lora"], adapter_weights=[1., 1., 1., 1.])
76
+ # ไฟฎๆ”นไบ†lora_scale
77
+ pipe.fuse_lora(adapter_names=["lightning", "high_noise_lora"], lora_scales=[3.0, 3.0], components=["transformer"])
78
+ # ไฟฎๆ”นไบ†lora_scale
79
+ pipe.fuse_lora(adapter_names=["lightning_2", "low_noise_lora"], lora_scales=[1.0, 1.0], components=["transformer_2"])
80
+ pipe.unload_lora_weights()
81
  # ##
82
+ # ## TEST LORA ENDS
83
+
84
+
85
+
86
 
87
  for i in range(3):
88
  gc.collect()