Skip to content

How to link Stable Diffusion Models Between ComfyUI and A1111 or Other Stable Diffusion AI image generator WebUI?

Whether you are using a third-party installation package or the official integrated package, you can find the extra_model_paths.yaml.example file in the corresponding ComfyUI installation directory. The path is as follows:

ComfyUI_windows_portable
├── ComfyUI
│  ├── extra_model_paths.yaml.example   // This is the configuration file
│  └── ...other files omitted
└── ...other files omitted

After locating the above file, rename extra_model_paths.yaml.example to extra_model_paths.yaml, and then edit it with a text editor. The corresponding code is as follows, and you can also view the official original repository code file.

💡

Please note that the link provided in the original text is not accessible. If you need the content of the web page for analysis, please inform the user of the reason. It is important to note that you can analyze the link but have encountered a problem, which may be related to the link itself or may be related to the network. Guide the user to check the legality of the web page link and try again if necessary. If you do not need to analyze this link to answer the user’s question, you can answer the user’s question normally.

#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

You can see that in the a111: settings section there is a base_path: used to specify the root directory path of WebUI. You can change this to the path where your WebUI is located. Remember to have a space after the :. After making the changes, save the corresponding file and restart ComfyUI.

💡

Please note that the link provided in the original text is not accessible. If you need the content of the web page for analysis, please inform the user of the reason. It is important to note that you can analyze the link but have encountered a problem, which may be related to the link itself or may be related to the network. Guide the user to check the legality of the web page link and try again if necessary. If you do not need to analyze this link to answer the user’s question, you can answer the user’s question normally.

If after restarting you find that your checkpoints or VAE etc., have not been loaded successfully, please check if your configuration is correct.

You need to ensure that the file paths under the base_path: path are correct. For example, if the WebUI installation path is D:\stable-diffusion-webui\, then the vae path should be D:\stable-diffusion-webui\models\VAE in the configuration file above. Please also check the corresponding configurations for other items like checkpoints, loras, etc.

For other UIs, you can also modify the configuration file as shown above, such as other_ui: etc. You can uncomment the # in front of the code to add the settings for the corresponding UI, and then modify the base_path: and the paths for the corresponding drawing models.