Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
datasets:
|
3 |
+
- svjack/pokemon-blip-captions-en-zh
|
4 |
+
language:
|
5 |
+
- zh
|
6 |
+
library_name: diffusers
|
7 |
+
tags:
|
8 |
+
- stable-diffusion
|
9 |
+
- lora
|
10 |
+
---
|
11 |
+
# Model Card for svjack/pokemon-sd-lora-zh
|
12 |
+
|
13 |
+
## Installation
|
14 |
+
```bash
|
15 |
+
pip install -U diffusers
|
16 |
+
pip install transformers
|
17 |
+
```
|
18 |
+
|
19 |
+
## Usage
|
20 |
+
```python
|
21 |
+
from diffusers import StableDiffusionPipeline
|
22 |
+
import torch
|
23 |
+
|
24 |
+
'''
|
25 |
+
pipe = StableDiffusionPipeline.from_pretrained("stable-diffusion-v1-2", torch_dtype=torch.float16)
|
26 |
+
model_path = "en_lora_model"
|
27 |
+
'''
|
28 |
+
|
29 |
+
pipe = StableDiffusionPipeline.from_pretrained("Taiyi-Stable-Diffusion-1B-Chinese-v0.1", torch_dtype=torch.float16)
|
30 |
+
model_path = "svjack/pokemon-sd-lora-zh"
|
31 |
+
|
32 |
+
pipe.unet.load_attn_procs(model_path)
|
33 |
+
pipe.to("cuda")
|
34 |
+
pipe.safety_checker = lambda images, clip_input: (images, False)
|
35 |
+
print("have_load")
|
36 |
+
|
37 |
+
prompt = "粉色的蝴蝶。"
|
38 |
+
image = pipe(prompt, num_inference_steps=50, guidance_scale=7.5).images[0]
|
39 |
+
image
|
40 |
+
|
41 |
+
prompt = "黄色的巨石机器人"
|
42 |
+
image = pipe(prompt, num_inference_steps=50, guidance_scale=7.5).images[0]
|
43 |
+
image
|
44 |
+
```
|
45 |
+
|
46 |
+
![0](https://raw.githubusercontent.com/svjack/ControlLoRA-Chinese/main/imgs/zh_pink_butterfly_pokemon.png)
|
47 |
+
![1](https://raw.githubusercontent.com/svjack/ControlLoRA-Chinese/main/imgs/zh_yellow_stone_robot.png)
|
48 |
+
|