(ComfyUIの配置ディレクトリ)\ComfyUI\extra_model_paths.yaml.example
ComfyUIのモデルの参照ディレクトリを別のディレクトリに変更する手順を紹介します。
こちらの記事でComfyUIのインストールをしました。通常の手順では、モデルファイルをダウンロードして、
ComfyUIのモデルディレクトリに配置しますが、すでに Stable Diffusion Web UIがインストールされており、
モデルがダウンロードされている場合は、Stable Diffusion Web UIのモデルディレクトリを参照したい場合があります。
この記事では、ComfyUIのモデルの参照ディレクトリを別のディレクトリ(Stable Diffusion Web UIのディレクトリ)に変更する
手順を紹介します。
extra_model_paths.yaml.sample
ファイルを変更し、extra_model_paths.yaml
ファイルとして保存します。
extra_model_paths.yaml.sampleファイルは以下の位置にあります。
(ComfyUIの配置ディレクトリ)\ComfyUI\extra_model_paths.yaml.example
C:\Users\(ユーザー名)\AppData\Local\Programs\@comfyorgcomfyui-electron\resources\ComfyUI\extra_model_paths.yaml.example
#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/
# # You can use is_default to mark that these folders should be listed first, and used as the default dirs for eg downloads
# #is_default: true
# checkpoints: models/checkpoints/
# clip: models/clip/
# clip_vision: models/clip_vision/
# configs: models/configs/
# controlnet: models/controlnet/
# diffusion_models: |
# models/diffusion_models
# models/unet
# 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
変更後の例です。base_path
部分をStable Diffusion WebUIの配置ディレクトリに変更します。
#config for a1111 ui
#all you have to do is change the base_path to where yours is installed
a111:
base_path: D:\Image-Gen\stable-diffusion-webui-master-sdxl\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
変更後、ComfyUIを再起動します。モデルの一覧等でStable Diffusion Web UIのモデルと同じものが表示されれば、正しく設定できています。