Skip to content

Commit

Permalink
Small UI tweaks for chatbot, fix torchvision requirements (#1988)
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
monorimet authored Nov 20, 2023
1 parent 80a33d4 commit 1b11c82
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions apps/stable_diffusion/web/ui/css/sd_dark_theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion apps/stable_diffusion/web/ui/stablelm_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion setup_venv.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1b11c82

Please sign in to comment.