[SD] Add FastChat as part of SD WebUI (#1349)

-- This commit includes FastChat as part of SD WebUI.

Signed-off-by: Abhishek Varma <abhishek@nod-labs.com>
Co-authored-by: Abhishek Varma <abhishek@nod-labs.com>
This commit is contained in:
Abhishek Varma
2023-04-24 23:42:58 +05:30
committed by GitHub
parent 09e3f63d5b
commit a5ae9d9f02
3 changed files with 12 additions and 0 deletions

View File

@@ -59,6 +59,7 @@ if __name__ == "__main__":
dark_theme = resource_path("ui/css/sd_dark_theme.css")
from apps.stable_diffusion.web.ui import (
chatbot_web,
txt2img_web,
txt2img_gallery,
txt2img_sendto_img2img,
@@ -119,6 +120,8 @@ if __name__ == "__main__":
outpaint_web.render()
with gr.TabItem(label="Upscaler", id=4):
upscaler_web.render()
with gr.TabItem(label="Chatbot", id=5):
chatbot_web.render()
with gr.Tabs(visible=False) as experimental_tabs:
with gr.TabItem(label="LoRA Training", id=5):

View File

@@ -49,3 +49,4 @@ from apps.stable_diffusion.web.ui.upscaler_ui import (
upscaler_sendto_outpaint,
)
from apps.stable_diffusion.web.ui.lora_train_ui import lora_train_web
from apps.stable_diffusion.web.ui.chatbot_ui import chatbot_web

View File

@@ -0,0 +1,8 @@
from fastchat import build_demo, get_model_list, set_global_vars
controller_url = "http://localhost:21001"
moderate = False
models = get_model_list(controller_url)
set_global_vars(controller_url, moderate, models)
chatbot_web = build_demo()