Comfy-Org / Comfy-Org/Comfy-Desktop
[Bug] Model downloader fails with "Failed to move download to final location EISDIR: illegal operation on a directory, link '<models root>'"
- Dominant language
- TypeScript
- Stars
- 458
- Forks
- 59
- Avg merge
- 22h 18m
- Merged PRs (30d)
- 45
Description
Summary
Every model download started from the missing-models dialog (template loading) fails at the final move step with:
Failed to move download to final location EISDIR: illegal operation on a directory, link 'T:\Comfy-Desktop\ComfyUI-Shared\models'
The path in the error is the models root directory itself — the category subfolder and filename are missing from the destination, so the move/link targets a directory and fails with EISDIR. The download itself completes (the cache file appears in the download cache); only the move to the final location fails.
Environment
Comfy Desktop: standalone environment v0.29.0-env1 (win-nvidia), ComfyUI core v0.33.3 (commit 4da9e2d), auto-update enabled, stable channel
OS: Windows 10 x64
GPU: NVIDIA RTX 3090 (24 GB), driver-side CUDA 13.0 build (torch 2.12.1+cu130)
Python (bundled): 3.13.12, embedded_python: false, deploy env local-desktop2-standalone
Install location: T:\Comfy-Desktop\ComfyUI-Installs\ComfyUI
Download cache (settings.json): T:\Comfy-Desktop\ComfyUI-Cache\download-cache, maxCachedDownloads: 1
Model paths configuration
settings.json → modelsDirs (order has been swapped at one point while testing; bug reproduces with either first):
json
"modelsDirs": [
"T:\\Local_Ai\\Comfy_Models",
"T:\\Comfy-Desktop\\ComfyUI-Shared\\models"
]
The generated instance-model-paths\inst-*.yaml is well-formed: both roots are present with the correct base_path and all category subfolder mappings (checkpoints: 'checkpoints/', etc.), and is_default: true on the first entry. ComfyUI itself reads models from all three roots (install-local, both extra paths) without issue.
Repro steps
Open a built-in template whose models are not installed (reproduced with LTX‑2.5 Image to Video and MiniMax H3 Image to Video, among others).
In the missing-models dialog, click download for any listed model.
Download runs to completion, then fails with the EISDIR error above. No file appears in the destination category folder.
Reproduces for every model tried, across both configured model roots (error names whichever root is the active default), on the same drive as the cache directory (all on T:), so it is not a cross-volume rename/link issue.
What has been ruled out
Malformed model-paths config — the generated YAML is valid and complete (verified by hand); the same install serves all existing models from these roots correctly.
Broken folder layout / permissions — both roots contain the full standard subfolder set; external tools (comfy-cli model download in PowerShell) download into the same tree successfully with no permission errors.
Specific target drive/path — fails identically with either root as default.
Stale/partial cache file — reproduces on first-ever download of a model.
The error message text and behavior indicate the destination path handed to the final move/hardlink step is the models root rather than root\\ — i.e. the category-relative portion of the destination is lost between the dialog and the mover.
Workaround in use
comfy model download --url --relative-path models/ (comfy-cli 1.17.0) into the install's own models directory works flawlessly for the same files, so this is used instead of the in-app downloader.
Happy to provide the full settings.json / generated YAML / logs on request.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the missing-models dialog and follow the model downloader through its final move or hardlink step, comparing the configured modelsDirs and generated instance-model-paths YAML. Reproduce with a missing model, then verify the completed download is placed under the selected root's category subfolder with its filename rather than at the models root.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100