Nodes Browser

ComfyDeploy: How ComfyUI DenseDiffusion works in ComfyUI?

What is ComfyUI DenseDiffusion?

[a/DenseDiffusion](https://github.com/naver-ai/DenseDiffusion) custom node for ComfyUI.

How to install it in ComfyDeploy?

Head over to the machine page

  1. Click on the "Create a new machine" button
  2. Select the Edit build steps
  3. Add a new step -> Custom Node
  4. Search for ComfyUI DenseDiffusion and select it
  5. Close the build step dialig and then click on the "Save" button to rebuild the machine

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

image

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.