patrickvonplaten
commited on
Commit
•
63d3bf3
1
Parent(s):
7467e65
up
Browse files- astronaut_riding_horse_text2image.npy +3 -0
- test.py +18 -0
astronaut_riding_horse_text2image.npy
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:04acc2fad3c2777a424365d5859825a800b6ba68b48f4db95f7f8aebddc63318
|
3 |
+
size 3145856
|
test.py
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python3
|
2 |
+
import torch
|
3 |
+
from diffusers import StableDiffusionPipeline
|
4 |
+
|
5 |
+
torch_device = "cuda"
|
6 |
+
|
7 |
+
model_id = "CompVis/stable-diffusion-v1-4"
|
8 |
+
pipe = StableDiffusionPipeline.from_pretrained(
|
9 |
+
model_id,
|
10 |
+
use_auth_token=True,
|
11 |
+
)
|
12 |
+
pipe.to(torch_device)
|
13 |
+
|
14 |
+
prompt = "A fantasy landscape, trending on artstation"
|
15 |
+
generator = torch.Generator(device=torch_device).manual_seed(0)
|
16 |
+
output = pipe(prompt=prompt, guidance_scale=7.5, generator=generator, output_type="np")
|
17 |
+
|
18 |
+
import ipdb; ipdb.set_trace()
|