本地部署 ComfyUI

在这里插入图片描述

ComfyUI 介绍

最强大、模块化的稳定扩散 GUI 和后端。

该用户界面将允许您使用基于图形/节点/流程图的界面设计和执行高级稳定扩散管道。

ComfyUI Github 地址

https://github.com/comfyanonymous/ComfyUI

部署 ComfyUI

克隆代码库,

git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI

创建虚拟环境,

conda create -n comfyui python=3.10 -y
conda activate comfyui

使用 pip 安装 pytorch,

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
# conda install -y -c "nvidia/label/cuda-12.1.0" cuda-runtime

验证 cuda 可用,

python -c "import torch;print(torch.cuda.is_available());"

使用 pip 安装依赖,

扫描二维码关注公众号,回复: 17147041 查看本文章
pip install -r requirements.txt

配置模型地址 or 下载模型

(1) 配置模型地址

拷贝 extra_model_paths.yaml.exampleextra_model_paths.yaml

修改示例如下,E:/workspace/sd-webui-aki-v4.4 是你的 Stable Diffusion Web UI的地址,

a111:
    base_path: E:/workspace/sd-webui-aki-v4.4

(2) 下载模型

将您的 SD checkpoints(巨大的 ckpt/safetensors 文件)放入:models/checkpoints

将您的 VAE 放入:models/vae

启动 ComfyUI

运行,

python main.py

访问 ComfyUI

使用浏览器访问,

http://127.0.0.1:8188/

在这里插入图片描述

使用技巧

页面底部显示图片预览

单击 “图片” 图标,

在这里插入图片描述

在这里插入图片描述

改变连接线的格式

在这里插入图片描述
在这里插入图片描述

配置 prompt 自动补全

在这里插入图片描述
在这里插入图片描述

安装 ComfyUI-Manager

cd ComfyUI
git clone https://github.com/ltdrdata/ComfyUI-Manager.git custom_nodes/ComfyUI-Manager

安装 AIGODLIKE-COMFYUI-TRANSLATION

git clone https://github.com/AIGODLIKE/AIGODLIKE-ComfyUI-Translation.git custom_nodes/AIGODLIKE-ComfyUI-Translation

或者,
在这里插入图片描述
在这里插入图片描述

安装 ComfyUI-Custom-Scripts

git clone https://github.com/pythongosssss/ComfyUI-Custom-Scripts custom_nodes/ComfyUI-Custom-Scripts

或者,
在这里插入图片描述
在这里插入图片描述

安装 ComfyUI-WD14-Tagger

https://github.com/pythongosssss/ComfyUI-WD14-Tagger

或者,
在这里插入图片描述

安装 ComfyUI_NetDist

pip install requests
git clone https://github.com/city96/ComfyUI_NetDist custom_nodes/ComfyUI_NetDist

配置参考如下,

在这里插入图片描述

安装 FreeU_Advanced

在这里插入图片描述
在这里插入图片描述

安装 Efficiency Nodes

作者不在继续维护这个 repo 了

pip install simpleeval

在这里插入图片描述
在这里插入图片描述

安装 ComfyUI’s ControlNet Auxiliary Preprocessors

在这里插入图片描述
在这里插入图片描述
测试结果,

在这里插入图片描述

安装 UltimateSDUpscale

在这里插入图片描述
配置示例,

在这里插入图片描述

安装 LCMSampler-ComfyUI

在这里插入图片描述
下载 lcm-lora 权重,有 3 个 lora,分别对应不同的 base model,文件名都是 'pytorch_lora_weights.safetensors",需要修改为不同的名称。
保存到 models\Lora 目录下。

  • https://huggingface.co/latent-consistency/lcm-lora-ssd-1b/tree/main
  • https://huggingface.co/latent-consistency/lcm-lora-sdxl/tree/main
  • https://huggingface.co/latent-consistency/lcm-lora-sdv1-5/tree/main

安装 AlekPet/ComfyUI_Custom_Nodes_AlekPet

在这里插入图片描述

安装 ComfyUI_IPAdapter_plus

在这里插入图片描述

完结!

猜你喜欢

转载自blog.csdn.net/engchina/article/details/134590110