Skip to content
더 나은 ComfyUI 지식베이스 구축을 돕기 후원자 되기
튜토리얼 시리즈ComfyUI 기본 튜토리얼3. ComfyUI와 WebUI 모델 연결

ComfyUI와 A1111 또는 다른 Stable Diffusion AI 이미지 생성 WebUI 간의 모델 공유 방법 (How to link Stable Diffusion Models Between ComfyUI and A1111 or Other Stable Diffusion AI image generator WebUI?)

이 가이드는 ComfyUI와 다른 WebUI 프로그램 간에 모델을 공유하는 방법 또는 사용자 정의 모델 저장 위치를 구성하는 방법을 보여줍니다. 다음 두 가지 버전에 대해 설명하겠습니다:

  • ComfyUI Desktop (Comfy.org의 최신 데스크톱 버전)
  • ComfyUI Portable (원래의 포터블 버전)

구성 로직은 Desktop 버전과 Portable 버전에서 기본적으로 동일하지만, 원본 예제 파일의 내용에는 차이가 있으며, 이에 대해 아래에서 개별적으로 설명하겠습니다.

💡

소프트웨어가 정상적으로 시작되지 않는 문제를 방지하기 위해 변경하기 전에 파일 내용을 백업해 주세요. 구성을 올바르게 적용하려면 재시작이 필요합니다. 수정이 잘못된 경우 재시작 시 오류가 발생하여 소프트웨어가 정상적으로 시작되지 않을 수 있습니다. 이러한 오류가 발생하면 오류 로그를 확인하거나 백업한 버전으로 파일을 복원하세요.

ComfyUI Desktop과 A1111 간의 모델 공유 구성 방법

ComfyUI Desktop 버전에서는 ComfyUI Desktop을 시작한 후 도움말 -> 폴더 열기 -> extra_model_paths.yaml 열기 메뉴에서 extra_model_paths.yaml을 찾을 수 있습니다. extra-model-paths

해당 메뉴 항목을 선택하고 텍스트 편집기로 엽니다.

또는 C:\Users\Administrator\AppData\Roaming\ComfyUI 디렉토리에서 extra_model_paths.yaml 파일을 찾습니다.

Mac 컴퓨터가 없어서 Mac의 파일 경로를 제공할 수 없습니다. 댓글에서 추가해 주세요.

파일의 원본 내용은 다음과 같습니다:

# ComfyUI extra_model_paths.yaml for win32
comfyui_desktop:
  is_default: "true"
  checkpoints: models\checkpoints\
  classifiers: models\classifiers\
  clip: models\clip\
  clip_vision: models\clip_vision\
  configs: models\configs\
  controlnet: models\controlnet\
  diffusers: models\diffusers\
  diffusion_models: models\diffusion_models\
  embeddings: models\embeddings\
  gligen: models\gligen\
  hypernetworks: models\hypernetworks\
  loras: models\loras\
  photomaker: models\photomaker\
  style_models: models\style_models\
  unet: models\unet\
  upscale_models: models\upscale_models\
  vae: models\vae\
  vae_approx: models\vae_approx\
  animatediff_models: models\animatediff_models\
  animatediff_motion_lora: models\animatediff_motion_lora\
  animatediff_video_formats: models\animatediff_video_formats\
  ipadapter: models\ipadapter\
  liveportrait: models\liveportrait\
  insightface: models\insightface\
  layerstyle: models\layerstyle\
  LLM: models\LLM\
  Joy_caption: models\Joy_caption\
  sams: models\sams\
  blip: models\blip\
  CogVideo: models\CogVideo\
  xlabs: models\xlabs\
  instantid: models\instantid\
  custom_nodes: custom_nodes/
  download_model_base: models
  base_path: D:\ComfyUI

구성 변경 방법

yaml 파일의 구성 설명은 다음과 같습니다:

모델 유형구성 키 (필수, 변경 불가)기본 상대 경로 (변경 가능)
기본 구성 (하나만)is_defaulttrue/false
체크포인트 모델checkpointsmodels/checkpoints/
LoRA 모델lorasmodels/loras/
VAE 모델vaemodels/vae/
컨트롤 네트워크controlnetmodels/controlnet/
텍스트 인코더clipmodels/clip/
이미지 인코더clip_visionmodels/clip_vision/
업스케일 모델upscale_modelsmodels/upscale_models/
임베딩embeddingsmodels/embeddings/
하이퍼네트워크hypernetworksmodels/hypernetworks/
스타일 모델style_modelsmodels/style_models/
PhotoMakerphotomakermodels/photomaker/
IP 어댑터ipadaptermodels/ipadapter/
애니메이션 모델animatediff_modelsmodels/animatediff_models/
애니메이션 LoRAanimatediff_motion_loramodels/animatediff_motion_lora/
분류기classifiersmodels/classifiers/
디퓨저diffusersmodels/diffusers/
비전 모델clip_visionmodels/clip_vision/
사용자 정의 노드custom_nodescustom_nodes/
모델 다운로드 기본download_model_basemodels/
기본 경로 (필수)base_pathD:/ComfyUI

