Spaces:
Running
on
A10G
Running
on
A10G
BertChristiaens
commited on
Commit
•
82d3087
1
Parent(s):
a877516
queue
Browse files
models.py
CHANGED
@@ -49,6 +49,10 @@ class ControlNetPipeline:
|
|
49 |
self.waiting_queue = []
|
50 |
self.count = 0
|
51 |
|
|
|
|
|
|
|
|
|
52 |
def __call__(self, **kwargs):
|
53 |
self.count += 1
|
54 |
number = self.count
|
@@ -245,6 +249,7 @@ def make_image_controlnet(image: np.ndarray,
|
|
245 |
|
246 |
with catchtime("Controlnet generation total"):
|
247 |
for _, setting in enumerate(prompt_settings):
|
|
|
248 |
with catchtime("Controlnet generation"):
|
249 |
generated_image = pipe(
|
250 |
**setting,
|
|
|
49 |
self.waiting_queue = []
|
50 |
self.count = 0
|
51 |
|
52 |
+
@property
|
53 |
+
def queue_size(self):
|
54 |
+
return len(self.waiting_queue)
|
55 |
+
|
56 |
def __call__(self, **kwargs):
|
57 |
self.count += 1
|
58 |
number = self.count
|
|
|
249 |
|
250 |
with catchtime("Controlnet generation total"):
|
251 |
for _, setting in enumerate(prompt_settings):
|
252 |
+
st.success(f"{pipe.queue_size} images in the queue, can take up to {pipe.queue_size * 20} seconds")
|
253 |
with catchtime("Controlnet generation"):
|
254 |
generated_image = pipe(
|
255 |
**setting,
|