Reuse AUTOMATIC1111 Stable Diffusion WebUI Models in ComfyUI

Introduction

ComfyUI is a powerful and modular GUI for working with diffusion models, offering a node-based interface for creating complex workflows. If you've been using AUTOMATIC1111's Stable Diffusion web UI (A1111) and have a collection of models, you might be wondering if you can use them in ComfyUI without downloading them again. The good news is, yes you can!

ComfyUI provides a straightforward way to share models with other diffusion UIs like A1111 through its configuration file.

The extra_model_paths.yaml File

ComfyUI uses a configuration file named extra_model_paths.yaml to define search paths for various model types. This file allows you to specify directories where ComfyUI should look for models, including those already used by A1111.

Steps to Share Models

  1. Locate the File:

    • In the standalone Windows build of ComfyUI, you'll find extra_model_paths.yaml.example in the main ComfyUI directory.
    • For other installations, the file is also located in the root of the ComfyUI repository.
  2. Rename the File: Rename extra_model_paths.yaml.example to extra_model_paths.yaml.

  3. Edit the File: Open extra_model_paths.yaml with a text editor.

  4. Configure Paths: The file contains example configurations for different model types (checkpoints, VAEs, LoRAs, etc.). You need to modify these paths to point to the corresponding directories within your A1111 installation.

    For example, if your A1111 checkpoints are located in stable-diffusion-webui/models/Stable-diffusion, your configuration might look like this:

    yaml
    |
    a1111: base_path: /path/to/your/stable-diffusion-webui # Replace with the actual path checkpoints: models/Stable-diffusion configs: models/Stable-diffusion vae: models/VAE loras: | models/Lora models/LyCORIS upscale_models: | models/ESRGAN models/SwinIR embeddings: embeddings hypernetworks: models/hypernetworks controlnet: models/ControlNet

    Important:

    • Replace /path/to/your/stable-diffusion-webui with the actual path to your A1111 installation directory.
    • Adjust the sub-paths (e.g., models/Stable-diffusion, models/VAE) according to your A1111 directory structure.
    • The | symbol is used for multi-line strings in YAML, allowing you to specify multiple directories for a single model type.
  5. Save and Restart: Save the changes to extra_model_paths.yaml and restart ComfyUI.

After restarting, ComfyUI will now be able to load models from the directories you specified, including those from your A1111 installation. This means you can seamlessly use your existing model collection in ComfyUI without any redundant downloads or storage usage. Enjoy experimenting with your A1111 models in the flexible environment of ComfyUI!