fix chatbot bug
This commit is contained in:
@@ -186,7 +186,7 @@ pip install scepter
|
||||
| Controllable Image Synthesis | [🌟SCEdit(CVPR24)](docs/en/tasks/scedit.md) | [](https://arxiv.org/abs/2312.11392) [](https://scedit.github.io/) |
|
||||
| Image Editing | [🌟LAR-Gen](docs/en/tasks/largen.md) | [](https://arxiv.org/abs/2403.19534) [](https://ali-vilab.github.io/largen-page/) |
|
||||
| Image Editing | [🌟StyleBooth](docs/en/tasks/stylebooth.md) | [](https://arxiv.org/abs/2404.12154) [](https://ali-vilab.github.io/stylebooth-page/) |
|
||||
| Image Generation and Editing | [🌟ACE](https://ali-vilab.github.io/ace-page/) | [](https://arxiv.org/abs/2410.00086) [](https://ali-vilab.github.io/ace-page/) []() <br> [](https://www.modelscope.cn/models/iic/ACE-0.6B-512px) [](https://huggingface.co/scepter-studio/ACE-0.6B-512px) |
|
||||
| Image Generation and Editing | [🌟ACE](https://ali-vilab.github.io/ace-page/) | [](https://arxiv.org/abs/2410.00086) [](https://ali-vilab.github.io/ace-page/) [](https://huggingface.co/spaces/scepter-studio/ACE-Chat) <br> [](https://www.modelscope.cn/models/iic/ACE-0.6B-512px) [](https://huggingface.co/scepter-studio/ACE-0.6B-512px) |
|
||||
|
||||
|
||||
## 🖥️ SCEPTER Studio
|
||||
|
||||
@@ -3,12 +3,14 @@
|
||||
import argparse
|
||||
import base64
|
||||
import copy
|
||||
import csv
|
||||
import glob
|
||||
import io
|
||||
import os
|
||||
import random
|
||||
import re
|
||||
import string
|
||||
import sys
|
||||
import threading
|
||||
|
||||
import cv2
|
||||
@@ -31,6 +33,8 @@ from scepter.studio.utils.env import init_env
|
||||
from .example import get_examples
|
||||
from .utils import load_image
|
||||
|
||||
csv.field_size_limit(sys.maxsize)
|
||||
|
||||
refresh_sty = '\U0001f504' # 🔄
|
||||
clear_sty = '\U0001f5d1' # 🗑️
|
||||
upload_sty = '\U0001f5bc' # 🖼️
|
||||
@@ -640,8 +644,8 @@ class ChatBotUI(object):
|
||||
|
||||
print(new_message)
|
||||
imgs = self.pipe(
|
||||
input_image=edit_image,
|
||||
input_mask=edit_image_mask,
|
||||
image=edit_image,
|
||||
mask=edit_image_mask,
|
||||
task=edit_task,
|
||||
prompt=[new_message] *
|
||||
len(edit_image) if edit_image is not None else [new_message],
|
||||
@@ -832,8 +836,8 @@ class ChatBotUI(object):
|
||||
|
||||
img_num = len(edit_image) if edit_image is not None else 1
|
||||
imgs = self.pipe(
|
||||
input_image=edit_image,
|
||||
input_mask=edit_image_mask,
|
||||
image=edit_image,
|
||||
mask=edit_image_mask,
|
||||
task=edit_task,
|
||||
prompt=[prompt] * img_num,
|
||||
negative_prompt=[''] * img_num,
|
||||
@@ -875,6 +879,7 @@ class ChatBotUI(object):
|
||||
self.example_ref_im1, self.text, self.seed
|
||||
],
|
||||
outputs=[self.chatbot, self.text, self.gallery],
|
||||
examples_per_page=4,
|
||||
run_on_click=True)
|
||||
|
||||
########################################
|
||||
|
||||
Reference in New Issue
Block a user