Fix for ComfyUI's "Missing Models" panel: make the Download button download models to the server where ComfyUI is running, instead of to the user's browser.
When you access ComfyUI remotely in a browser, clicking the built-in "Download" button in the Missing Models panel starts a browser download on your local machine. The model then has to be manually transferred to the server. See:
This custom node replaces that behaviour: the Download button now fetches the model on the server, straight into the correct models/<directory>/ folder, with a live progress panel in the UI.
cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/daniel-iliesh/server-model-downloadRestart ComfyUI and hard-refresh your browser.
- On startup, patches the bundled
missingModelDownload-*.js(the patch is idempotent and saves a one-time backup, so frontend package upgrades are handled automatically). - Adds two HTTP routes:
POST /api/smd/download— queues an async streaming download.GET /api/smd/status— lists all active/recent jobs.
- Ships a frontend extension (
web/download-ui.js) that:- Registers a handler the patched bundle calls instead of creating the
<a download>anchor. - Subscribes to
smd.progress/smd.done/smd.errorWebSocket events. - Shows a floating progress panel (bottom-right).
- On completion, calls
app.refreshComboInNodes()so the Missing Models warning clears automatically.
- Registers a handler the patched bundle calls instead of creating the
- Supports
https://andhttp://URLs. Validates filename/directory against ComfyUI'sfolder_paths. - Refuses to overwrite an existing file.
- Downloads land in the first path returned by
folder_paths.get_folder_paths(directory).