无论是下载的第三方安装包还是官方的整合包,你在对应 ComfyUI 的安装目录里都可以找到 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 即可。

如果你重启以后发现你的 checkpoints 或者 VAE 等没有顺利加载,请检查你的配置是否正确。

你需要确保在 base_path:路径之下的文件路径是正确的,如果假设 WebUI 安装路径为 D:\stable-diffusion-webui\则 vae 在上方配置文件设置下路径应该为 D:\stable-diffusion-webui\models\VAE,其它类似 checkpoints、loras,也请检查对应的配置。

对于其它 UI 你也可以参考上方配置文件进行修改,比如 other_ui:等,你可以取消代码前的#注释来增加对应 UI 的设置,然后修改 base_path:和对应各类绘图模型的路径即可