学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

2024-02-2018:49:00AI绘画与短视频剪辑Comments593 views字数 16259阅读模式

学习和使用ComfyUI最痛苦的是什么?就是这满屏的红色方框和和报错信息,处理完一批又一批,很多人玩了一两个流程就搞不下去了,很多初学者因此就放弃了。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

如果你想咬牙继续学习,体验comfyUI给你带来的高效和快感,希望这篇文章能帮助解决常见的技术问题,让你畅快使用ComfyUI。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

最近因为部分SD的流程需要自动化,批量化,所以开始学习和使用ComfyUI,我搞了一个多月了,期间经历过各种问题,由于是技术出身,对troubleshooting本身就执着,所以一步一步的解决问题过程中积累了很多经验,同时也在网上做一些课程,帮助一些非技术出身的小白学员入门了comfyUI.希望通过本文就记录一些安装和使用的常见问题,让大家踩坑后能尽快解决吧。其实github上issue里面也有很多有用的内容,如果英文好的小伙伴可以直接去哪里解决。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

以我的使用经验问题大多出在各种Custom node安装和模型下载上,另外由于开源组件更新快,很多相关组件都需要及时更新到最新版本,所以有些时候出了问题,把相关的包更新一下,问题就可能解决了。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

1. 关于一键安装包

首先要对一键安装包的作者致敬,花了精力方便很多技术小白用户入门学习。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

但是我自己使用和教学员的经历来看,一键安装包在后期使用上存在着很多不方便的地方, 因为是开源项目,主版本和各种custom node更新非常快,很多问题就是版本更新不及时产生的。 另外会出现各种客户化节点缺失,最后还是需要学习手动安装custom node. 所以对于学习来讲,可能是无法偷懒的。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

我对学员说的是:你既然选择了学习ComfyUI,就是选择了挑战自己,自己安装custom node也只是挑战的一小部分。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

总结一下:尽量自己直接通过github拉项目或者下载Portable安装包,学习安装各种节点。 确实不愿意弄,那就去搞一键安装包。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

2.ComfyUI的安装

a.安装的常见问题

本文不讨论安装过程,因为安装的指南文章很多,只简要说一下安装需要注意的问题.文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

ComfyUI和其它sd的工具一样,非常依赖cuda和c语言的开发环境,所以cuda相关的包, windows上的微软开发工具一定要事先安装好。即便你用的是portable或者一键安装包,后面使用过程中会给你带来极大的便利。如果使用conda或python的venv,那就要安装好python环境。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

总结:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

  1. 必须安装好cuda,cudnn等相关的工具环境
  2. 安装msvs,gcc这类开发环境
  3. python环境。(用embeding python的记住安装要用 ../

b.与其他Stable diffusion软件共享模型文件

在comfyui目录下有个extra_model_paths.yaml.example文,你需要重命名为extra_model_paths.yaml,文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

里面有个a111的配置就是webui,你把webui的路径配置上就可以了。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法
#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: C:/dev/sd160/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

#other_ui:
#    base_path: path/to/ui
#    checkpoints: models/checkpoints
#    gligen: models/gligen
#    custom_nodes: path/custom_nodes

c. ComfyUI的更新

从评论区可以看到,很多时候遇到的问题都是ComfyUI没有更新导致的,如果你经常使用它,并且经常跑网上最新的一些流程例子,你就需要经常性的更新ComfyUI。更新的方法一般有以下几种。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

1)如果是windows portable版本,有个update文件夹,直接执行里面的update_comfyui.bat就可以。另外一个命令会更新一些python依赖包,文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

2)重新在comfy网址下载最新版本,这个方法不方便的地方是需要你把所有custom_nodes文件夹拷贝过去,而且有些节点需要手工安装python包和依赖。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

3)如果是用git clone方式安装的, 你重新git pull一下就可以了。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

3.ComfyUI节点的安装

a.发现缺失的节点

