Nodes/comfy-hires-color-adjust/Hires Color Adjustment
ComfyUI Node

Hires Color Adjustment

Fix the color cast your hi-res fix was about to bake in

By Faildes·Created about a year ago·Updated 9 months ago· 0
Hires Color Adjustment
  • image
  • image
  • metadata
shadow_r0
shadow_g0
shadow_b0
shadow_brightness1.0
shadow_contrast1.0
middle_r0
middle_g0
middle_b0
middle_brightness1.0
middle_contrast1.0
highlight_r0
highlight_g0
highlight_b0
highlight_brightness1.0
highlight_contrast1.0

The name is half the story. Hires Color Adjustment isn't an upscaler and it never touches resolution - it's a color-balance node you drop into the second pass of a hires.fix workflow, the spot where a subtle off-color tint stops being subtle.

Here's the thing about a two-pass upscale: the second pass runs at low denoising strength to add detail, and it faithfully reproduces whatever color you hand it. Feed it a slightly green shadow or a warm cast and you get that cast back, bigger and locked in. This node lets you fix the tint before that pass, so what gets baked in is the color you actually wanted. It's a tiny tool with a single job, and it does it well.

How it works

Under the hood it's pure numpy and PIL - no GPU, no model files, no hidden dependencies. It works out what's a shadow, a midtone, and a highlight by luminance: pixels darker than 128 lean shadow, brighter than 128 lean highlight, and everything in between is the middle. These are soft masks, not hard cutoffs, so pushing "shadow red" won't also tint bright skin.

Then it applies three separate adjustments, one per region, in a familiar Photoshop-color-balance style: each color slider at +50 pulls that channel up, at −50 pushes it toward the opposite (red↔cyan, green↔magenta, blue↔yellow). Brightness multiplies the region, contrast pivots it around the mean. The three results get blended back together by the luminance weights. Solid, predictable math - you can reason about what each slider does.

The inputs that matter

All 15 sliders are organized into three groups - Highlights, Middles, Shadows - and every group has Red, Green, Blue, Brightness, and Contrast. That's a lot of knobs, but a beginner sets very few of them:

  • Color sliders (shadow_r/g/b, middle_r/g/b, highlight_r/g/b): INT, −100 to 100, default 0 (no change). Find the region your cast lives in and nudge the offending channel by 10–30.
  • Brightness and Contrast per region: FLOAT, 0 to 10, default 1.0 (no change). Leave them alone until you're happy with color.
  • image: the only required input. Feed it whatever your upscaler just output.

Outputs are image (wire it into your second-pass sampler) and a metadata JSON that records the values you used - handy for reproducibility, ignorable otherwise.

Installing it

Easiest path is ComfyUI Manager: search "comfy-hires-color-adjust" and install. Or do it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/Faildes/comfy-hires-color-adjust

Then restart ComfyUI. No models to download, no extra pip installs - numpy, PIL, and torch all ship with ComfyUI already. You'll find it under Custom/Hires as "Hires Color Adjustment."

Where people get burned

  • It's CPU-bound. Pure numpy loops per frame. Totally fine for the single image sitting between your upscaler and the second pass; don't feed it a big batch before a video pass and expect speed.
  • The color sliders are coarse. INT with step 1, so ±100 is a big swing. If you need gentle, use small numbers; brightness/contrast are FLOAT for finer work.
  • The shadow/middle/highlight split is fixed at 128, not adjustable. On a very dark or blown-out image, most pixels pile into one region, so you'll end up adjusting that region to compensate.
  • It's not a grading suite. No curves, no LUTs, no saturation, no masks. If you need that, this isn't the node.

One honest take: for a massive cast, fix the prompt or model first - this node is for the last ten percent, the tint you'd never see at 512px but can't unsee at 2x. It's also great used proactively: warm the shadows, cool the highlights, and the second pass inherits a look you didn't have to fight for after the fact.

CategoryCustom/Hires

Inputs (16)

NameTypeDefaultDescription
imageIMAGE
shadow_rINT0-100–100
shadow_gINT0-100–100
shadow_bINT0-100–100
shadow_brightnessFLOAT1.00–10
shadow_contrastFLOAT1.00–10
middle_rINT0-100–100
middle_gINT0-100–100
middle_bINT0-100–100
middle_brightnessFLOAT1.00–10
middle_contrastFLOAT1.00–10
highlight_rINT0-100–100
highlight_gINT0-100–100
highlight_bINT0-100–100
highlight_brightnessFLOAT1.00–10
highlight_contrastFLOAT1.00–10

Outputs (2)

NameTypeDescription
imageIMAGE
metadataJSON