Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1 |
---
|
2 |
license: mit
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
+
tags:
|
4 |
+
- stable-diffusion
|
5 |
---
|
6 |
+
|
7 |
+
[ACertainty](https://huggingface.co/JosephusCheung/ACertainty)をLatent Consistency Modelの手法で蒸留して4~8ステップほどで生成できるようにしました。性能はまだまだという感じです。
|
8 |
+
|
9 |
+
```py
|
10 |
+
from diffusers import DiffusionPipeline
|
11 |
+
import torch
|
12 |
+
|
13 |
+
pipe = DiffusionPipeline.from_pretrained("furusu/LCM-ACertainty", custom_pipeline="latent_consistency_txt2img", custom_revision="main")
|
14 |
+
pipe.to(torch_device="cuda", torch_dtype=torch.float16)
|
15 |
+
|
16 |
+
prompt = "anime, masterpiece, best quality, 1girl, solo, blush, sitting, twintails, blonde hair, bowtie, school uniforme, nature"
|
17 |
+
|
18 |
+
num_inference_steps =4
|
19 |
+
images = pipe(prompt=prompt, num_inference_steps=num_inference_steps, guidance_scale=5.0, lcm_origin_steps=50, height=768, width=768, output_type="pil").images
|
20 |
+
|
21 |
+
image[0].save("./aaaaa.png")
|
22 |
+
```
|