很多人说用Manager,节点管理器来管理custom node,但是现实情况是国内由于墙的原因,经常下载失败。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

所以学会手动安装是ComfyUI必备技能。如果你引入的流程上,出现大量的红色节点和红色的提示,那么说明你缺少对应节点,文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

你可以首先点击"Install Missing Custom Nodes文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

这个时候注意,要开着科学上网,因为它要访问这个两个github的网址文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

FETCH DATA from: raw.githubusercontent.com
FETCH DATA from: raw.githubusercontent.com文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

你点击Install后, 虽然显示安装成功,并且让你重新启动,但是不要被表面现象迷惑,很可能安装是失败的。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

只有如下图显示了紫色disable和红色uninstall的色块才是安装成功的标志.文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

要在文件浏览器里检查,对应的文件夹是不是出现了, ComfyUI/custom_nodes下按照时间排序,看看有没有当前时间段创建的文件夹,如果没有说明需要手工安装。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

通过两个方式拿到节点的git库地址,一是点击install之后看后台的信息, 看到有git clone .文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

b.手工安装节点node

可以打开一个cmd窗口,进到comfyUI/custom_node路径下,把命令拷贝过去 git clone '...',这会儿不要执行,因为访问git需要加一个代理。 你可以把引号删除,同时加上 mirror.ghproxy.com/http. 如图所示:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

ghproxy是非常好用的git 代理。但是最近被墙了,可以改用mirror.ghproxy.com, 非常推荐大家使用。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

注:我个人使用是comfyUI开两个窗口,不要直接点run_nvidia_gpu.bat 这个文件启动,开一个cmd窗口或者poweshell,进入命令行启动它,因为后面安装节点要反复执行这个命令,你这个窗口只需要按ctrl+c 停止服务器,再按上箭头和回车就可以重新启动新的comfyUI,效率高很多。另外一个窗口只负责更新节点和python库,也省去了每次都要新开窗口进入custom nodes路径的时间。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

c.安装python依赖包

有些节点如果重启后还是import failed,可能是需要你手工安装一些python包,你需要仔细查看对应github库的readme.md文件。 在启动时,会报一些 No module named xxxx 这类错误信息,那就是需要手动安装这些包。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

像下面这个示例中charactor face swap包,就写明了手动安装时,需要执行的命令文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

这时可以进入另一个专门安装包和节点的窗口。执行..\..\..\python_embeded\python install.py文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

注意linux环境和windows环境斜杠方向不同。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

这里面要注意一下,其实install.py是comfyUI启动或安装时会自动调用的脚本.只不过由于我们有些时候安装不成功才需要执行它。另外一些节点常见的安装过程是需要 ..\..\..\python_embeded\python -m pip install -r requirements.txt 来手动安装各种python包。 我的这种安装方式适用于安装portable包的小伙伴,要是你通过venv或者conda环境安装的comfyUI,那你直接用pip就好了。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

还有些节点需要额外的安装步骤,请自行仔细阅读开源项目的readme.md文件,答案都在那里。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

d.一些特殊的节点

有些特殊的节点,其实只是一个python文件,你下载了github文件夹后还需要把文件直接放到custom_nodes的目录下。比如这个clipseg节点组件。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

还有这几个组件。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

e.网络不通怎么办?

如果网络不通,一般会报"[WinError 121]信号灯超时时间已到”或者文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

