cbensimon HF staff commited on
Commit
a56d2da
β€’
1 Parent(s): 897989b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -0
README.md CHANGED
@@ -69,6 +69,22 @@ gr.Interface(
69
 
70
  Note that `@spaces.GPU` is effect-free and can be safely used on non-ZeroGPU environments
71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  # Early access
73
 
74
  Feel free to join this organization if you want to try ZeroGPU as a Space author. βœ‹ We should accept you shortly after checking your HF profile
 
69
 
70
  Note that `@spaces.GPU` is effect-free and can be safely used on non-ZeroGPU environments
71
 
72
+ ## Duration
73
+
74
+ If you expect your GPU function to take more than __60s__ then you need to specify a `duration` param in the decorator like:
75
+
76
+ ```python
77
+ @spaces.GPU(duration=120)
78
+ def generate(prompt):
79
+ return pipe(prompt).images
80
+ ```
81
+
82
+ It will set the maximum duration of your function call to 120s.
83
+
84
+ You can also specify a duration if you know that your function will take far less than the 60s default.
85
+
86
+ The lower the duration, the higher priority your Space visitors will have in the queue
87
+
88
  # Early access
89
 
90
  Feel free to join this organization if you want to try ZeroGPU as a Space author. βœ‹ We should accept you shortly after checking your HF profile