MLiang White Balance
Fix a green or blue cast in one node — no model, no extra install
- image
- image
Some renders come out with a cast you can't prompt away - everything leans green, or blue, or that sickly fluorescent cyan. MLiang White Balance is the targeted fix: a node that does exactly one job, which is scaling the red, green, and blue channels to cancel the cast out. It comes from the same zero-dependency pack as MLiang Color Correction, it takes an IMAGE and returns an IMAGE, and it ships with no models, no pip requirements, nothing to download. If your image has a color cast, this is the fastest honest fix on the graph.
How it works
It's deliberately simple, and the source shows it. You feed it three channel multipliers - red, green, blue - all defaulting to 1.0 (neutral). The node multiplies every pixel's channel by its factor. Green cast? Drop green to ~0.9. Too blue? Nudge blue down.
The one clever part is normalize_luma. When it's on (the default), the node measures the image's mean luminance before and after the channel scaling and re-normalizes, so you fix the color without shifting the overall brightness. That's the difference between "white balance" and "just tinting it darker," and it's why the node feels like a real white-balance tool rather than a color slider. The strength slider then blends the corrected result back toward the original, so a setting of 0.3 gives you a subtle shift instead of a full correction.
The whole thing is a few lines of torch: multiply channels, optionally rescale luma, blend by strength, clamp to 0–1. Alpha channels pass through untouched.
The inputs that matter
There are only five, and they're self-explanatory:
- red / green / blue - 1.0 is neutral, range 0 to 3. This is the entire tool. Lower a channel to kill a cast, raise one to add a tint.
- normalize_luma - keep it on unless you specifically want the scaling to change brightness.
- strength - 1.0 applies the full balance; anything lower mixes toward the original.
The output image wires into Preview Image or Save Image, or straight into MLiang Color Correction if you want to grade after you've fixed the cast.
Installing it
Same pack, same one-liner:
cd ComfyUI/custom_nodes
git clone https://github.com/dingmuliang/comfyui_mliang_color_correction.git
Restart ComfyUI and you're done. ComfyUI Manager can also find it - search "mliang." There are no model files and no dependencies beyond stock ComfyUI.
Where it bites
Two things to know. First, normalize_luma being on means you can't use this node to intentionally darken or brighten an image by lowering channels - it'll fight you and keep the brightness steady. Turn it off if you actually want a darkening tint. Second, there's no auto white balance. The node has no eyedropper or reference-image matching, so you're adjusting by eye (or against a reference image sitting next to it in the graph). That's fine for a final polish pass; it's just not a color-match tool. If your goal is making one region match another, you want a Reinhard-style color match node instead.
One more honest note: this pack is tiny and nearly anonymous - a single commit, one star, and a WeChat Pay tip jar in the README. It works, it's clean, but you're the beta tester. For a manual cast fix with a brightness-preserving trick most big suites don't bother with, it's a nice little find.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| red | FLOAT | 1.000–3 | — |
| green | FLOAT | 1.000–3 | — |
| blue | FLOAT | 1.000–3 | — |
| normalize_luma | BOOLEAN | true | — |
| strength | FLOAT | 1.000–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |