Meta推AI聊天機器人新功能:主動發送消息提升互動體驗
Abacus.AI重磅推出DeepAgent,全能AI助手引領企業智能化轉型
大模型時代,通用視覺模型將何去何從?
X平台試點AI生成“社區筆記”,Grok接入信息核查流程
在ComfyUI Desktop 桌面版中,extra_model_paths.yaml 你可以在啟動ComfyUI Desktop 桌面版後,幫助-> 打開文件夾-> Open extra_model_paths.yaml 菜單中找到extra-model-paths

選擇對應的菜單項,然後用記事本程序打開
或者查找C:UsersAdministratorAppDataRoamingComfyUI 目錄下的extra_model_paths.yaml 文件
對應原始文件內容如下:
# ComfyUI extra_model_paths.yaml for win32 comfyui_desktop: is_default: "true" checkpoints: modelscheckpoints classifiers: modelsclassifiers clip: modelsclip clip_vision: modelsclip_vision configs: modelsconfigs controlnet: modelscontrolnet diffusers: modelsdiffusers diffusion_models: modelsdiffusion_models embeddings: modelsembeddings gligen: modelsgligen hypernetworks: modelshypernetworks loras: modelsloras photomaker: modelsphotomaker style_models: modelsstyle_models unet: modelsunet upscale_models: modelsupscale_models vae: modelsvae vae_approx: modelsvae_approx animatediff_models: modelsanimatediff_models animatediff_motion_lora: modelsanimatediff_motion_lora animatediff_video_formats: modelsanimatediff_video_formats ipadapter: modelsipadapter liveportrait: modelsliveportrait insightface: modelsinsightface layerstyle: modelslayerstyle LLM: modelsLLM Joy_caption: modelsJoy_caption sams: modelssams blip: modelsblip CogVideo: modelsCogVideo xlabs: modelsxlabs instantid: modelsinstantid custom_nodes: custom_nodes/ download_model_base: models base_path: D:ComfyUI
下面是對於yaml 文件的配置說明:
| 模型類型 | 配置鍵名(必須,不能修改) | 默認相對路徑(可以修改) |
|---|---|---|
| 是否默認配置(只能有一個) | is_default | true/false |
| Checkpoint 模型 | checkpoints | models/checkpoints/ |
| LoRA 模型 | loras | models/loras/ |
| VAE 模型 | vae | models/vae/ |
| 控製網絡 | controlnet | models/controlnet/ |
| 文本編碼器 | clip | models/clip/ |
| 圖像編碼器 | clip_vision | models/clip_vision/ |
| 放大模型 | upscale_models | models/upscale_models/ |
| 嵌入模型 | embeddings | models/embeddings/ |
| 超網絡 | hypernetworks | models/hypernetworks/ |
| 風格模型 | style_models | models/style_models/ |
| 照片製作器 | photomaker | models/photomaker/ |
| IP適配器 | ipadapter | models/ipadapter/ |
| 動畫模型 | animatediff_models | models/animatediff_models/ |
| 動畫LoRA | animatediff_motion_lora | models/animatediff_motion_lora/ |
| 分類器 | classifiers | models/classifiers/ |
| 生成模型 | diffusers | models/diffusers/ |
| 視覺模型 | clip_vision | models/clip_vision/ |
| 自定義節點 | custom_nodes | custom_nodes/ |
| 下載模型基礎 | download_model_base | models/ |
| 基礎路徑(必須) | base_path | D:/ComfyUI |
如果下面是我提供的自定義的模型配置文件示例
comfyui_desktop: is_default: "true" checkpoints: modelscheckpoints classifiers: modelsclassifiers clip: modelsclip clip_vision: modelsclip_vision configs: modelsconfigs controlnet: modelscontrolnet diffusers: modelsdiffusers diffusion_models: modelsdiffusion_models embeddings: modelsembeddings gligen: modelsgligen hypernetworks: modelshypernetworks loras: modelsloras photomaker: modelsphotomaker style_models: modelsstyle_models unet: modelsunet upscale_models: modelsupscale_models vae: modelsvae vae_approx: modelsvae_approx animatediff_models: modelsanimatediff_models animatediff_motion_lora: modelsanimatediff_motion_lora animatediff_video_formats: modelsanimatediff_video_formats ipadapter: modelsipadapter liveportrait: modelsliveportrait insightface: modelsinsightface layerstyle: modelslayerstyle LLM: modelsLLM Joy_caption: modelsJoy_caption sams: modelssams blip: modelsblip CogVideo: modelsCogVideo xlabs: modelsxlabs instantid: modelsinstantid custom_nodes: custom_nodes/ download_model_base: models base_path: D:ComfyUI custom_models: base_path: E: checkpoints: modelscheckpoints classifiers: modelsclassifiers clip: modelsclip # ... 其他模型路徑 ... a1111: base_path: D:stable-diffusion-webui checkpoints: models/Stable-diffusion # ... 其他模型路徑 ...
base_path 這個是在每個配置裡面都是有新增自定義的
每個配置節點的名稱你可以自定義比如custom_models 或者a1111 等等,但是不能重複,否則會報錯
is_default 這個是用來指定這個配置文件是否是默認的配置文件,只能有一個,如果設置為true,那麼這個配置文件就會成為默認的配置文件,否則就會成為非默認的配置文件
鍵名需要與原始的配置文件一致,文件夾為你實際的文件夾
請注意custom_nodes 這個文件夾是用來存放自定義的插件的路徑的這是在原本Portable 便攜版中沒有的,在桌面版中是有的,最好保持默認
在對應ComfyUI Portable的安裝目錄裡都可以找到extra_model_paths.yaml.example 這個文件,路徑如下
ComfyUI_windows_portable
├──ComfyUI
│ ├── extra_model_paths.yaml.example // 此文件為配置文件
│ └── ...省略其它文件
└── ...省略其它文件
找到以上文件後修改文件名extra_model_paths.yaml.example 為extra_model_paths.yaml,然後用記事本軟件進行編輯
對應原始文件內容如下:
#Rename this to extra_model_paths.yaml and ComfyUI will load it
#config for a1111 ui
#all you have to do is change the base_path to where yours is installed
a111:
base_path: path/to/stable-diffusion-webui/
checkpoints: models/Stable-diffusion
configs: models/Stable-diffusion
vae: models/VAE
loras: |
models/Lora
models/LyCORIS
upscale_models: |
models/ESRGAN
models/RealESRGAN
models/SwinIR
embeddings: embeddings
hypernetworks: models/hypernetworks
controlnet: models/ControlNet
#config for comfyui
#your base path should be either an existing comfy install or a central folder where you store all of your models, loras, etc.
#comfyui:
# base_path: path/to/comfyui/
# checkpoints: models/checkpoints/
# clip: models/clip/
# clip_vision: models/clip_vision/
# configs: models/configs/
# controlnet: models/controlnet/
# embeddings: models/embeddings/
# loras: models/loras/
# upscale_models: models/upscale_models/
# vae: models/vae/
#other_ui:
# base_path: path/to/ui
# checkpoints: models/checkpoints
# gligen: models/gligen
# custom_nodes: path/custom_nodes你可以看到在a111:的設置部分有base_path: 用來指定WebUI 根目錄所在路徑,你可以把此處修改為你的WebUI 或者自定義的模型文件夾位置所在的路徑,記得在: 後需要有一個空格,修改完成後保存對應文件,重啟ComfyUI即可。
你需要確保在base_path:路徑之下的文件路徑是正確的
注意在不同系統比如Mac 或者 Linux 系統下,路徑的格式可能有所不同
如果假設WebUI安裝路徑為D:stable-diffusion-webui則vae 在上方配置文件設置下對應路徑vae 模型文件路徑最終會是應該為D:stable-diffusion-webuimodelsVAE,請檢查對應文件夾其它類似checkpoints、loras,也請檢查對應的配置。
如果你重啟以後發現你的checkpoints或者VAE等沒有順利加載,請檢查你的配置是否正確。
對於其它UI 你也可以參考上方配置文件進行修改,比如other_ui:等,你可以取消代碼前的#註釋來增加對應UI的設置,然後修改base_path:和對應各類繪圖模型的路徑即可