Nodes/MTB Nodes/Color Correct GPU (mtb)
ComfyUI Node Runs on cloud

Color Correct GPU (mtb)

Fast Torch-based color grading in ComfyUI

By melMass·Created 3 years ago·Updated about a month ago· 721
Color Correct GPU (mtb)
  • image
  • mask
  • IMAGE
force_gputrue
clamptrue
gamma1.00
contrast1.00
exposure0.00
offset0.00
hue0.00
saturation1.00
value1.00

This is the node you reach for when a generation is almost right but the color's off - too flat, too warm, a touch underexposed. Color Correct GPU (mtb) gives you the standard grading knobs - exposure, contrast, gamma, hue, saturation - all in one node, and it runs the math on the GPU with plain Torch, so it's fast and it doesn't pull in any extra image library.

Think of it as a Lightroom basic panel living inside your graph. Instead of exporting to an editor and coming back, you tune the look in-workflow: warm up a portrait, crush the blacks a little for contrast, desaturate for a moody grade, nudge the hue to fix a color cast the model baked in. Because it takes an optional mask, you can grade just part of the frame - warm the subject, leave the background - which is where it goes from "handy" to "actually powerful."

It lives in the image-processing section of MTB Nodes (comfy_mtb) by melMass. Judging by where it lands in search, plenty of people find this specific one - it's one of the pack's genuinely reachable, everyday utilities.

How it works

Every control is a tensor operation applied to the image on-device: exposure and offset shift levels, contrast and gamma reshape the tone curve, hue/saturation/value adjust color in HSV space. Doing it all in Torch on the GPU means it's quick even on big batches and there's no CPU round-trip. The clamp option keeps values in the valid 0–1 range so a heavy push doesn't produce out-of-range artifacts.

The inputs and outputs that matter

You won't touch all ten sliders every time. The ones that carry the load:

  • image - what you're grading.
  • exposure (default 0, range −5 to 5) - overall brightness in stops. The first thing to reach for on an under/overlit render.
  • contrast (default 1) - punch. Above 1 deepens the difference between lights and darks.
  • gamma (default 1) - midtone brightness without blowing highlights or crushing shadows. Great for lifting a murky image.
  • saturation (default 1) - color intensity. 0 is greyscale, up past 1 for pop.
  • hue (default 0, range −0.5 to 0.5) - rotate all colors. Small nudges fix a color cast.

The rest - offset, value, clamp, and force_gpu (default on) - are fine at defaults for most work. The mask optional input restricts the grade to the white area of a mask, so you can color-correct a region instead of the whole frame.

Output is a single IMAGE.

How to install it

ComfyUI Manager: search MTB Nodes, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/melMass/comfy_mtb

then restart. It's Torch-only - no models, no extra pip installs. If you already run ComfyUI on a GPU, this node has everything it needs.

Common issues & troubleshooting

Blown-out or banded results from a heavy push. Cranking exposure or contrast can push values past the valid range. Keep clamp on so the output stays in 0–1; that prevents the ugly clipping artifacts.

The mask affected the whole image. The mask input grades where the mask is white and leaves black areas alone. If your mask is inverted (or fully white), the whole frame gets graded. Check the mask polarity - invert it upstream if the wrong region changed.

"force_gpu" and CPU-only setups. The node is built to run on the GPU; the default assumes one's there. On a CPU-only environment it'll still compute, just slower - this node is really meant for a GPU workflow.

Stacked corrections drift. Chaining several color-correct nodes compounds rounding and can wash the image out. Prefer tuning one node well over stacking three; if you do stack, keep clamp on at each step.

Categorymtb/image processing

Inputs (11)

NameTypeDefaultDescription
imageIMAGE
force_gpuBOOLEANtrue
clampCOMBOtrue2 options: true, false
gammaFLOAT1.000–5
contrastFLOAT1.000–5
exposureFLOAT0.00-5–5
offsetFLOAT0.00-5–5
hueFLOAT0.00-0.5–0.5
saturationFLOAT1.000–5
valueFLOAT1.000–5
maskoptMASK

Outputs (1)

NameTypeDescription
IMAGEIMAGE