mswhite commited on
Commit
28dca47
·
1 Parent(s): 6f3e119

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -16,7 +16,7 @@ import gradio as gr
16
  import torch
17
  from diffusers import StableDiffusionPipeline
18
 
19
- pipe = StableDiffusionPipeline.from_pretrained("mswhite/miamivice", torch_dtype=torch.float16)
20
  pipe = pipe.to("cuda")
21
 
22
  #prompt = "a photo of an astronaut riding a horse on mars"
@@ -26,7 +26,7 @@ pipe = pipe.to("cuda")
26
  def nagelize(text):
27
  prompt = "p_nagel illustration of " + text
28
  print(prompt)
29
- return pipe(prompt)[0]["image"]
30
 
31
  def clear(text):
32
  return gr.Image.update()
 
16
  import torch
17
  from diffusers import StableDiffusionPipeline
18
 
19
+ pipe = StableDiffusionPipeline.from_pretrained("mswhite/miamivice", torch_dtype=torch.float16, safety_checker=None)
20
  pipe = pipe.to("cuda")
21
 
22
  #prompt = "a photo of an astronaut riding a horse on mars"
 
26
  def nagelize(text):
27
  prompt = "p_nagel illustration of " + text
28
  print(prompt)
29
+ return pipe(prompt).images[0]
30
 
31
  def clear(text):
32
  return gr.Image.update()