download_model
Downloads a model file into the folder ComfyUI loads from, with resume support and dry-run checks.
Instructions
Download a model file into the folder ComfyUI will actually load it from.
Meant for the models a workflow declares on its own loaders: at detail="full"
get_workspace_graph reports each node's properties.models as
[{name, url, directory}], and directory is this tool's folder. Graphs
without that property usually ship a "Model Links" note saying the same thing
in prose. Either way, check what is already there with list_models(folder)
first and fetch only the rest.
Where the file lands is decided by ComfyUI, not by this server: the directory list honours extra_model_paths.yaml, so it is routinely on another drive entirely, and a model written anywhere else is invisible however right the bytes are. The reply always names the directory it chose.
Interrupted transfers resume: the bytes go to a .part file beside the target
and re-issuing the same call continues from where it stopped, so a failure
costs the remainder rather than the whole file.
Args:
url: direct link to the file, as written in the note.
folder: ComfyUI model folder, e.g. 'vae' or 'diffusion_models'.
list_models() with no arguments lists the valid names.
filename: name to save as. Defaults to the last segment of the URL.
A 'subdir/name.safetensors' is allowed; ComfyUI loads those.
directory: which of the folder's registered directories to use. Defaults
to the first one that exists, which is what ComfyUI's own
is_default ordering intends.
wait: wait for the download to finish. False returns immediately and the
transfer keeps running, so get_download_progress reports it - prefer
that for anything large, since a multi-gigabyte file outlasts most
tool-call deadlines.
overwrite: fetch again even though the file is already there.
dry_run: report size, checksum and destination without fetching anything.
Worth doing first: a link in a note is often several gigabytes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| wait | No | ||
| folder | Yes | ||
| dry_run | No | ||
| filename | No | ||
| directory | No | ||
| overwrite | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||