Spaces:
Runtime error
Runtime error
TenPoisk commited on
Commit ·
380cf04
1
Parent(s): 4a6e7f0
Create midjourney.py
Browse files- midjourney.py +8 -0
midjourney.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from diffusers import StableDiffusionPipeline
|
| 2 |
+
import torch
|
| 3 |
+
model_id = "prompthero/openjourney"
|
| 4 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
| 5 |
+
pipe = pipe.to("cuda")
|
| 6 |
+
prompt = "retro serie of different cars with different colors and shapes, mdjrny-v4 style"
|
| 7 |
+
image = pipe(prompt).images[0]
|
| 8 |
+
image.save("./retro_cars.png")
|