Skip to content

Add a Download model button that installs the describer into ComfyUI - #49

Open
waltherhuggo wants to merge 2 commits into
D3voz:mainfrom
waltherhuggo:welcome-download-model
Open

waltherhuggo wants to merge 2 commits into
D3voz:mainfrom
waltherhuggo:welcome-download-model

Conversation

@waltherhuggo

@waltherhuggo waltherhuggo commented Nov 5, 2026 •

Copy link
Copy Markdown

What

Adds a Download model button next to the Visual describer label on the welcome page. When the selected model is one of the suggested ones (Qwen3-VL 8B INT8, Qwen3-VL 4B FP8, Gemma 4 E2B INT8) and is not installed, clicking it makes the server download the file from Hugging Face straight into COMFYUI_DIR/models/text_encoders. The button shows progress, and the model list refreshes by itself when the download finishes.

  • New POST/GET /api/models/download (same access and same-origin checks as the other API routes). Only the three suggested file names are accepted, one download at a time, written to a .part file and renamed when complete.
  • New optional COMFYUI_DIR in .env.example (your ComfyUI folder). Without it the button explains what to set and offers the plain browser download link as a fallback.
  • The suggested-model list moved to lib/describers.ts so the page and the server share it. README documents COMFYUI_DIR.
  • test/download.test.ts covers the guards and a stubbed download.

Notes

  • Checked with tsc --noEmit and the new tests. I did not download the real multi-GB files or check the page visually in a browser.
  • The download runs in the app server process; if the app restarts mid-download, it has to be started again.

🤖 Generated with Claude Code

waltherhuggo and others added 2 commits November 5, 2026 10:01
Shows a button next to the Visual describer label that downloads the selected
suggested model from Hugging Face when it is not installed in ComfyUI.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The Download model button now asks the server to fetch the selected suggested
model from Hugging Face into COMFYUI_DIR/models/text_encoders, shows progress,
and refreshes the model list when done. Without COMFYUI_DIR it explains how to
set it and offers the browser download instead.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@waltherhuggo waltherhuggo changed the title Add a Download model button to the welcome page Add a Download model button that installs the describer into ComfyUI Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant