ShineChen1024
commited on
Commit
•
2128b98
1
Parent(s):
67658b2
Update README.md
Browse files
README.md
CHANGED
@@ -9,12 +9,12 @@ This is the beta version of MiaoBi, a chinese text-to-image model, following the
|
|
9 |
## Diffusers
|
10 |
```py
|
11 |
from diffusers import StableDiffusionPipeline
|
12 |
-
import
|
13 |
-
|
14 |
-
pipe = StableDiffusionPipeline.from_pretrained(
|
15 |
-
pipe
|
16 |
prompt = "一只穿着铠甲的猫"
|
17 |
-
image = pipe(prompt).images[0]
|
18 |
image.save("铠甲猫.png")
|
19 |
```
|
20 |
|
|
|
9 |
## Diffusers
|
10 |
```py
|
11 |
from diffusers import StableDiffusionPipeline
|
12 |
+
from transformers import AutoTokenizer
|
13 |
+
tokenizer = AutoTokenizer.from_pretrained("checkpoints/miaobi_beta0.9/tokenizer", trust_remote_code=True)
|
14 |
+
pipe = StableDiffusionPipeline.from_pretrained("checkpoints/miaobi_beta0.9")
|
15 |
+
pipe.to("cuda")
|
16 |
prompt = "一只穿着铠甲的猫"
|
17 |
+
image = pipe(prompt).images[0]
|
18 |
image.save("铠甲猫.png")
|
19 |
```
|
20 |
|