Update app.py
Browse files
app.py
CHANGED
@@ -84,7 +84,7 @@ def check_server_ready(port):
|
|
84 |
|
85 |
|
86 |
|
87 |
-
@spaces.GPU(duration=
|
88 |
def generate_image(prompt, image):
|
89 |
prefix_filename = str(random.randint(0, 999999))
|
90 |
prompt = prompt.replace('ComfyUI', prefix_filename)
|
@@ -102,7 +102,7 @@ def generate_image(prompt, image):
|
|
102 |
logger.debug(f'Subprocess started with PID: {process.pid}')
|
103 |
|
104 |
# Ожидание запуска сервера
|
105 |
-
for _ in range(
|
106 |
if check_server_ready(new_port):
|
107 |
break
|
108 |
time.sleep(1)
|
|
|
84 |
|
85 |
|
86 |
|
87 |
+
@spaces.GPU(duration=190)
|
88 |
def generate_image(prompt, image):
|
89 |
prefix_filename = str(random.randint(0, 999999))
|
90 |
prompt = prompt.replace('ComfyUI', prefix_filename)
|
|
|
102 |
logger.debug(f'Subprocess started with PID: {process.pid}')
|
103 |
|
104 |
# Ожидание запуска сервера
|
105 |
+
for _ in range(40): # Максимум 20 секунд ожидания
|
106 |
if check_server_ready(new_port):
|
107 |
break
|
108 |
time.sleep(1)
|