Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,74 @@
|
|
1 |
-
---
|
2 |
-
license: creativeml-openrail-m
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: creativeml-openrail-m
|
3 |
+
base_model: stabilityai/stable-diffusion-xl-base-1.0
|
4 |
+
pipeline_tag: text-to-image
|
5 |
+
library_name: diffusers
|
6 |
+
tags:
|
7 |
+
- art
|
8 |
+
- text-to-image
|
9 |
+
- stable-diffusion
|
10 |
+
- lora
|
11 |
+
- diffusers
|
12 |
+
widget:
|
13 |
+
- text: chibi doll, cute
|
14 |
+
---
|
15 |
+
|
16 |
+
# cutton_doll_lora-xl
|
17 |
+
|
18 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/64366a453193f279361ced90/_hPyQqPAkHWyaCHoPzxXQ.png)
|
19 |
+
|
20 |
+
|
21 |
+
|
22 |
+
|
23 |
+
### Need more performance?
|
24 |
+
Use it with a LCM Lora!
|
25 |
+
|
26 |
+
Use 8 steps and guidance scale of 1.5
|
27 |
+
1.2 Lora strength for the Pixel Art XL works better
|
28 |
+
|
29 |
+
```python
|
30 |
+
from diffusers import DiffusionPipeline, LCMScheduler
|
31 |
+
import torch
|
32 |
+
|
33 |
+
model_id = "stabilityai/stable-diffusion-xl-base-1.0"
|
34 |
+
lcm_lora_id = "latent-consistency/lcm-lora-sdxl"
|
35 |
+
pipe = DiffusionPipeline.from_pretrained(model_id, variant="fp16")
|
36 |
+
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
|
37 |
+
|
38 |
+
pipe.load_lora_weights(lcm_lora_id, adapter_name="lora")
|
39 |
+
pipe.load_lora_weights("./cutton_doll_lora-xl.safetensors", adapter_name="pixel")
|
40 |
+
|
41 |
+
pipe.set_adapters(["lora", "pixel"], adapter_weights=[1.0, 1.2])
|
42 |
+
pipe.to(device="cuda", dtype=torch.float16)
|
43 |
+
|
44 |
+
prompt = "pixel, a cute corgi"
|
45 |
+
negative_prompt = "3d render, realistic"
|
46 |
+
|
47 |
+
num_images = 9
|
48 |
+
|
49 |
+
for i in range(num_images):
|
50 |
+
img = pipe(
|
51 |
+
prompt=prompt,
|
52 |
+
negative_prompt=negative_prompt,
|
53 |
+
num_inference_steps=8,
|
54 |
+
guidance_scale=1.5,
|
55 |
+
).images[0]
|
56 |
+
|
57 |
+
img.save(f"lcm_lora_{i}.png")
|
58 |
+
```
|
59 |
+
|
60 |
+
### Tips:
|
61 |
+
Don't use refiner
|
62 |
+
|
63 |
+
Works great with only 1 text encoder
|
64 |
+
|
65 |
+
No style prompt required
|
66 |
+
|
67 |
+
No trigger keyword require
|
68 |
+
|
69 |
+
Works great with isometric and non-isometric
|
70 |
+
|
71 |
+
Works with 0.9 and 1.0
|
72 |
+
|
73 |
+
#### Changelog
|
74 |
+
v1: Initial release
|