Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
|
| 2 |
import gradio as gr
|
| 3 |
import torch
|
| 4 |
from diffusers import StableDiffusionXLPipeline, UNet2DConditionModel
|
|
@@ -79,7 +79,7 @@ if SAFETY_CHECKER:
|
|
| 79 |
return images, has_nsfw_concepts
|
| 80 |
|
| 81 |
|
| 82 |
-
|
| 83 |
def generate_image(
|
| 84 |
prompt,
|
| 85 |
negative_prompt,
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
import gradio as gr
|
| 3 |
import torch
|
| 4 |
from diffusers import StableDiffusionXLPipeline, UNet2DConditionModel
|
|
|
|
| 79 |
return images, has_nsfw_concepts
|
| 80 |
|
| 81 |
|
| 82 |
+
@spaces.GPU(enable_queue=True)
|
| 83 |
def generate_image(
|
| 84 |
prompt,
|
| 85 |
negative_prompt,
|