Update README.md
Browse files![FeMcy64akAAS8tu.png](https://s3.amazonaws.com/moonup/production/uploads/1668991690858-63385543e1b783450091910f.png)
README.md
CHANGED
@@ -8,7 +8,20 @@ license: creativeml-openrail-m
|
|
8 |
inference: true
|
9 |
|
10 |
---
|
|
|
|
|
|
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
# waifu-diffusion v1.3 - Diffusion for Weebs
|
13 |
|
14 |
waifu-diffusion is a latent text-to-image diffusion model that has been conditioned on high-quality anime images through fine-tuning.
|
|
|
8 |
inference: true
|
9 |
|
10 |
---
|
11 |
+
import torch
|
12 |
+
from torch import autocast
|
13 |
+
from diffusers import StableDiffusionPipeline
|
14 |
|
15 |
+
pipe = StableDiffusionPipeline.from_pretrained(
|
16 |
+
'hakurei/waifu-diffusion',
|
17 |
+
torch_dtype=torch.float32
|
18 |
+
).to('cuda')
|
19 |
+
|
20 |
+
prompt = "1girl, aqua eyes, baseball cap, blonde hair, closed mouth, earrings, green background, hat, hoop earrings, jewelry, looking at viewer, shirt, short hair, simple background, solo, upper body, yellow shirt"
|
21 |
+
with autocast("cuda"):
|
22 |
+
image = pipe(prompt, guidance_scale=6)["sample"][0]
|
23 |
+
|
24 |
+
image.save("test.png")
|
25 |
# waifu-diffusion v1.3 - Diffusion for Weebs
|
26 |
|
27 |
waifu-diffusion is a latent text-to-image diffusion model that has been conditioned on high-quality anime images through fine-tuning.
|