ComfyUI_densediffusion

ComfyUI_densediffusion
★ 156

区域提示多掩码批处理局部风格化ComfyUI节点
在ComfyUI中实现DenseDiffusion风格的区域提示扩散,支持对不同区域应用不同文本提示,允许多掩码批处理,且无掩码时使用实心掩码。
💡 对图像不同区域应用不同文本提示以生成局部风格化结果。
🍴 15 Forks💻 Python🔄 2025-02-25
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/9671236b7e59
image
📄 README

Update

2024/12/27 Changed to allow multiple masks to be entered in batches.

2024/12/26 If there is no mask input, a solid mask is used instead.

ComfyUI_densediffusion

DenseDiffusion custom node for ComfyUI. Implements the DenseDiffusion-like method for regional prompt used in Omost project.

What this repo implements

Normal attention calculation can be written as y=softmax(q@k)@v. DenseDiffusion introduces the method of attention manipulation on q@k, which makes the expression look like y=softmax(modify(q@k))@v.

The original DenseDiffusion’s implementation does not perform very well according to my testing so here I only implemented the version used in Omost repo. Refer to https://github.com/lllyasviel/Omost#regional-prompter for other regional prompt methods.

How to use

Limitation [IMPORTANT]

Currently ComfyUI’s attention replacements do not compose with each other, so this regional prompt method does not compose with IPAdapter. I am currently working on a universal model patcher to solve this issue.