ComfyUI Node

TBG Color Correction

Match a refined image to its reference without the full refiner

By Ltamann·Created about a year ago·Updated 19 days ago· 156
TBG Color Correction
  • image
  • reference
  • image
Color_MatchTBG Detail-Preserving Color Stabilizer
Geometry_Drift_Correctiontrue
Color_Match_Str1.00

Every generative upscaler has the same dirty secret: the round trip through sampling shifts the color. Tiles come back slightly warmer or cooler than the source, seams show as faint tint bands, and by the time you've refined 50 tiles the whole image has drifted a stop. Inside ETUR that drift gets corrected automatically by the ColorMatch stages. TBG Color Correction is the same correction, pulled out and made standalone - for when you want to fix a refined image (or any image) against a reference without running the whole tiled refiner.

The headline method, as the node's own description puts it, is a detail-preserving color stabilizer: a global RGB/luma correction driven by a low-frequency 16×16 grid over the whole image. It matches overall tone without smearing local texture - that's the "detail-preserving" part, and it's the thing that distinguishes it from a flat histogram match that flattens your image.

The inputs

  • image - what you're correcting (e.g., a stitched, refined result).
  • reference - what you want it to look like (usually the original or upscaled source).
  • Color_Match - the method dropdown. Default is TBG Detail-Preserving Color Stabilizer; the rest of the menu carries the classic methods ETUR has bundled over its history - the lab full match, wavelet, Reinhard-LAB, and HM-MKL variants from the changelog. For most jobs, the default is the one to use; the classic methods exist for the cases where the stabilizer isn't aggressive enough.
  • Geometry_Drift_Correction (default on) - an optional alignment pass before color correction. Refinement can shift geometry slightly tile by tile, and if the image and reference aren't pixel-aligned, color matching fights the misalignment. On uses the strongest 4x drift-correction path (the SIFT-based one). Leave it on unless you're sure the images already line up.
  • Color_Match_Str (default 1, range 0–2) - the strength of the correction. 0 = don't change anything, 1 = full match, above 1 = push past the reference.

One IMAGE output, ready to feed a save node or the next stage.

Why standalone matters

The refiner's tile-aware stabilizer does feathered seam blending into neighbor tiles - the full "no visible seams" behavior. That only exists inside the refiner (and, per the tooltip, some of it is member-gated). This standalone node gives you the global half of that machinery with none of the tiling, which is exactly what you want when you've stitched tiles yourself with another tool, or when you've done a PiD pass and need the final color reined back in. It's also the cheapest possible test of "is the color drift from my pipeline or my source": run this node, and if the match is good, the drift was correctable.

Installing it

Part of the TBG ETUR pack:

cd ComfyUI/custom_nodes
git clone https://github.com/Ltamann/ComfyUI-TBG-ETUR
cd ComfyUI-TBG-ETUR
pip install -r requirements.txt

Or ComfyUI Manager → search "TBG" → TBG_Enhanced Tiled Upscaler & Refiner FLUX PRO, restart. The SIFT drift correction needs OpenCV's contrib modules - they're in the pack's requirements, but if you see an import error on the geometry path specifically, pip install opencv-contrib-python is the fix.

Notes

Two practical gotchas. First, Color_Match_Str above 1 is a trap on high-contrast images - pushing past the reference saturates fast. Second, if your image and reference are very different sizes, run the resize before this node rather than expecting the drift correction to sort it; the correction aligns small offsets, not composition changes. And remember this is a global pass - it fixes overall tone, not per-region tint. If one tile is green and the rest are fine, that's a seam problem and the tiled refiner (or the Labs node's tile color correction) is the tool, not this node.

CategoryTBG/ETUR Tiled Upscaler and Refiner

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
referenceIMAGE
Color_MatchCOMBOTBG Detail-Preserving Color StabilizerDetail-preserving global RGB/luma color stabilization with a low-frequency 16x16 whole-image grid. Tile-aware feathered seam blending is only available inside the ETUR refiner.
Geometry_Drift_CorrectionBOOLEANtrueOptional alignment before color correction. Off disables it. On uses the strongest x4 drift-correction path.
Color_Match_StrFLOAT1.000–2

Outputs (1)

NameTypeDescription
imageIMAGE