Create new.py
Browse files
new.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from diffusers import AutoPipelineForText2Image
|
2 |
+
import torch
|
3 |
+
|
4 |
+
pipeline = AutoPipelineForText2Image.from_pretrained(
|
5 |
+
"runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16, variant="fp16"
|
6 |
+
).to("cuda")
|
7 |
+
|
8 |
+
image = pipeline(
|
9 |
+
"stained glass of darth vader, backlight, centered composition, masterpiece, photorealistic, 8k"
|
10 |
+
).images[0]
|
11 |
+
image
|