ComfyUI Node Runs on cloud

DodgeAndBurn

Sculpt light with a mask, the old darkroom way

By EllangoK·Created 3 years ago·Updated 2 years ago· 256
DodgeAndBurn
  • image
  • mask
  • IMAGE
intensity0.50
mode

Dodge and burn are the darkroom techniques that made portraits pop before Photoshop existed: selectively brighten (dodge) or darken (burn) areas of a print to shape the light. This node brings that to your graph - feed it an image plus a mask, and it uses the mask as a light map to lift or sink the brightness exactly where you want it. It's the single most useful node in this pack for portrait work, because it's how you give a flat AI face some actual sculpt.

How it works

The mask is treated as an intensity map. Dodge divides the image by (1 - mask * intensity) - so bright mask areas lift the pixels toward white. Burn does the inverse, 1 - (1 - image) / (mask * intensity), pushing toward black. Where the mask is dark, nothing changes; where it's bright, the effect lands. The mode dropdown then picks the flavor:

  • dodge / burn - the classic darkroom pair.
  • color_dodge / color_burn - guard-rail variants that leave midtones more alone and only act where it's safe.
  • linear_dodge / linear_burn - simple additive/subtractive versions: just add or subtract mask * intensity, clamped.
  • dodge_and_burn / burn_and_dodge - apply both in sequence (burn after dodge, or the reverse), which is a subtle way to add overall local contrast.

Inputs are image, mask (an IMAGE - a luminance map works; you can build one from a gradient or a blur), and intensity (0–1, default 0.5). Output is a single IMAGE.

Install

DodgeAndBurn is one of ~22 nodes in ComfyUI-post-processing-nodes.

  • ComfyUI Manager: search "post processing nodes", install, restart.
  • Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/EllangoK/ComfyUI-post-processing-nodes

Restart after. No requirements.txt, no downloads - tensor math only. It's under postprocessing → Blends in the node menu.

The move that actually works

For portrait depth: take your image, blur a copy into a soft light map (the pack's Glow or any blur node will do), feed that as the mask, and run dodge_and_burn at intensity 0.2–0.4. The bright side of the face lifts, the shadow side sinks, and you get dimensionality the diffusion model never bothered to give you. The color_dodge/color_burn modes are the safe ones to start with - the plain dodge and burn blow out harder and can produce harsh halos at high intensity. It's a sculpting tool, so a light hand beats a strong one.

Categorypostprocessing/Blends

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
maskIMAGE
intensityFLOAT0.500–1
modeCOMBO8 options: dodge, burn, dodge_and_burn, burn_and_dodge, color_dodge, color_burn, +2

Outputs (1)

NameTypeDescription
IMAGEIMAGE