From 1b11c82c9d98e10172a7fbd988cef157493768e9 Mon Sep 17 00:00:00 2001 From: Ean Garvey <87458719+monorimet@users.noreply.github.com> Date: Mon, 20 Nov 2023 12:39:10 -0600 Subject: [PATCH] Small UI tweaks for chatbot, fix torchvision requirements (#1988) - add torchvision to setup_venv.ps1 -- we need this for the torchvision::nms that is now a dependency of controlnet features. - Don't have bad flashy orange updates when using the chatbot - Don't limit the height of the chatbot -- there's mixed opinions and solutions around this one. I think the default (400) is just way too small and LLMs generate plenty enough to justify matching the output. --- apps/stable_diffusion/web/ui/css/sd_dark_theme.css | 12 ++++++++++++ apps/stable_diffusion/web/ui/stablelm_ui.py | 2 +- setup_venv.ps1 | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/apps/stable_diffusion/web/ui/css/sd_dark_theme.css b/apps/stable_diffusion/web/ui/css/sd_dark_theme.css index 00ebebc027..b5cb5bb1ec 100644 --- a/apps/stable_diffusion/web/ui/css/sd_dark_theme.css +++ b/apps/stable_diffusion/web/ui/css/sd_dark_theme.css @@ -105,6 +105,18 @@ body { background-color: var(--background-fill-primary); } +.generating.svelte-zlszon.svelte-zlszon { + border: none; +} + +.generating { + border: none !important; +} + +#chatbot { + height: 100% !important; +} + /* display in full width for desktop devices */ @media (min-width: 1536px) { diff --git a/apps/stable_diffusion/web/ui/stablelm_ui.py b/apps/stable_diffusion/web/ui/stablelm_ui.py index 098f33bce1..bade4c14ec 100644 --- a/apps/stable_diffusion/web/ui/stablelm_ui.py +++ b/apps/stable_diffusion/web/ui/stablelm_ui.py @@ -456,7 +456,7 @@ def view_json_file(file_obj): json_view_button.click( fn=view_json_file, inputs=[config_file], outputs=[json_view] ) - chatbot = gr.Chatbot(height=500) + chatbot = gr.Chatbot(elem_id="chatbot") with gr.Row(): with gr.Column(): msg = gr.Textbox( diff --git a/setup_venv.ps1 b/setup_venv.ps1 index 7957a2c2bf..09489bf4cc 100644 --- a/setup_venv.ps1 +++ b/setup_venv.ps1 @@ -89,7 +89,7 @@ else {python -m venv .\shark.venv\} python -m pip install --upgrade pip pip install wheel pip install -r requirements.txt -pip install --pre torch-mlir torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu -f https://llvm.github.io/torch-mlir/package-index/ +pip install --pre torch-mlir torchvision torch --extra-index-url https://download.pytorch.org/whl/nightly/cpu -f https://llvm.github.io/torch-mlir/package-index/ pip install --upgrade -f https://nod-ai.github.io/SRT/pip-release-links.html iree-compiler iree-runtime Write-Host "Building SHARK..." pip install -e . -f https://llvm.github.io/torch-mlir/package-index/ -f https://nod-ai.github.io/SRT/pip-release-links.html