다음은 사용자 정의 모델 구성 파일의 예시입니다:

comfyui_desktop:
  is_default: "true"
  checkpoints: models\checkpoints\
  classifiers: models\classifiers\
  clip: models\clip\
  clip_vision: models\clip_vision\
  configs: models\configs\
  controlnet: models\controlnet\
  diffusers: models\diffusers\
  diffusion_models: models\diffusion_models\
  embeddings: models\embeddings\
  gligen: models\gligen\
  hypernetworks: models\hypernetworks\
  loras: models\loras\
  photomaker: models\photomaker\
  style_models: models\style_models\
  unet: models\unet\
  upscale_models: models\upscale_models\
  vae: models\vae\
  vae_approx: models\vae_approx\
  animatediff_models: models\animatediff_models\
  animatediff_motion_lora: models\animatediff_motion_lora\
  animatediff_video_formats: models\animatediff_video_formats\
  ipadapter: models\ipadapter\
  liveportrait: models\liveportrait\
  insightface: models\insightface\
  layerstyle: models\layerstyle\
  LLM: models\LLM\
  Joy_caption: models\Joy_caption\
  sams: models\sams\
  blip: models\blip\
  CogVideo: models\CogVideo\
  xlabs: models\xlabs\
  instantid: models\instantid\
  custom_nodes: custom_nodes/
  download_model_base: models
  base_path: D:\ComfyUI
 
custom_models:
  base_path: E:\
  checkpoints: models\checkpoints\
  classifiers: models\classifiers\
  clip: models\clip\
  # ... 다른 모델 경로 ...
a1111:
  base_path: D:\stable-diffusion-webui
  checkpoints: models/Stable-diffusion
  # ... 다른 모델 경로 ...
  • base_path는 각 구성에서 사용자 정의할 수 있습니다
  • 각 구성 노드 이름은 custom_modelsa1111처럼 사용자 정의할 수 있지만, 중복될 수 없으며 중복되면 오류가 발생합니다
  • is_default는 이 구성 파일이 기본 구성 파일인지 지정합니다. 하나만 설정할 수 있으며, true로 설정하면 해당 구성 파일이 기본 구성 파일이 됩니다
  • 키 이름은 원본 구성 파일과 일치해야 하며, 폴더는 실제 폴더여야 합니다
  • custom_nodes 폴더는 사용자 정의 플러그인의 경로를 저장하는 데 사용되며, 이는 원래 Portable 버전에는 없었지만 데스크톱 버전에는 있습니다. 기본값으로 유지하는 것이 좋습니다.

ComfyUI Portable과 A1111 간의 모델 공유 구성 방법

서드파티 설치 패키지나 공식 통합 패키지를 사용하든지 간에, 해당 ComfyUI 설치 디렉토리에서 extra_model_paths.yaml.example 파일을 찾을 수 있습니다. 경로는 다음과 같습니다:

ComfyUI_windows_portable
├── ComfyUI
│  ├── extra_model_paths.yaml.example   // 이것은 설정 파일입니다
│  └── ...다른 파일들은 생략되었습니다
└── ...다른 파일들은 생략되었습니다

위의 파일을 찾은 후, extra_model_paths.yaml.exampleextra_model_paths.yaml로 이름을 변경하고 텍스트 편집기로 편집하세요. 해당 코드는 다음과 같습니다:

#이것을 extra_model_paths.yaml로 이름을 변경하면 ComfyUI가 로드합니다
 
 
#a1111 ui 구성
#설치된 위치로 base_path를 변경하기만 하면 됩니다
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
 
#comfyui 구성
#base_path는 기존 comfy 설치 또는 모든 모델, lora 등을 저장하는 중앙 폴더여야 합니다
 
#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를 재시작하세요.

재시작 후 checkpointsVAE 등이 성공적으로 로드되지 않는다면, 설정이 올바른지 확인하세요.

base_path: 경로 아래의 파일 경로가 올바른지 확인해야 합니다. 예를 들어, WebUI 설치 경로가 D:\stable-diffusion-webui\라면, 설정 파일에서 vae 경로는 D:\stable-diffusion-webui\models\VAE가 되어야 합니다. checkpoints, loras 등 다른 항목의 설정도 확인하세요.

다른 UI의 경우에도 위와 같이 설정 파일을 수정할 수 있습니다. 예를 들어 other_ui: 등을 추가할 수 있습니다. 코드 앞의 #를 제거하여 해당 UI에 대한 설정을 추가하고, base_path: 및 해당 드로잉 모델의 경로를 수정하세요.