ComfyUI extra_model_paths.yaml: Location, Example and Fixes
Where ComfyUI extra_model_paths.yaml lives for portable, manual and Desktop installs, a working Windows example, every valid key, and why it does not load.
Quick answer
The ComfyUI extra_model_paths.yaml file goes in the same folder as ComfyUI's main. ComfyUI ships a template there called extra_; copy it, rename the copy to extra_, add a section with a base_ and one line per model folder, and restart ComfyUI. Every line in the template is commented out, so an unedited copy does nothing.
A minimal file that adds a models folder on another drive:
my_ models:
base_ path: D:/ AI/ models
checkpoints: checkpoints
diffusion_ models: diffusion_ models
text_ encoders: text_ encoders
vae: vae
loras: loras
If it worked, the console prints one line per folder at start-up, before any custom nodes load:
Adding extra search path loras D:\AI\models\loras
We read ComfyUI's loader code (utils/), folder_ and main at commit 0df64eb on 2026-10-10; the files are unchanged from release v0.39.0. We ran the loader against broken files on PyYAML 5.4.1 to get the error for each mistake below. We did not run it on Windows.
Where the file goes
| Install | File ComfyUI reads |
|---|---|
| InstallWindows portable | File ComfyUI readsComfyUI_, not the outer folder |
| InstallManual install (git clone) | File ComfyUI readsComfyUI/, next to main |
| InstallComfy Desktop 1.x | File ComfyUI readsThe Storage tab; also ComfyUI/ inside each install |
| InstallLegacy Desktop (the old single-install) | File ComfyUI reads%APPDATA%\ComfyUI\extra_, ~/ on macOS |
| InstallAny install | File ComfyUI readsAny file, passed with --extra- |
Portable and manual. main looks for extra_ in its own directory and loads it if it exists. In the portable build that is the inner ComfyUI folder, beside main and models, not the folder holding run_.
Comfy Desktop 1.x. The current desktop app, Comfy Desktop, manages several ComfyUI installs. Its documentation says to add model folders in the Storage tab: shared directories apply to every install, and each install's Manage panel has its own Model Directories list. The app writes those into a YAML of its own, one per install, under its app data folder (%APPDATA%\Comfy Desktop\instance- on Windows), and passes it with --extra- at every launch. It rewrites that file each time, so do not edit it by hand.
Comfy Desktop still lets ComfyUI read the install's own ComfyUI/. Its Storage tab lists the folders from that file as read-only and tells you to edit the YAML to change them. Installs live under %LOCALAPPDATA%\Comfy- on Windows by default, or ~/ on macOS and Linux.
Legacy Desktop. The previous desktop app, whose repository is now archived, kept a single file in its Electron user-data folder: extra_, with a comfyui_ section it wrote at install time. ComfyUI's own models page still gives this path under its Desktop tab. If you have migrated to Comfy Desktop, the migration adds your old models folder as a shared directory instead; check the Storage tab, not this file.
The flag: --extra- model- paths- config
python main .py --extra- model- paths- config D:/ AI/ shared_ paths .yaml D:/ AI/ more_ paths .yaml
The flag takes one or more paths and can be repeated. ComfyUI loads the default extra_ first, if there is one, then each file from the flag, so you can keep a shared file outside every install. On the portable build, add it to the end of the python_ line in run_.
If all you want is to move the whole models folder, ComfyUI v0.28.0 added --models-, which replaces the default models root and refuses to start if the folder does not exist. --base- moves models, custom nodes, input, output and user data together.
The structure, line by line
Each top-level name is a section; the name itself (comfyui, a1111, my_) is free. Inside a section:
base_is joined to the front of every folder in that section.path ~and environment variables such as%USERPROFILE%or$HOMEare expanded. A relativebase_is resolved from the folder holding the YAML file, not from where you launched ComfyUI.path is_puts that section's folders first in each list. ComfyUI searches folders in order and loads the first file with a matching name, so this also decides which copy wins when two folders hold the same file name, and which folder counts as the default for downloads. Without it, extra folders come after the built-indefault: true modelsfolder.- Every other key is a folder type, and its value is one path, or several paths on separate lines after a
|.
comfyui:
base_ path: E:/ ComfyUI_ old/
diffusion_ models: |
models/ unet/
models/ diffusion_ models/
text_ encoders: |
models/ text_ encoders/
models/ clip/
Watch the base path twice. If base_ already ends in models, the folder lines are loras, not models/; the doubled models/ is a common reason a correct-looking file finds nothing.
Valid keys
folder_ defines 27 folder types. The ones a video setup needs:
| Key | What goes there |
|---|---|
Keydiffusion_ | What goes thereWan, HunyuanVideo, LTX and MiniMax H3 model files; unet is an alias |
Keycheckpoints | What goes thereAll-in-one checkpoints that Load Checkpoint reads |
Keytext_ | What goes thereumt5, T5, Gemma, Qwen VL; clip is an alias |
Keyvae | What goes thereVAEs |
Keyloras | What goes thereLoRAs, including 4-step distill LoRAs |
Keyclip_ | What goes thereCLIP vision models, for example clip_ for Wan Animate |
Keyaudio_ | What goes therewav2vec2 and similar, for Wan S2V |
Keyupscale_ | What goes thereImage and video upscalers |
Keylatent_ | What goes thereLatent upscalers |
Keyframe_ | What goes thereRIFE and FILM weights for the native interpolation nodes |
Keycontrolnet | What goes thereControlNets; also reads t2i_ |
Keycustom_ | What goes thereExtra custom node folders, not model files |
The rest are configs, style_, embeddings, diffusers, vae_, gligen, hypernetworks, photomaker, classifiers, model_, background_, geometry_, optical_, detection and datasets. The template file lists the same set.
unet and clip are the only renamed keys ComfyUI maps for you. Our diffusion_models vs checkpoints page explains which loader reads which folder, and the Wan 2.2 models folder page lists which file goes in which.
GGUF files. The ComfyUI-GGUF custom node builds its .gguf lists from the diffusion_ and text_ folder lists, so the same keys cover GGUF files on another drive. There is no separate key to add.
Why it is not working
| Symptom | Cause | Fix |
|---|---|---|
SymptomNo Adding extra search path lines at all | CauseFile in the wrong folder, still named .example, or saved as .yaml | FixPut it beside main; in Explorer, turn on file name extensions |
SymptomComfyUI exits with 'NoneType' object is not iterable | CauseThe file exists but every line is still commented out | FixUncomment a section, or delete the file |
Symptomstring indices must be integers | CauseKeys are not indented under a section name | FixIndent every key under one section line |
Symptom'list' object has no attribute 'split' | CausePaths written as a YAML list with - | FixUse one path per line after | |
Symptomwhile scanning a double- | CauseA Windows path with backslashes inside double quotes | FixUse forward slashes, single quotes, or no quotes |
Symptomwhile scanning for the next token | CauseA tab used for indentation | FixIndent with spaces |
| SymptomThe line prints, but the loader's list is still empty | CauseWrong key name, wrong folder, or doubled models/ | FixCheck the key against the table above, then the printed path |
| SymptomFiles added later do not appear | CauseComfyUI reads the file once, at start-up | FixRestart ComfyUI |
Three things about the start-up line are easy to miss:
- It does not mean the folder exists. ComfyUI prints and adds the path without checking it. Copy the printed path into Explorer to see whether it opens.
- It does not mean the key is valid. A typo such as
checkpoint:ordiffusion_prints the same line and creates a new list no loader reads. ComfyUI gives no warning.model: - A broken file stops ComfyUI from starting. The loader is not wrapped in any error handling, so a YAML mistake ends start-up with a traceback. In the portable build, the window then waits on
pause; read the last lines before closing it.
Windows paths
YAML treats a backslash inside double quotes as the start of an escape code, so "D:\AI\models" fails to load. Three forms work:
a:
base_ path: D:/ AI/ models
b:
base_ path: D:\AI\models
c:
base_ path: 'D:\AI Models\models'
Forward slashes are the safest choice; Python on Windows accepts them, and ComfyUI normalises the path before it prints it, which is why the log line shows backslashes. Spaces in a path are fine without quotes too, but single quotes make them obvious. Save the file as UTF-8; ComfyUI opens it as UTF-8.
What nobody has published
- ComfyUI's documentation does not list the error each YAML mistake produces. The table above comes from running ComfyUI's loader code ourselves, not from an official page.
- The documentation's Desktop tab mixes the current Storage tab with the Legacy Desktop file path. Comfy Desktop's source and its own settings page show the newer layout described above.
If a model still does not load once its folder is listed, our ComfyUI troubleshooting page covers model-not-found and loader errors, and the ComfyUI download page covers which install keeps its files where.
GenVidKit is an independent guide. It is not affiliated with Comfy Org, city96 or the AUTOMATIC1111 project.
Sources
All read on 2026-10-10.
- ComfyUI
utils/— how the file is parsed,extra_ config .py base_,path is_, the log line.default - ComfyUI
folder_— the 27 keys, thepaths .py unetandclipaliases, search order. - ComfyUI
mainand.py comfy/— default file location, load order,cli_ args .py --extra-,model- paths- config --models-,directory --base-.directory - ComfyUI
extra_— the template.model_ paths .yaml .example - ComfyUI pull request #9113 —
--models-, first released in v0.28.0.directory - ComfyUI
run_— the portable launch line.nvidia_ gpu .bat - ComfyUI documentation: Models — the official setup steps and the Desktop paths.
- Comfy Desktop documentation: Settings and Migrate from Legacy — the Storage tab, data locations, what migration does with models.
- Comfy-Org/Comfy-Desktop v1.1.6 source — the per-install YAML and the read-only
extra_row.model_ paths .yaml - Comfy-Org/desktop, archived — the Legacy Desktop
extra_.models_ config .yaml - city96/ComfyUI-GGUF
nodes— how GGUF lists reuse the core folder lists..py