CyranoB commited on
Commit
e4e61fc
·
1 Parent(s): 87ea128

Enable GPU

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -113,7 +113,7 @@ def check_nsfw_images(
113
  return images, has_nsfw_concepts
114
 
115
  # Function
116
- #@spaces.GPU(enable_queue=True)
117
  def generate_image(prompt, ckpt, aspect_ratio, mode):
118
  width, height = calculate_resolution(aspect_ratio, mode) # Calculate resolution based on the aspect ratio
119
  checkpoint = checkpoints[ckpt][0]
@@ -172,4 +172,4 @@ with gr.Blocks(css="style.css") as demo:
172
  example_dropdown = gr.Dropdown(label='Select an Example', choices=[e["prompt"] for e in examples])
173
  example_dropdown.change(fn=set_example, inputs=example_dropdown, outputs=[prompt, ckpt, aspect, mode])
174
 
175
- demo.queue().launch()
 
113
  return images, has_nsfw_concepts
114
 
115
  # Function
116
+ @spaces.GPU(enable_queue=True)
117
  def generate_image(prompt, ckpt, aspect_ratio, mode):
118
  width, height = calculate_resolution(aspect_ratio, mode) # Calculate resolution based on the aspect ratio
119
  checkpoint = checkpoints[ckpt][0]
 
172
  example_dropdown = gr.Dropdown(label='Select an Example', choices=[e["prompt"] for e in examples])
173
  example_dropdown.change(fn=set_example, inputs=example_dropdown, outputs=[prompt, ckpt, aspect, mode])
174
 
175
+ demo.queue().launch()