jacksao commited on
Commit
a9fb7d6
1 Parent(s): 35d75f2

Create APP.py

Browse files
Files changed (1) hide show
  1. APP.py +14 -0
APP.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from torch import autocast
3
+ from diffusers import StableDiffusionPipeline
4
+
5
+ pipe = StableDiffusionPipeline.from_pretrained(
6
+ 'hakurei/waifu-diffusion',
7
+ torch_dtype=torch.float32
8
+ ).to('cuda')
9
+
10
+ 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"
11
+ with autocast("cuda"):
12
+ image = pipe(prompt, guidance_scale=6)["sample"][0]
13
+
14
+ image.save("test.png")