ComfyUI 最强图像反推JoyCaption2再次升级,图像反推,批量文件打标,结合Flux使用,本地安装

部署运行你感兴趣的模型镜像

之前为大家介绍了多种图像反推工具:

近期,Joy Caption已经更新到:joy-caption-alpha-two(JoyCaption2)版本,图像反推更加细致,同时增添了许多多样化的输入Prompt支持。

如果想使用云端JoyCaption2 的,参考:

也可以用网页版的Demo: https://huggingface.co/spaces/fancyfeast/joy-caption-alpha-two

如果使用JoyCaption2 进行批量文件打标的,那就推荐本地安装Joy_Caption2了。

Joy Caption 原始仓库: https://github.com/fpgaminer/joycaption ComfyUI Joy Caption two: https://github.com/EvilBT/ComfyUI_SLK_joy_caption_two

Joy Caption2 在ComfyUI中的安装

安装插件

推荐用插件: https://github.com/EvilBT/ComfyUI_SLK_joy_caption_two.git 对于小显存支持好些。

cd comfyui\custom_nodes
git clone https://github.com/EvilBT/ComfyUI_SLK_joy_caption_two.git

# 安装依赖:
pip install -r ComfyUI_SLK_joy_caption_two\requirements.txt

注意:

transformers 要大于等于 4.44.0 版本

下载模型

1. google/siglip-so400m-patch14-384:

国外:google/siglip-so400m-patch14-384[1]

国内:hf/google/siglip-so400m-patch14-384[2]

会自动下载,也可以手动下载整个仓库,并把siglip-so400m-patch14-384内的文件全部复制到models/clip/siglip-so400m-patch14-384

image.png

所需的文件较多,建议用Huggingface客户端下载,对于ComfyUI来说,一般都会被安装上huggingface-cli 命令,可以用everything搜索一下:

只需要把上图箭头的路径:D:\SD\ComfyUI-aki-v1.3\python\Scripts 加入到系统的Path环境变量下,就可以直接调用了。 命令行参考:

set HF_ENDPOINT=https://hf-mirror.com
cd D:\SD\ComfyUI-aki-v1.3\models\clip
huggingface-cli download google/siglip-so400m-patch14-384 --local-dir ./siglip-so400m-patch14-384

2. Llama3.1-8B-Instruct 模型下载

支持两个版本,根据显存大小自行选择一个下载即可:bnb-4bit是小显存的福音。程序会自动下载,可自行下载。

2.1 unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit

国外:unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit[3]

国内:hf/unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit[4]

把整个文件夹内的内容复制到 models\LLM\Meta-Llama-3.1-8B-Instruct-bnb-4bit 下

命令行下载:

set HF_ENDPOINT=https://hf-mirror.com
cd ComfyUI\models\LLM
huggingface-cli download unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit Meta-Llama-3.1-8B-Instruct-bnb-4bit
2.2 unsloth/Meta-Llama-3.1-8B-Instruct

国外:unsloth/Meta-Llama-3.1-8B-Instruct[5]

国内:hf/unsloth/Meta-Llama-3.1-8B-Instruct[6]

把下载后的整个文件夹的内容复制到models\LLM\Meta-Llama-3.1-8B-Instruct

image.png

 

命令行下载:

set HF_ENDPOINT=https://hf-mirror.com
cd ComfyUI\models\LLM
huggingface-cli download unsloth/Meta-Llama-3.1-8B-Instruct Meta-Llama-3.1-8B-Instruct

3. Joy-Caption-alpha-two 模型下载(必须手动下载)

把 Joy-Caption-alpha-two[7] 下的cgrkzexw-599808文件夹的所有内容下载复制到models/Joy_caption_two 下

image.png

 

重启ComfyUI之后就可以添加使用了。

Joy Caption2 在ComfyUI中的使用

基础版工作流

image.png

 

高级版工作流

可以自定义: prompt,只需要勾选即可。

image.png

 

图片批量打标 - 基础版

image.png

 

目录查看:

原始名称原始就是1/2/3/4/5.jpg 没有改名字

image.png

 

图片批量打标 - 高级版

也是可以自定义: prompt,只需要勾选即可。

image.png

 

目录查看:

图片复制并重命名了

image.png

 

结合Flux使用

image.png

 

模型都可以国内下载,所需工作流,请关注公主好:: DevOpsAigc云时代

发送指令: JoyCaption2

自助获取。

有问题可以进群交流

引用链接

[1] google/siglip-so400m-patch14-384: https://huggingface.co/google/siglip-so400m-patch14-384
[2] hf/google/siglip-so400m-patch14-384: https://hf-mirror.com/google/siglip-so400m-patch14-384
[3] unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit: https://huggingface.co/unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit
[4] hf/unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit: https://hf-mirror.com/unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit
[5] unsloth/Meta-Llama-3.1-8B-Instruct: https://huggingface.co/unsloth/Meta-Llama-3.1-8B-Instruct
[6] hf/unsloth/Meta-Llama-3.1-8B-Instruct: https://hf-mirror.com/unsloth/Meta-Llama-3.1-8B-Instruct
[7] Joy-Caption-alpha-two: https://huggingface.co/spaces/fancyfeast/joy-caption-alpha-two/tree/main

您可能感兴趣的与本文相关的镜像

ComfyUI

ComfyUI

AI应用
ComfyUI

ComfyUI是一款易于上手的工作流设计工具,具有以下特点:基于工作流节点设计,可视化工作流搭建,快速切换工作流,对显存占用小,速度快,支持多种插件,如ADetailer、Controlnet和AnimateDIFF等

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

DevOpsAigc云时代

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值