tommy24 commited on
Commit
d93853b
·
1 Parent(s): 96b603c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -18
app.py CHANGED
@@ -2,23 +2,11 @@
2
 
3
  # gr.Interface.load("models/prompthero/openjourney").launch()
4
 
5
- # from diffusers import StableDiffusionPipeline
6
- # import torch
7
- # model_id = "prompthero/openjourney"
8
- # pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
9
- # pipe = pipe.to("")
10
- # prompt = "retro serie of different cars with different colors and shapes, mdjrny-v4 style"
11
- # image = pipe(prompt).images[0]
12
- # print(image)
13
-
14
- from diffusers import StableDiffusionOnnxPipeline
15
-
16
- pipe = StableDiffusionOnnxPipeline.from_pretrained(
17
- "runwayml/stable-diffusion-v1-5",
18
- revision="onnx",
19
- provider="CUDAExecutionProvider",
20
- )
21
-
22
- prompt = "a photo of an astronaut riding a horse on mars"
23
  image = pipe(prompt).images[0]
24
  print(image)
 
2
 
3
  # gr.Interface.load("models/prompthero/openjourney").launch()
4
 
5
+ from diffusers import StableDiffusionPipeline
6
+ import torch
7
+ model_id = "prompthero/openjourney"
8
+ pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
9
+ pipe = pipe.to("cuda")
10
+ prompt = "retro serie of different cars with different colors and shapes, mdjrny-v4 style"
 
 
 
 
 
 
 
 
 
 
 
 
11
  image = pipe(prompt).images[0]
12
  print(image)