Error handling request
Traceback (most recent call last):
  File "C:\DEV\ComfyUI_windows_portable\python_embeded\lib\site-packages\aiohttp\web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
  File "C:\DEV\ComfyUI_windows_portable\python_embeded\lib\site-packages\aiohttp\web_app.py", line 504, in _handle
    resp = await handler(request)
  File "C:\DEV\ComfyUI_windows_portable\python_embeded\lib\site-packages\aiohttp\web_middlewares.py", line 117, in impl
    return await handler(request)
  File "C:\DEV\ComfyUI_windows_portable\ComfyUI\server.py", line 46, in cache_control
    response: web.Response = await handler(request)
  File "C:\DEV\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager\__init__.py", line 522, in fetch_customnode_mappings
    json_obj = await get_data(uri)
  File "C:\DEV\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager\__init__.py", line 367, in get_data
    async with session.get(uri) as resp:
  File "C:\DEV\ComfyUI_windows_portable\python_embeded\lib\site-packages\aiohttp\client.py", line 1141, in __aenter__
    self._resp = await self._coro
  File "C:\DEV\ComfyUI_windows_portable\python_embeded\lib\site-packages\aiohttp\client.py", line 560, in _request
    await resp.start(conn)
  File "C:\DEV\ComfyUI_windows_portable\python_embeded\lib\site-packages\aiohttp\client_reqrep.py", line 899, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
  File "C:\DEV\ComfyUI_windows_portable\python_embeded\lib\site-packages\aiohttp\streams.py", line 616, in read
    await self._waiter
aiohttp.client_exceptions.ClientOSError: [WinError 121] 信号灯超时时间已到

无法连接github的错误信息"Cannot connect to host raw.githubusercontent.com:443 ssl:default [None]"文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

