Shilpaj commited on
Commit
3f05980
·
verified ·
1 Parent(s): 49370c7

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
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
- @space.GPU(enable_queue=True)
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")