Donut Auto White Balance (DEPRECATED)
Industry-standard white balance, from gray world to Photoshop-style
- image
- image
An image that's gone green under fluorescent light, or orange at sunset, or just has that unmistakable AI-generated teal-ish tint - DonutAutoWhiteBalance neutralizes it with the same color-constancy algorithms that camera software has used for decades. You feed it an image, it figures out which way the color is skewed, and it shifts the channels until the cast is gone. If your pipeline generates slightly-off color every run, this is the deterministic fix that costs milliseconds.
The inputs are minimal: image, a method dropdown, strength (default 1.0), and clip_percent (default 0.1). One output: the corrected image.
The method dropdown is where the character lives, and each is a real, named algorithm:
gray_world(default) - assumes the average color across the image should be gray, and shifts each channel's mean toward it. Fast, classic, and wrong on images that are genuinely dominated by one color (a field of grass). Still the best first try.white_patch- assumes the brightest pixels should be white, and scales channels by their brightest values. Good for highlights; can overshoot on bright colored objects.combined- gray world plus white patch together, hedging between the two assumptions.auto_levels- per-channel contrast stretch, which is what "Auto Tone" does. Maximizes dynamic range rather than neutralizing cast per se.photoshop- per-channel levels plus a midtone snap toward neutral, mimicking Photoshop's Auto Color. The most aggressive and usually the most "edited" look.
clip_percent matters for the levels-style methods: it's the percent of pixels clipped from the brightest and darkest ends (Photoshop's default is 0.1%), which stops a single specular highlight or dead-black corner from dominating the stretch. strength is your master dial - 1.0 is full correction, 0.5 is half, 2.0 overshoots into stylized color.
The honest verdict
This node is DEPRECATED - folded into the pack's DonutImageAdjust multipurpose node, which exposes white balance alongside auto-gamma, gamma, and histogram stretch. Old workflows keep loading it; new ones should use DonutImageAdjust with white_balance selected. Same algorithms, same results, one fewer node in the graph.
Ordering matters and the pack's own docs say it: white balance first, then histogram stretch, then gamma. A color cast distorts brightness measurements, so auto-gamma on top of a green image makes bad decisions. Batch-processing a pile of outputs? gray_world at 1.0 strength is a solid default that's fast enough to run on every frame; reach for photoshop only on stills where you want the punchy, corrected look.
Install: part of the pack - ComfyUI Manager → search DonutNodes, or git clone into custom_nodes/ plus pip install -r requirements.txt with the same Python as ComfyUI. Pure tensor math, no model downloads, no GPU requirements to speak of.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| method | COMBO | gray_world | gray_world: shift means to gray. white_patch: scale by brightest. combined: both. auto_levels: per-channel stretch (Auto Tone). photoshop: per-channel + midtone snap (Auto Color) |
| strength | FLOAT | 1.00–2 | Correction strength (1.0 = full correction) |
| clip_percent | FLOAT | 0.10–10 | Percent of pixels to clip from brightest/darkest (Photoshop default: 0.1%) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |