今天新装了个catVTON的换装插件,测试一圈下来,效果也还行,针对上衣、裤子、全身裙都有不错的效果,就是出图质量,就是画质偏低。牛的地方在于全身都能换,甚至不同风格、不同主体都可以。
全身
上衣
下装
其他
下面是安装记录
不想折腾就安装这个打包版:https://github.com/chflame163/ComfyUI_CatVTON_Wrapper
安装环境:win10+python3.10
cuda:12.1
torch:2.3.0
I:\ComfyUI121\python_embeded>python.exe
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> print(torch.__version__)
2.3.0+cu121
>>> print(torch.cuda.is_available())
True
模型安装在comfyui/models/catVTON下, 模型下载地址:
CatVTON:https://huggingface.co/zhengchong/CatVTON/tree/main
stable-diffusion-inpainting:https://huggingface.co/runwayml/stable-diffusion-inpainting/tree/main
网盘地址:https://pan.quark.cn/s/48e6f08b6488 提取码:jVQ1
安装中间遇到的问题,我使用的comfyui版本是官方整合包,且升级到最新版本,在安装catvton官方包时可能是与cuda或pytorch版本冲突,会把我之前的torch搞没,就出现下面的错误提示:
Torch not compiled with CUDA enabled
只需要重新安装torch就好了,我这里装的是2.3.0,命令如下:
I:\ComfyUI121\python_embeded>python.exe -m pip install G:\down1\torch-2.3.0+cu121-cp310-cp310-win_amd64.whl -i https://pypi.tuna.tsinghua.edu.cn/simple
我这里虽然省略了下载的的时间,但是其他依赖依然需要网络,所以增加了国内镜像清华源来提高安装速度。
环境装好之后发现(IMPORT FAILED): I:\ComfyUI121\ComfyUI\custom_nodes\Comfyui-CatVTON
导入错误,网传这货安装确实比较折腾人,索性把另外一个打包版也装着试试,安装倒是很顺利,运行却报错了
Error occurred when executing CatVTONWrapper:
argument of type 'NoneType' is not iterable
这个错误在comfyui里面多数都是模型的问题,如版本不对、文件丢失、模型文件损坏等,解决方案就是把相关模型重新下载一遍,虽然费时,但真的管用。
附官方安装说明:
For Windows OS users, if you encounter a compilation and installation failure prompt, you can choose between the following two options if python==3.10 Please download Detectron2 and DensePose zip file in the Releases, which includes the code placed under /ComfyUI/python/Lib/site-packages of ComfyUI folder path. Notice that Detectron2 and DensePose zip file was compiled under python==3.10 Cuda==12.1 torch==2.1.2 environment if you can’t install Detectron2 and DensePose with the released zip file. if python==3.11 Please download Detectron2 and DensePose whl file in the Releases, which includes the wheel file under python==3.11,placed under /ComfyUI/python/Lib/site-packages of ComfyUI folder path. then open cmd under ./ComfyUI/python/Lib/site-packages/ path pip install detectron2-0.6-cp311-cp311-win_amd64.whl pip install detectron2_densepose-0.6-py3-none-any.whl