Update app.py
Browse files
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]
|
| 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()
|