weizengke commited on
Commit
09bfb00
1 Parent(s): 63adf55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -1 +1,8 @@
1
- print("hello happyoj.com")
 
 
 
 
 
 
 
 
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")