yibolu
commited on
Commit
•
3d9f170
1
Parent(s):
0bb50d9
update readme
Browse files
README.md
CHANGED
@@ -81,7 +81,7 @@ from lyrasd_model import LyraSdTxt2ImgPipeline
|
|
81 |
# LyraSD 的 C++ 编译动态链接库,其中包含 C++ CUDA 计算的细节
|
82 |
lib_path = "./lyrasd_model/lyrasd_lib/libth_lyrasd_cu11_sm80.so"
|
83 |
model_path = "./models/lyrasd_rev_animated"
|
84 |
-
lora_path = "./models/
|
85 |
|
86 |
# 构建 Txt2Img 的 Pipeline
|
87 |
model = LyraSdTxt2ImgPipeline(model_path, lib_path)
|
@@ -130,14 +130,14 @@ from lyrasd_model import LyraSdXLTxt2ImgPipeline
|
|
130 |
# LyraSD 的 C++ 编译动态链接库,其中包含 C++ CUDA 计算的细节
|
131 |
lib_path = "./lyrasd_model/lyrasd_lib/libth_lyrasd_cu11_sm80.so"
|
132 |
model_path = "./models/lyrasd_helloworldSDXL20Fp16"
|
133 |
-
lora_path = "./models/
|
134 |
|
135 |
# 构建 Txt2Img 的 Pipeline
|
136 |
model = LyraSdXLTxt2ImgPipeline(model_path, lib_path)
|
137 |
|
138 |
# load lora
|
139 |
# lora model path, name,lora strength
|
140 |
-
model.load_lora_v2(lora_path, "
|
141 |
|
142 |
# 准备应用的输入和超参数
|
143 |
prompt = "a cat, cute, cartoon, concise, traditional, chinese painting, Tang and Song Dynasties, masterpiece, 4k, 8k, UHD, best quality"
|
@@ -165,7 +165,7 @@ for i, image in enumerate(images):
|
|
165 |
image.save(f"outputs/res_txt2img_xl_lora_{i}.png")
|
166 |
|
167 |
# unload lora,参数为 lora 的名字,是否清除 lora 缓存
|
168 |
-
model.unload_lora_v2("
|
169 |
```
|
170 |
|
171 |
## Demo output
|
|
|
81 |
# LyraSD 的 C++ 编译动态链接库,其中包含 C++ CUDA 计算的细节
|
82 |
lib_path = "./lyrasd_model/lyrasd_lib/libth_lyrasd_cu11_sm80.so"
|
83 |
model_path = "./models/lyrasd_rev_animated"
|
84 |
+
lora_path = "./models/xiaorenshu.safetensors"
|
85 |
|
86 |
# 构建 Txt2Img 的 Pipeline
|
87 |
model = LyraSdTxt2ImgPipeline(model_path, lib_path)
|
|
|
130 |
# LyraSD 的 C++ 编译动态链接库,其中包含 C++ CUDA 计算的细节
|
131 |
lib_path = "./lyrasd_model/lyrasd_lib/libth_lyrasd_cu11_sm80.so"
|
132 |
model_path = "./models/lyrasd_helloworldSDXL20Fp16"
|
133 |
+
lora_path = "./models/dissolve_sdxl.safetensors"
|
134 |
|
135 |
# 构建 Txt2Img 的 Pipeline
|
136 |
model = LyraSdXLTxt2ImgPipeline(model_path, lib_path)
|
137 |
|
138 |
# load lora
|
139 |
# lora model path, name,lora strength
|
140 |
+
model.load_lora_v2(lora_path, "dissolve_sdxl", 0.4)
|
141 |
|
142 |
# 准备应用的输入和超参数
|
143 |
prompt = "a cat, cute, cartoon, concise, traditional, chinese painting, Tang and Song Dynasties, masterpiece, 4k, 8k, UHD, best quality"
|
|
|
165 |
image.save(f"outputs/res_txt2img_xl_lora_{i}.png")
|
166 |
|
167 |
# unload lora,参数为 lora 的名字,是否清除 lora 缓存
|
168 |
+
model.unload_lora_v2("dissolve_sdxl", True)
|
169 |
```
|
170 |
|
171 |
## Demo output
|