当前位置: 首页 > news >正文

做得好的政府网站百度pc版网页

做得好的政府网站,百度pc版网页,宝安区建设局网站,网站优化要素AI高速发展,版本更新相当快(11月25日才安装的版本v.0.3.4,27日版本就已经更新到v.0.3.5了),在遇到问题,找到问题原因所在的过程中,ComfyUI版本、python版本、节点对环境版本的依赖,本…

AI高速发展,版本更新相当快(11月25日才安装的版本v.0.3.4,27日版本就已经更新到v.0.3.5了),在遇到问题,找到问题原因所在的过程中,ComfyUI版本、python版本、节点对环境版本的依赖,本文就是在为了解决自己遇到问题过程中,如何快速安装ComfyUI及节点而作的笔记。

1、安装ComfyUI

方法①:下载 Windows 的可移植独立版本ComfyUI 的某个版本,并解压到某个文件夹,最方便。但Python版本固定,不能选择你想要的Python版本,而有些节点,无法在Python3.12运行,例如下面节点在Python3.12下会出错(在DownloadAndLoadFlorence2Model选择flash_attention_2时的错误信息:FlashAttention only supports Ampere GPUs or newer.  由于我的显卡是20系列,不支持BF16运算,在python3.12的flash_attention中则使用了BF16),在Python3.11则没有问题。

方法②:通过ComfyUI-Manager升级ComfyUI,但只能升级到最新版本,不能升级到指定版本。

方法③:选择①中的Python环境(选择需要的python版本),将ComfyUI文件夹删除,然后用git命令安装指定版本的ComfyUI(直接下载ComfyUI 不同版本的Source code (zip) 解压会少了 .git 文件夹少了版本信息):

git clone -b <版本号> <仓库地址>
git clone -b v0.3.3 https://github.com/comfyanonymous/ComfyUI.git

通过代理加速

git clone -b v0.3.3 https://ghp.ci/https://github.com/comfyanonymous/ComfyUI.git

(当然也可以用中的压缩包,只解压包中的ComfyUI文件夹即可) 

ComfyUI版本Python版本
v0.0.1--v0.0.33.11.8
v0.0.4--v0.2.33.11.9
v0.2.4--v0.3.63.12.7

注意:对于wheel模块,根据需要卸载或安装,可能需要反复进行卸载或安装,原因看第8点。

建议:安装编译环境。因为有些依赖项如果不下载whl安装,是需要编译安装的,编译环境安装可参考《在ComfyUI的python_embeded下编译安装module