Traceback (most recent call last):
  File "C:\DEV\ComfyUI_windows_portable\python_embeded\lib\site-packages\aiohttp\web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
  File "C:\DEV\ComfyUI_windows_portable\python_embeded\lib\site-packages\aiohttp\web_app.py", line 504, in _handle
    resp = await handler(request)
  File "C:\DEV\ComfyUI_windows_portable\python_embeded\lib\site-packages\aiohttp\web_middlewares.py", line 117, in impl
    return await handler(request)
  File "C:\DEV\ComfyUI_windows_portable\ComfyUI\server.py", line 46, in cache_control
    response: web.Response = await handler(request)
  File "C:\DEV\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager\__init__.py", line 582, in fetch_customnode_list
    json_obj = await get_data(uri)
  File "C:\DEV\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager\__init__.py", line 367, in get_data
    async with session.get(uri) as resp:
  File "C:\DEV\ComfyUI_windows_portable\python_embeded\lib\site-packages\aiohttp\client.py", line 1141, in __aenter__
    self._resp = await self._coro
  File "C:\DEV\ComfyUI_windows_portable\python_embeded\lib\site-packages\aiohttp\client.py", line 536, in _request
    conn = await self._connector.connect(
  File "C:\DEV\ComfyUI_windows_portable\python_embeded\lib\site-packages\aiohttp\connector.py", line 540, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "C:\DEV\ComfyUI_windows_portable\python_embeded\lib\site-packages\aiohttp\connector.py", line 899, in _create_connection
    _, proto = await self._create_proxy_connection(req, traces, timeout)
  File "C:\DEV\ComfyUI_windows_portable\python_embeded\lib\site-packages\aiohttp\connector.py", line 1328, in _create_proxy_connection
    return await self._start_tls_connection(
  File "C:\DEV\ComfyUI_windows_portable\python_embeded\lib\site-packages\aiohttp\connector.py", line 1111, in _start_tls_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host raw.githubusercontent.com:443 ssl:default [None]

这个时候不要着急,赶紧把科学上网打开。同时它不会影响comfyUI的运行.文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

f. Failed to connect to raw.githubusercontent.com:443

这个错误也是由于网络原因引起的。但是原因可能不尽相同。除了科学上网,有些时候国内的dns会解析错误的raw.githubusercontent.com域名,还有些ISP(互联网服务提供商)在DNS层面出于某些未知原因屏蔽了 raw.githubusercontent.com文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

翻译关键点:可以通过在windows手工配置hosts文件解决。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

将185.199.108.133 raw.githubusercontent.com 直接加到C:\Windows\System32\drivers\etc\hosts文件的最后一行。也有将dns改为国外服务器的。总之保证这个域名可以正常访问就可以。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

4.comfyUI的使用

a.正常启动

下面是正常启动的界面,所有节点都正常的加载。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

如果安装失败,会显示IMPORT FAILED 如图:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

b. 启动参数

运行一般windows下都是运行run_nvidia_gpu.bat这个脚本,linux环境下,就是直接python main.py。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

启动的所有参数可以通过python main.py -h 参数来查看。愿意学习代码的,也可以看cli_args.py这个文件来学习。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

E:\ComfyUI_windows_portable\ComfyUI>..\python_embeded\python.exe main.py -h
** ComfyUI startup time: 2024-01-06 15:42:26.697935
** Platform: Windows
** Python version: 3.11.6 (tags/v3.11.6:8b6ee5b, Oct  2 2023, 14:57:12) [MSC v.1935 64 bit (AMD64)]
** Python executable: E:\ComfyUI_windows_portable\python_embeded\python.exe
** Log path: E:\ComfyUI_windows_portable\ComfyUI\comfyui.log

Prestartup times for custom nodes:
   0.0 seconds: E:\ComfyUI_windows_portable\ComfyUI\custom_nodes\rgthree-comfy
   0.1 seconds: E:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager

usage: main.py [-h] [--listen [IP]] [--port PORT] [--enable-cors-header [ORIGIN]] [--max-upload-size MAX_UPLOAD_SIZE]
               [--extra-model-paths-config PATH [PATH ...]] [--output-directory OUTPUT_DIRECTORY]
               [--temp-directory TEMP_DIRECTORY] [--input-directory INPUT_DIRECTORY] [--auto-launch]
               [--disable-auto-launch] [--cuda-device DEVICE_ID] [--cuda-malloc | --disable-cuda-malloc]
               [--dont-upcast-attention] [--force-fp32 | --force-fp16]
               [--bf16-unet | --fp16-unet | --fp8_e4m3fn-unet | --fp8_e5m2-unet]
               [--fp16-vae | --fp32-vae | --bf16-vae]
               [--fp8_e4m3fn-text-enc | --fp8_e5m2-text-enc | --fp16-text-enc | --fp32-text-enc]
               [--directml [DIRECTML_DEVICE]] [--disable-ipex-optimize]
               [--preview-method [none,auto,latent2rgb,taesd]]
               [--use-split-cross-attention | --use-quad-cross-attention | --use-pytorch-cross-attention]
               [--disable-xformers] [--gpu-only | --highvram | --normalvram | --lowvram | --novram | --cpu]
               [--disable-smart-memory] [--deterministic] [--dont-print-server] [--quick-test-for-ci]
               [--windows-standalone-build] [--disable-metadata]

options:
  -h, --help            show this help message and exit
  --listen [IP]         Specify the IP address to listen on (default: 127.0.0.1). If --listen is provided without an
                        argument, it defaults to 0.0.0.0. (listens on all)
  --port PORT           Set the listen port.
  --enable-cors-header [ORIGIN]
                        Enable CORS (Cross-Origin Resource Sharing) with optional origin or allow all with default
                        '*'.
  --max-upload-size MAX_UPLOAD_SIZE
                        Set the maximum upload size in MB.
  --extra-model-paths-config PATH [PATH ...]
                        Load one or more extra_model_paths.yaml files.
 --output-directory OUTPUT_DIRECTORY
                        Set the ComfyUI output directory.
  --temp-directory TEMP_DIRECTORY
                        Set the ComfyUI temp directory (default is in the ComfyUI directory).
  --input-directory INPUT_DIRECTORY
                        Set the ComfyUI input directory.
  --auto-launch         Automatically launch ComfyUI in the default browser.
  --disable-auto-launch
                        Disable auto launching the browser.
  --cuda-device DEVICE_ID
                        Set the id of the cuda device this instance will use.
  --cuda-malloc         Enable cudaMallocAsync (enabled by default for torch 2.0 and up).
  --disable-cuda-malloc
                        Disable cudaMallocAsync.
  --dont-upcast-attention
                        Disable upcasting of attention. Can boost speed but increase the chances of black images.
  --force-fp32          Force fp32 (If this makes your GPU work better please report it).
  --force-fp16          Force fp16.
  --bf16-unet           Run the UNET in bf16. This should only be used for testing stuff.
  --fp16-unet           Store unet weights in fp16.
  --fp8_e4m3fn-unet     Store unet weights in fp8_e4m3fn.
  --fp8_e5m2-unet       Store unet weights in fp8_e5m2.
  --fp16-vae            Run the VAE in fp16, might cause black images.
  --fp32-vae            Run the VAE in full precision fp32.
  --bf16-vae            Run the VAE in bf16.
  --fp8_e4m3fn-text-enc
                        Store text encoder weights in fp8 (e4m3fn variant).
  --fp8_e5m2-text-enc   Store text encoder weights in fp8 (e5m2 variant).
  --fp16-text-enc       Store text encoder weights in fp16.
  --fp32-text-enc       Store text encoder weights in fp32.
  --directml [DIRECTML_DEVICE]
                        Use torch-directml.
  --disable-ipex-optimize
                        Disables ipex.optimize when loading models with Intel GPUs.
  --preview-method [none,auto,latent2rgb,taesd]
                        Default preview method for sampler nodes.
  --use-split-cross-attention
                        Use the split cross attention optimization. Ignored when xformers is used.
  --use-quad-cross-attention
                        Use the sub-quadratic cross attention optimization . Ignored when xformers is used.
  --use-pytorch-cross-attention
                        Use the new pytorch 2.0 cross attention function.
  --disable-xformers    Disable xformers.
  --gpu-only            Store and run everything (text encoders/CLIP models, etc... on the GPU).
  --highvram            By default models will be unloaded to CPU memory after being used. This option keeps them in
                        GPU memory.
  --normalvram          Used to force normal vram use if lowvram gets automatically enabled.
  --lowvram             Split the unet in parts to use less vram.
  --novram              When lowvram isn't enough.
  --cpu                 To use the CPU for everything (slow).
  --disable-smart-memory
                        Force ComfyUI to agressively offload to regular ram instead of keeping models in vram when it
                        can.
  --deterministic       Make pytorch use slower deterministic algorithms when it can. Note that this might not make
                        images deterministic in all cases.
  --dont-print-server   Don't print server output.
  --quick-test-for-ci   Quick test for CI.
  --windows-standalone-build
                        Windows standalone build: Enable convenient things that most people using the standalone
                        windows build will probably enjoy (like auto opening the page on startup).
  --disable-metadata    Disable saving prompt metadata in files.

其中常用的几个参数,简单介绍一下。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

--listen 如果你想让别人也可以访问你的comfyui,或者提供API访问,就需要设置这个参数,默认是监听机器上所有的ip。如果是只想让它监听特定的IP,那你加上就行比如”192.168.0.18“文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

--port 指定监听端口文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

--lowvram 降低显存的占用。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

c manager访问不到

我们在使用manager时,会遇到下面这个报错。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
[ComfyUI-Manager] Due to a network error, switching to local mode.
=> custom-node-list.json
=> [WinError 121] 信号灯超时时间已到

那如何解决呢?

首先,这个问题原因是国内对这个域名raw.githubusercontent.com存在DNS不准确的问题。大家可以通过sites.ipaddress.com/raw 方式直接查询域名的ip,结果如下:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

然后手工修改 ”c:\windows\System32\drivers\etc\hosts“文件文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

增加一行:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

然后执行:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

ipconfig /flushdns
学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

再尝试访问,就可以了。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

5. 模型文件找不到

模型文件分为很多类别,一类是和sd相关的checkpoint, Lora, embedding这,常见的是你拉过来别的workflow,作者命名这些文件有自己的习惯,拿过来需要确认和自己本地保存的文件名字一致。 一类是custom node自己需要的模型文件,第一次运行时会在相应的网站,一般就是github,huggingface这类,国内也有modelscope这类。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

a. checkpoint,lora名字不一致

是一种常见的错误,把别人的workflow加载进来时,记得要看model名字和自己本地的是否一样文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

File "C:\DEV\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "C:\DEV\ComfyUI_windows_portable\ComfyUI\execution.py", line 83, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "C:\DEV\ComfyUI_windows_portable\ComfyUI\execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "C:\DEV\ComfyUI_windows_portable\ComfyUI\nodes.py", line 476, in load_checkpoint
out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings"))
File "C:\DEV\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 400, in load_checkpoint_guess_config
sd = comfy.utils.load_torch_file(ckpt_path)
File "C:\DEV\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 12, in load_torch_file
if ckpt.lower().endswith(".safetensors"):
AttributeError: 'NoneType' object has no attribute 'lower'文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

b.无法连接hugging face

关键字 huggingface.co "Connection to http://huggingface.co timed out类。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

'(MaxRetryError("HTTPSConnectionPool(host='Hugging Face – The AI community building the future.', port=443): Max retries exceeded with url: /lllyasviel/Annotators/resolve/main/ZoeD_M12_N.pt (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x000001D934781DB0>, 'Connection to Hugging Face – The AI community building the future. timed out. (connect timeout=10)'))"), '(Request ID: dc2a2763-47a3-4862-b320-9aacf3a28b19)')' thrown while requesting HEAD huggingface.co/lllyasvi
WARNING:huggingface_hub.utils._http:'(MaxRetryError("HTTPSConnectionPool(host='Hugging Face – The AI community building the future.', port=443): Max retries exceeded with url: /lllyasviel/Annotators/resolve/main/ZoeD_M12_N.pt (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x000001D934781DB0>, 'Connection to Hugging Face – The AI community building the future. timed out. (connect timeout=10)'))"), '(Request ID: dc2a2763-47a3-4862-b320-9aacf3a28b19)')' thrown while requesting HEAD huggingface.co/lllyasvi文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

如何从huggingface下载模型,可以参考文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

6.执行的节点没有配置好

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

这是前几天评论区小伙伴留下,这个我们可以看到执行错误的节点有一个红色边框,并报错。报错是错模型没有找到,undefine是用户没有选择本机上的模型会出现的。同类的错误都可以这个方式来进行排查,比如sampler节点如果忘记输入positive condition,就会报如下错误。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

再比如这个apply faceID节点忘记选择model,model就会出现红圈。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

学习和使用ComfyUI最痛苦是什么?常见故障和解决方法

执行节点时,我们经常会遇到错误,很多时候需要检查是不是我们节点的版本太旧了,和其它节点匹配出了问题。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

比如我有一次使用github.com/BlenderNeko/ 节点文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

output = model.apply_model(input_x, timestep_, **c).chunk(batch_chunks)
File "E:\DEV\ComfyUI_windows_portable\ComfyUI\comfy\model_base.py", line 77, in apply_model
context = context.to(dtype)
AttributeError: 'NoneType' object has no attribute 'to'文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

上面错误就是代码对一个空对象进行操作,我检查了流程,没发现设置的问题。就怀疑是节点版本的问题。我更新了节点之后,重启服务器,故障解决。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

7.总结

ComfyUI环境配置好了还是很好用的,但是就是需要不停的更新版本和组件,这点在国内环境就带来了很多不便。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/jianji/60517.html

  • 本站内容整理自互联网,仅提供信息存储空间服务,以方便学习之用。如对文章、图片、字体等版权有疑问,请在下方留言,管理员看到后,将第一时间进行处理。
  • 转载请务必保留本文链接:https://www.cainiaoxueyuan.com/jianji/60517.html

Comment

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定