download_model
Fetch a model file by URL directly into your local ComfyUI models directory. Submit the download in the background or wait for completion, with support for custom filenames and timeouts.
Instructions
Download a model file into the LOCAL ComfyUI models dir, by URL.
Wraps comfy model download --url <url> [--relative-path <path>] [--filename <name>] --background (the singular model verb, not the
models catalog search_models reads). Fetches a known URL, no hub
search. The transfer is SUBMITTED, not held open: comfy-cli detaches a
worker and returns a download_id, the handle for
download(action="status"/"wait"/"cancel").
Args:
relative_path: workspace-relative; first segment must be models
(e.g. models/loras); a bare folder name like loras is
rejected.
wait: if True (default), poll until done or timeout_seconds elapses.
timeout_seconds: end-to-end budget for the waited call, submit
included; default 110s sits under a typical client's ~120s budget.
Returns:
wait=True: the final status, or {"timed_out": True, "download_id": ..., "status": ...} on expiry — not an error, keep polling that id.
wait=False: the submit payload (download_id, dest,
total_bytes, status).
Gotchas:
- comfy-cli writes straight to the FINAL path while transferring, so a
present file proves nothing. download(action="status") reporting
completed is the only proof the model is usable.
- REFUSES when a remote ComfyUI is configured (COMFYUI_URL/
COMFYUI_HOST): this always writes LOCALLY, so a remote target
would silently get the wrong disk. Set
COMFY_MCP_REMOTE_SHARED_MODELS=1 if that disk is actually shared.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| wait | No | ||
| filename | No | ||
| relative_path | No | ||
| timeout_seconds | No |