附:ComfyUI 可实现的功能的示例(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/LyCORISclip: clip/clip_vision: clip_vision/controlnet: controlnet/instantid: instantidupscale_models: upscale_modelsdiffusion_models: diffusion_modelspulid: pulidBiRefNet: BiRefNetblip: blipLLM: LLMsams: samsunet: unet
#Only 1 path is allowed except for checkpoints, VAE, etcinpaint: inpaintstablesr: stablesrstyle_models: style_modelsa1111:base_path: G:\HD_models\checkpoints: checkpoints/vae: VAE/loras: |Loras
#         models/LyCORISclip: clip/clip_vision: clip_vision/controlnet: controlnet/instantid: instantidupscale_models: upscale_modelsdiffusion_models: diffusion_modelsunet: unetstyle_models: style_models

3、第一类节点:下载Zip包解压即可使用、或者再需要安装依赖项(requirements、[参考第5点安装所需]module,节点缺少的module与你的环境不同而会有差异,缺什么就装什么就是了

节点名称及下载地址

在路径ComfyUI\custom_nodes下

执行命令

备注

ComfyUI-Manager     Zip

在节点上显示节点 Id 

cg-use-everywhere     Zip

Comfyroll_CustomNodes    Zip

节点:

CR Text Concatenate  文本连接

CR Text  文本输入

ComfyUI_essentials     Zip

rgthree-comfy     Zip

Show fast toggles in Group Headers

在 Group Headers 中显示快速切换

点击查看B站关于该节点的使用教程

只有删除安装路径缓存temp文件,并退出

ComfyUI,才能彻底释放内存,

Image Comparer (rgthree) 才不会显示图像

Custom_Nodes_AlekPet

   ZIp

提示词翻译

AIGODLIKE-ComfyUI-Translation

Zip

语言包,至少从版本v0.3.10开始,已经不需要了。

comfyui-mixlab-nodes    Zip

..\..\python_embeded\python.exe -m pip install -r comfyui-mixlab-nodes\requirements.txt

提示词翻译

comfyui-inpaint-nodes     Zip

ComfyUI-Custom-Scripts      Zip

工具箱,🐍型图标,在设置中的pysssss项

设置 Image Feed Location 为hidden

不显示生成的图片在窗口4边

Comfyui_TTP_Toolset     Zip

NameError: name 'apply_gaussian_blur' is not defined点击连接有修复方法

ComfyUI_FaceAnalysis     Zip

需要安装如下module:

insightface、dlib

当protobuf<3.20.0时,只能用dlib

与ComfyUI-FluxTrainer对protobuf的要求可能冲突

把下载的模型解压到路径:

ComfyUI_FaceAnalysis\dlib

models\insightface\models\auraface\

models\insightface\models\buffalo_l\

节点:Face Bounding Box ,剪裁脸部(长方形),

可通过padding_percent=0.3《填充百分比》或padding来调整剪裁脸部大小

ComfyUI_InstantID     Zip

需要安装如下module:

insightface、onnxruntime-gpu、onnxruntime

把下载的模型解压到路径:

models\insightface\models\antelopev2\

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\models\

节点所需模型:

LayerMask: PersonMaskUltra V2

models\mediapipe

LayerMask: SegmentAnythingUltra
models\sams
models\grounding-dino

模型70G

ComfyUI-BrushNet     Zip

..\..\python_embeded\python.exe -m pip install -r ComfyUI-BrushNet\requirements.txt

会将 accelerate版本降到 0.31.0

ComfyUI-Crystools     ZIp

..\..\python_embeded\python.exe -m pip install -r ComfyUI-Crystools\requirements.txt

当ComfyUI中的参数Menu设置Top或bottom时,

参数Position要设为top才能显示

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

需要安装如下module:timm、accelerate

在DownloadAndLoadFlorence2Model选择flash_attention_2时,需要安装:flash_attn

模型只能放在该路径下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

Image Crop Face 剪裁脸部(正方形)

不放大,不能处理批量图像

(下载所有文件)放到模型路径:

models\clipseg\models--CIDAS--clipseg-rd64-refined\snapshots

\583b388deb98a04feb3e1f816dcdb8f3062ee205

节点:

Text Concatenate  文本连接,可以去除前后空格

Text Multiline  文本输入

ComfyUI-Easy-Use     ZIp

..\..\python_embeded\python.exe -m pip install -r ComfyUI-Easy-Use\requirements.txt

If else 条件执行,点击参考B站使用视频

for 循环,点击参考B站使用视频

在节点上显示执行时间

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

ComfyUI-GGUF     Zip

..\..\python_embeded\python.exe -m pip install -r ComfyUI-GGUF\requirements.txt

ComfyUI-PuLID-Flux-Enhanced     Zip

需要安装如下module:facexlib、ftfy

模型放在(可引用)

models\pulid

20系列显卡因为不支持BF16,

用不了这个节点点击办法解决

ComfyUI-PuLID-Flux

Zip

原版(作者已经不提供支持,而且错误较多)

facerestore_cf     Zip

我修改了模型加载节点FaceRestoreModelLoade,

可以加载另外2个模型,实现

黑白变彩色、inpainting。

需要安装如下module:lpips

models/facerestore_models:GFPGANv1.4.pth 、 codeformer.pth、

codeformer_colorization.pth、

codeformer_inpainting.pth

models/facedetection:

detection_Resnet50_Final.pth detection_mobilenet0.25_Final.pth

yolov5l-face.pth 、yolov5n-face.pth

我最早接触的大名鼎鼎的脸部修复CodeFormer (被它的效果震撼到了)的comfyui实现节点

节点:CropFace ,剪裁脸部,并缩放到512*512

ComfyUI-SUPIR    Zip

..\..\python_embeded\python.exe -m pip install -r ComfyUI-SUPIR\requirements.txt

Comfyui_CXH_joy_caption

     Zip    打标

需要安装如下module:

scikit_build_core、llama-cpp-python

..\..\python_embeded\python.exe -m pip install -r Comfyui_CXH_joy_caption\requirements.txt

模型:

clip/siglip-so400m-patch14-384

LLM/Meta-Llama-3.1-8B-bnb-4bit

models\Joy_caption_alpha

ComfyLiterals    Zip

ComfyUI-VideoHelperSuite    Zip

节点:

Load Images (Path) 装载路径下的所有图片

cg-training-tools    Zip

打标,节点:

Iterate Images、Save With Text File、Describe Image、Save Description

ComfyUI-FluxTrainer     Zip

..\..\python_embeded\python.exe -m pip install -r ComfyUI-FluxTrainer\requirements.txt

需要安装如下module:protobuf版本要求<=3.20.0

可能与ComfyUI_FaceAnalysis

的要求冲突

ComfyUI-Inpaint-CropAndStitch

     Zip

示例工作流使用了ControlNetInpaintingAliMamaApply,对重绘区域先剪裁,重绘后再黏贴回原图

ComfyUI_IPAdapter_plus   Zip模型文件多,可查看参考文章。

comfyui-reactor-node

Zip

节点:

Save Face Model

Build Blended Face Model 参数:

send_only 设置为NO,则每次都重新构建

face_model name 可带路径保存构建的模型

Load Face Model 使用的路径:

models\reactor\faces

 模型路径及模型:

ComfyUI\models\insightface:

inswapper_128.onnx

ComfyUI\models\facerestore_models:

GPEN-BFR-512.onnx

models\ultralytics\bbox:

face_yolov8n.pt

models\sams:(可引用)

sam_vit_b_01ec64.pth

ComfyUI-

Bringing-Old-Photos-Back-to-Life

Zip

Load Face Detector Model (Dlib):

模型放置路径:models\facedetection

shape_predictor_68_face_landmarks.dat

其他模型:models\checkpoints、vae(可引用)

BOPBTL Models  、 Face Enhancement Models

comfyui_controlnet_aux

Zip

..\..\python_embeded\python.exe -m pip install -r comfyui_

controlnet_aux\requirements.txt

需要安装的模块 svglib ,要使用 wheel 编译

comfyui_face_parsing

Zip

模型:

  1. Download the .json and .safetensors files from the face parsing model repo and save them to the "models/face_parsing/" folder.
  2. Download the face_yolov8m.pt from the Bingsu/adetailer repo and save it to "models/ultralytics/bbox" folder.

masquerade-nodes-comfyui

Zip

ComfyUI-Detail-Daemon

Zip

ComfyUI_AdvancedRefluxControl

Zip

ComfyUI-Advanced-ControlNet

Zip

ComfyUI-Impact-Pack

Zip

..\..\python_embeded\python.exe -m pip install -r ComfyUI-Impact-Pack\requirements.txt

模型放置路径:

models\sams

ComfyUI-Impact-Subpack

Zip

..\..\python_embeded\python.exe -m pip install -r ComfyUI-Impact-Subpack\requirements.txt

节点:UltralyticsDetectorProvider

从 ComfyUI-Impact-Pack 拆分出来

CharacterFaceSwap

Zip

节点:Crop Face  ,剪裁脸部(正方形),不放大,不能处理批量图像

节点:Load RetinaFace,

加载模型 detection_Resnet50_Final.pth

模型路径:ComfyUI\models\facexlib\

sd-lora-trainer

Zip

sd-ppp     Zip在 Photoshop 和 ComfyUI 之间进行通信


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

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

节点名称

在路径ComfyUI\custom_nodes下

执行命令

备注

ComfyUI_UltimateSDUpscalegit clone https://github.com/ssitu/ComfyUI_UltimateSDUpscale --recursive
ComfyUI-Inspire-Packgit clone -v --recursive --progress -- https://github.com/ltdrdata/ComfyUI-Inspire-Pack

5、依赖 module 的安装

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

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

模块名称及下载地址备注
insightface      whl

需要下载 whl 安装

numpy版本不能太高,需要安装较低版本:
python_embeded\python.exe -m pip install numpy===1.26.4

dlib      whl需要下载 whl 安装
onnxruntime-gpu      whl模块文件大小:279M
onnxruntime             whl文件较小,可以pip命令直接安装
facexlib      whl

依赖项 :filterpy

在python 3.11时无法自动Building wheel for filterpy ,从而无法安装

可以下载 filterpy  安装  ,或者使用 pip install facexlib --no-deps 不安装依赖项 filterpy。

模型放置路径:

\python_embeded\Lib\site-packages\facexlib\weights
所需模型:
detection_Resnet50_Final.pth  (PuLID-Flux需要)

parsing_bisenet.pth                   (PuLID-Flux需要)

parsing_parsenet.pth                 (PuLID-Flux需要)

alignment_WFLW_4HG.pth

recognition_arcface_ir_se50.pth

filterpy      whl需要下载 whl 安装,在python 3.12下可用pip直接安装
ftfy            whl
flash_attn    whl    whl下载 whl 安装,自行编译安装需要2-5个小时。
xformers       whl

模块文件大小:160M

没安装 xformers 时:Using pytorch cross attention

Using xformers cross attention

apex             whl

没安装 apex 时:

Nvidia APEX normalization not installed, using PyTorch LayerNorm

llama-cpp-python    whl需要下载 whl 安装,否则需要自己配置编译环境
wheel

 比较重要的module版本对应关系:

torchtorchaudiotorchvisionCUDA版本支持的torch版本
2.4.0 2.4.0 0.19.011.71.13.0--2.0.1
2.4.12.4.10.19.111.82.0.0--2.5.1
2.5.02.5.00.20.012.12.1.0--2.5.1
2.5.12.5.10.20.112.42.4.0--2.5.1

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

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

echo 批量去除文件夹名中字符-main、-master
@echo off
setlocal enabledelayedexpansionset "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

7、ComfyUI缓存路径

C:\Users\Monday\.cache 

H:\ComfyUI_windows_portable\ComfyUI\temp

8、python 3.11与python 3.12的一点区别引起的问题以及解决办法

①、在python 3.11环境中,想要安装 python.exe -m pip install filterpy包时,会报如下错误:

Collecting filterpy
  Using cached filterpy-1.4.5.zip (177 kB)
 
Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1

而在在python 3.12环境中,安装过程显示的信息如下:

Collecting filterpy
  Using cached filterpy-1.4.5.zip (177 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
 
Preparing metadata (pyproject.toml) ... done

发现 Preparing metadata 这个过程是不一样的,但在完全安装的 3.11环境中,安装filterpy包时是与 3.12 一样并能成功安装。花了一天时间各种尝试,终于从 get-pip.py 发现 3.11与3.12版本区别的地方,只要执行 python.exe -m pip uninstall wheel 卸载了 wheel 即可以。  

②、 而在安装comfyui_controlnet_aux的依赖项时,则出现了用 pyproject.toml 不能编译的错误:

Collecting svglib (from -r requirements.txt (line 15))
  Downloading svglib-1.5.1.tar.gz (913 kB)
     ---------------------------------------- 913.9/913.9 kB 2.6 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
 
Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.

 重新装回 wheel 后,依赖项安装成功。

 Collecting svglib (from -r requirements.txt (line 15))
  Using cached svglib-1.5.1.tar.gz (913 kB)
  Preparing metadata (setup.py) ... done

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

http://www.mmbaike.com/news/59516.html

相关文章:

  • 网站 php java友情链接官网
  • 网站建设全套流程济南网络推广网络营销
  • 做外贸网站那个好佛山网站建设正规公司
  • joomla做类似赶集网的网站网站优化技巧
  • 加盟凡科建站宁波优化网页基本流程
  • 宝山php网站开发培训百度风云排行榜
  • 电商网站建设济南建网站看片应该搜什么关键词哪些词
  • 制作网站培训全国互联网营销大赛官网
  • 怎么申请公司网站百度app浏览器下载
  • 外网平面设计网站公司想做网络推广贵不
  • 网站关键词突然搜不到了百度seo排名在线点击器
  • b2b电子商务网站的盈利模式营销型网站建设目标
  • 西安建设市场诚信信息平台网站互联网营销推广方案
  • APP网站怎么做谷歌浏览器直接打开
  • 重庆企业网站建设哪家专业网站单向外链推广工具
  • 神马网站可以做兼职yandex引擎
  • 广州达美网站建设公司如何让百度快速收录
  • 提供邯郸做移动网站女生做sem还是seo
  • 珲春市建设局网站青岛seo推广专员
  • 宁波建设监理协会网站百度地图轨迹导航
  • 网站建设是属于软件吗如何拿高权重网站外链进行互换?
  • 企业建设网站的过程百度下载2022新版安装
  • 怎么做内网网站网站建设平台软件
  • Oss怎么做静态网站最近的新闻大事10条
  • 网站推广实施方案网络平台营销
  • 网站建设公司公司竞价推广招聘
  • 建网站开发语言对比网站设计
  • 郑州经济技术开发区管理委员会关于进一步优化落实疫情防控措施
  • 为什么要建微信网站上海网站seo排名优化
  • 新建网站百度怎么收录制作一个网站步骤