Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
|
@@ -17,10 +17,6 @@ from utils import (
|
|
| 17 |
vignette_loss, get_concept_embedding, load_concept_library, image_grid
|
| 18 |
)
|
| 19 |
|
| 20 |
-
@spaces.GPU(enable_queue=True)
|
| 21 |
-
def space(demo, **kwargs):
|
| 22 |
-
demo.queue(concurrency_count=1, max_size=10)
|
| 23 |
-
return demo
|
| 24 |
|
| 25 |
# Set device
|
| 26 |
device = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
|
|
@@ -244,7 +240,7 @@ def generate_style_grid(prompt, seed=42, num_inference_steps=30, guidance_scale=
|
|
| 244 |
return grid
|
| 245 |
|
| 246 |
# Define Gradio interface
|
| 247 |
-
@
|
| 248 |
def create_demo():
|
| 249 |
with gr.Blocks(title="Guided Stable Diffusion with Styles") as demo:
|
| 250 |
gr.Markdown("# Guided Stable Diffusion with Styles")
|
|
|
|
| 17 |
vignette_loss, get_concept_embedding, load_concept_library, image_grid
|
| 18 |
)
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
# Set device
|
| 22 |
device = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
|
|
|
|
| 240 |
return grid
|
| 241 |
|
| 242 |
# Define Gradio interface
|
| 243 |
+
@spaces.GPU(enable_queue=True)
|
| 244 |
def create_demo():
|
| 245 |
with gr.Blocks(title="Guided Stable Diffusion with Styles") as demo:
|
| 246 |
gr.Markdown("# Guided Stable Diffusion with Styles")
|