Spaces:
Paused
Paused
lzy-tony
commited on
Commit
•
6658d87
1
Parent(s):
6296bc0
fix: fix duration limit
Browse files
app.py
CHANGED
@@ -567,7 +567,7 @@ def process_box_multilingual():
|
|
567 |
return [gr.update(visible=True), *visibilities]
|
568 |
|
569 |
@torch.inference_mode()
|
570 |
-
@spaces.GPU(enable_queue=True, duration=
|
571 |
def generate_image(bg_prompt, bg_class, bg_tags, seed, cfg, *conditions):
|
572 |
|
573 |
stack_cp = deepcopy(stack)
|
@@ -642,7 +642,7 @@ def generate_image(bg_prompt, bg_class, bg_tags, seed, cfg, *conditions):
|
|
642 |
return image
|
643 |
|
644 |
@torch.inference_mode()
|
645 |
-
@spaces.GPU(enable_queue=True, duration=
|
646 |
def generate_image_multilingual(bg_prompt, bg_class, bg_tags, seed, cfg, *conditions):
|
647 |
|
648 |
stack_cp = deepcopy(multilingual_stack)
|
@@ -662,7 +662,6 @@ def generate_image_multilingual(bg_prompt, bg_class, bg_tags, seed, cfg, *condit
|
|
662 |
font = conditions[i + MAX_TEXT_BOX * 2].split(":")[1].strip()
|
663 |
print(conditions[i + MAX_TEXT_BOX * 2], " ", lang, " ", font)
|
664 |
langs.append(multilingual_reverse_code_dict[lang])
|
665 |
-
# FIXME: wrong language prefix
|
666 |
font_type.append(f'{multilingual_reverse_code_dict[lang]}-{font}')
|
667 |
|
668 |
# 2. input check
|
|
|
567 |
return [gr.update(visible=True), *visibilities]
|
568 |
|
569 |
@torch.inference_mode()
|
570 |
+
@spaces.GPU(enable_queue=True, duration=120)
|
571 |
def generate_image(bg_prompt, bg_class, bg_tags, seed, cfg, *conditions):
|
572 |
|
573 |
stack_cp = deepcopy(stack)
|
|
|
642 |
return image
|
643 |
|
644 |
@torch.inference_mode()
|
645 |
+
@spaces.GPU(enable_queue=True, duration=120)
|
646 |
def generate_image_multilingual(bg_prompt, bg_class, bg_tags, seed, cfg, *conditions):
|
647 |
|
648 |
stack_cp = deepcopy(multilingual_stack)
|
|
|
662 |
font = conditions[i + MAX_TEXT_BOX * 2].split(":")[1].strip()
|
663 |
print(conditions[i + MAX_TEXT_BOX * 2], " ", lang, " ", font)
|
664 |
langs.append(multilingual_reverse_code_dict[lang])
|
|
|
665 |
font_type.append(f'{multilingual_reverse_code_dict[lang]}-{font}')
|
666 |
|
667 |
# 2. input check
|