ComfyUI-Long-CLIP

ComfyUI-Long-CLIP
★ 165

文本长度扩展SD1.5兼容提示词增强图像质量提升
在ComfyUI中替换模型CLIP为Long-CLIP(如SeaArtLongClip),将SD1.5的token长度从77扩展到248,支持更长提示词并提升生成图像质量
💡 在ComfyUI中替换CLIP以支持更长提示词并提升生成效果
🍴 9 Forks💻 Python🔄 2025-03-08
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/b6135d9bd930
SD1.5
SDXL
FLUX.1
📄 README

ComfyUI-Long-CLIP (Flux Suport Now)

This project implements the comfyui for long-clip, currently supporting the replacement of clip-l. For SD1.5, the SeaArtLongClip module can be used to replace the original clip in the model, expanding the token length from 77 to 248. Through testing, we found that long-clip improves the quality of the generated images. As for the SDXL model, since the clip-long model for clip-g has not been released, our processing procedure is as follows: for smaller tokens, we expand them by an integer multiple of the original max_len, and since the last added are pad_tokens, we trim the excess part. Given that clip-g features occupy a larger proportion in SDXL, you may notice more detailed images. Finally, if you like our project, please give us a thumbs up.

Thanks to zer0int‘s work, now long-clip provides support for flux.

Start

git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI/custom_nodes
git clone git@github.com:SeaArtLab/ComfyUI-Long-CLIP.git

Download LongCLIP-L to models/checkpoints, and thanks to Long-CLIP for making the weights available. Once the LongCLIP-G weights are released, we will also support them!

Workflow

We have specifically prepared examples for SD1.5 and SDXL for your use. To simplify the demonstration, our examples are straightforward, and you do not need to install any additional plugins. This plugin also supports operations such as clip-skip.