Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,11 @@
|
|
1 |
-
from diffusers import DiffusionPipeline
|
2 |
import spaces
|
|
|
3 |
import gradio as gr
|
4 |
import torch
|
5 |
|
6 |
pipe = DiffusionPipeline.from_pretrained("Fucius/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16")
|
7 |
pipe.to('cuda')
|
8 |
|
9 |
-
|
10 |
@spaces.GPU
|
11 |
def generate(prompt):
|
12 |
return pipe(prompt).images
|
|
|
|
|
1 |
import spaces
|
2 |
+
from diffusers import DiffusionPipeline
|
3 |
import gradio as gr
|
4 |
import torch
|
5 |
|
6 |
pipe = DiffusionPipeline.from_pretrained("Fucius/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16")
|
7 |
pipe.to('cuda')
|
8 |
|
|
|
9 |
@spaces.GPU
|
10 |
def generate(prompt):
|
11 |
return pipe(prompt).images
|