ComfyUI节点安装笔记

AI高速发展,版本更新相当快(11月25日才安装的版本v.0.3.4,27日版本就已经更新到v.0.3.5了,当然不是说所有的版本更新都需要全部全新安装),在遇到问题,而不能通过update来更新各个节点解决时,全新安装环境就成为了我的一个需要,本文就是为了快速安装ComfyUI及节点而作的笔记。

1、首先下载 ComfyUI 某个版本,并解压到某个路径。

2、使用 extra_model_paths.yaml 来引用模型

为了重装环境而不需要理会模型的放置,又或者需要安装多个不同版本的ComfyUI而共用模型,可以将模型放在固定位置,并通过文件extra_model_paths.yaml 来引用模型,但有些模型,是不能通过指引来引用的,必须放置到特定的目录下 。附:《extra_model_paths.yaml解读》。

我的 ComfyUI\extra_model_paths.yaml 文件如下(根据自己的情况,只修改base_path即可):

复制代码
#put this file in base_path like G:\ComfyUl windows portable\ComfyUl

#  H: is SSD
a222:
    base_path: H:\SSD_models\

    checkpoints: checkpoints/
    vae: VAE/
    loras: |
         Loras
#         models/LyCORIS
    clip: clip/
    clip_vision: clip_vision/
    controlnet: controlnet/
    instantid: instantid
    upscale_models: upscale_models
    diffusion_models: diffusion_models
    pulid: pulid
    BiRefNet: BiRefNet
    blip: blip
    LLM: LLM
    sams: sams
    unet: unet
#Only 1 path is allowed except for checkpoints, VAE, etc
    inpaint: inpaint
    stablesr: stablesr
    style_models: style_models

a1111:
    base_path: G:\HD_models\

    checkpoints: checkpoints/
    vae: VAE/
    loras: |
         Loras
#         models/LyCORIS
    clip: clip/
    clip_vision: clip_vision/
    controlnet: controlnet/
    instantid: instantid
    upscale_models: upscale_models
    diffusion_models: diffusion_models
    unet: unet
    style_models: style_models

3、第一类节点:下载Zip包解压即可使用、或者再需要安装依赖项( requirements、module**)**

|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 节点名称及下载地址 | 在路径ComfyUI\custom_nodes下 执行命令 | 备注 |
| ComfyUI-Manager Zip | | |
| cg-use-everywhere Zip | | |
| ComfyUI_Comfyroll_CustomNodes Zip | | |
| ComfyUI_essentials Zip | | |
| rgthree-comfy Zip | | |
| AIGODLIKE-ComfyUI-Translation Zip | | |
| comfyui-inpaint-nodes Zip | | |
| ComfyUI-Custom-Scripts Zip | | |
| Comfyui_TTP_Toolset Zip | | |
| ComfyUI_FaceAnalysis Zip | 参考第5点安装如下所需module insightface、dlib | |
| ComfyUI_InstantID Zip | 参考第5点安装如下所需module insightface、onnxruntime-gpu、onnxruntime | |
| ComfyUI_LayerStyle Zip | ..\..\python_embeded\python.exe -s -m pip install ComfyUI_LayerStyle\whl\docopt-0.6.2-py2.py3-none-any.whl ..\..\python_embeded\python.exe -s -m pip install ComfyUI_LayerStyle\whl\hydra_core-1.3.2-py3-none-any.whl ..\..\python_embeded\python.exe -s -m pip install -r ComfyUI_LayerStyle\requirements.txt 下面这个先不执行,看看运行情况再定: ComfyUI_LayerStyle\repair_dependency.bat | |
| ComfyUI-BrushNet Zip | ..\..\python_embeded\python.exe -m pip install -r ComfyUI-BrushNet\requirements.txt | |
| ComfyUI-Crystools ZIp | ..\..\python_embeded\python.exe -m pip install -r ComfyUI-Crystools\requirements.txt | |
| ComfyUI-KJNodes Zip | ..\..\python_embeded\python.exe -m pip install -r ComfyUI-KJNodes\requirements.txt | |
| comfyui-tensorops Zip | ..\..\python_embeded\python.exe -m pip install -r comfyui-tensorops\requirements.txt | |
| ComfyUI-Florence2 Zip | ..\..\python_embeded\python.exe -m pip install -r ComfyUI-Florence2\requirements.txt | 模型只能放在该路径下ComfyUI\models\LLM 要将模型下载到不同的模型子目录下, 下载链接里面的所有文件都需要下载: 模型1:ComfyUI\models\LLM\Florence-2-large 模型2:ComfyUI\models\LLM\Florence-2-large-PromptGen-v1.5 |
| was-node-suite-comfyui Zip | ..\..\python_embeded\python.exe -m pip install -r was-node-suite-comfyui\requirements.txt | |
| ComfyUI-Easy-Use ZIp | ..\..\python_embeded\python.exe -m pip install -r ComfyUI-Easy-Use\requirements.txt | |
| ComfyUI-Inspyrenet-Rembg Zip 抠图 | ..\..\python_embeded\python.exe -m pip install -r ComfyUI-Inspyrenet-Rembg\requirements.txt | packaging版本降到23.2 很奇怪,试过没放置模型时,很慢,放置模型\transparent-background后,很快,然后删除了模型,依然很快。 model_zoo.md |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |

4、 第二类需要用 git 命令安装

加速参考《 GitHub加速》,就是在地址前面加上 https://ghp.ci/**,例如:**git clone https://ghp.ci/https://github.com/ltdrdata/ComfyUI-Impact-Pack --recursive

|-------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|
| 节点名称 | 在路径ComfyUI\custom_nodes下 执行命令 | 节点模型放置路径 |
| ComfyUI-Impact-Pack | git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack --recursive cd ComfyUI-Impact-Pack git clone https://github.com/ltdrdata/ComfyUI-Impact-Subpack impact_subpack ..\..\..\python_embeded\python.exe -m pip install segment_anything ..\..\..\python_embeded\python.exe -m pip install ultralytics | models\sams |
| ComfyUI_UltimateSDUpscale | git clone https://github.com/ssitu/ComfyUI_UltimateSDUpscale --recursive | |
| ComfyUI-Inspire-Pack | git clone -v --recursive --progress -- https://github.com/ltdrdata/ComfyUI-Inspire-Pack | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |

5、依赖 module 的安装

缺少什么模块就安装什么。

有些 module 还是比较大的,每次直接用 pip 安装,可能会下载比较长时间,将安装 whl 保存下来,下载安装时直接安装 whl ,将会节省你不少时间。要注意,有些模块是与环境版本匹配的,要下载匹配环境的。

|---------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 模块名称及下载地址 | 备注 |
| insightface | 需要下载 whl 安装 numpy版本不能太高,需要安装较低版本: python_embeded\python.exe -m pip install numpy===1.26.4 模型路径结构: ComfyUI\models\insightface ComfyUI\models\insightface\models ComfyUI\models\insightface\models\antelopev2 ComfyUI\models\insightface\models\buffalo_l 模型下载: antelopev2、buffalo_l |
| dlib | 需要下载 whl 安装 |
| onnxruntime-gpu | 279M |
| onnxruntime | 文件较小,可以pip命令直接安装 |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |

6、批量去除文件夹名中字符-main、-master

上面第3点下载的Zip压缩包解压后,文件夹名称后面会带-main、-master,将下面命令复制到一个 bat 文件,放置到 ComfyUI\custom_nodes 路径下,双击运行即可批量 除文件夹名中字符-main、-master,例如文件夹 ComfyUI-KJNodes-main ,修改为 ComfyUI-KJNodes。

复制代码
echo 批量去除文件夹名中字符-main、-master
@echo off
setlocal enabledelayedexpansion

set "old_string=-main"
set "old_string_2=-master"

for /d %%D in (*) do (
    set "folder_name=%%D"
    set "new_folder_name=!folder_name:%old_string%=!"
    set "new_folder_name_2=!folder_name:%old_string_2%=!"
    if "!folder_name!" neq "!new_folder_name!" (
        ren "%%D" "!new_folder_name!"
    )
    if "!folder_name!" neq "!new_folder_name_2!" (
        ren "%%D" "!new_folder_name_2!"
    )

)

@echo on

会不定时补充我自己安装过的节点资料。

相关推荐
懒惰的bit9 天前
STM32F103C8T6 学习笔记摘要(四)
笔记·stm32·学习
zkyqss9 天前
OVS Faucet练习(下)
linux·笔记·openstack
浦东新村轱天乐9 天前
【麻省理工】《how to speaking》笔记
笔记
奔跑的蜗牛AZ9 天前
TiDB 字符串行转列与 JSON 数据查询优化知识笔记
笔记·json·tidb
cwtlw9 天前
Excel学习03
笔记·学习·其他·excel
杭州杭州杭州9 天前
计算机网络笔记
笔记·计算机网络
cyborg9 天前
终于再也不用在notion中写公式了
笔记
循环过三天9 天前
1.2、CAN总线帧格式
笔记·stm32·单片机·嵌入式硬件·学习
循环过三天9 天前
1.1、CAN总线简介
笔记·stm32·单片机·嵌入式硬件·学习
mooyuan天天10 天前
pikachu靶场通关笔记43 SSRF关卡01-CURL(三种方法渗透)
笔记·安全·web安全·ssrf漏洞