Spaces:
Sleeping
Sleeping
PseudoTerminal X
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,7 +2,7 @@ import spaces, torch
|
|
| 2 |
from diffusers import DiffusionPipeline
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
-
pipe = DiffusionPipeline.from_pretrained('ptx0/terminus-xl-velocity-v2', torch_dtype=torch.
|
| 6 |
#pipe.unet = torch.compile(pipe.unet)
|
| 7 |
pipe.to('cuda')
|
| 8 |
|
|
@@ -10,9 +10,10 @@ pipe.to('cuda')
|
|
| 10 |
def generate(prompt):
|
| 11 |
return pipe(
|
| 12 |
prompt,
|
|
|
|
| 13 |
guidance_rescale=0.7,
|
| 14 |
-
guidance_scale=
|
| 15 |
-
num_inference_steps=
|
| 16 |
).images
|
| 17 |
|
| 18 |
gr.Interface(
|
|
|
|
| 2 |
from diffusers import DiffusionPipeline
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
+
pipe = DiffusionPipeline.from_pretrained('ptx0/terminus-xl-velocity-v2', torch_dtype=torch.bfloat16)
|
| 6 |
#pipe.unet = torch.compile(pipe.unet)
|
| 7 |
pipe.to('cuda')
|
| 8 |
|
|
|
|
| 10 |
def generate(prompt):
|
| 11 |
return pipe(
|
| 12 |
prompt,
|
| 13 |
+
negative_prompt="underexposed, blurry, ugly, washed-out",
|
| 14 |
guidance_rescale=0.7,
|
| 15 |
+
guidance_scale=9.5,
|
| 16 |
+
num_inference_steps=30,
|
| 17 |
).images
|
| 18 |
|
| 19 |
gr.Interface(
|