cbensimon HF staff commited on
Commit
f284d3f
1 Parent(s): fed1b3d

Enable ZeroGPU queue (beta feature)

Browse files

Instead of the "No GPU is currently available" error, visitors should see a "Waiting for a GPU to become available" message if not GPU is available at the moment

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -16,7 +16,7 @@ pipe = pipe.to("cuda")
16
  pipe.enable_model_cpu_offload()
17
  pipe.enable_vae_slicing()
18
 
19
- @spaces.GPU
20
  def infer(prompt):
21
  print(f"""
22
  —/n
 
16
  pipe.enable_model_cpu_offload()
17
  pipe.enable_vae_slicing()
18
 
19
+ @spaces.GPU(enable_queue=True)
20
  def infer(prompt):
21
  print(f"""
22
  —/n