Nodes/GPU LayerStyles/GPU LayerStyles ColorTemperature
ComfyUI Node

GPU LayerStyles ColorTemperature

Negative warms, positive cools, and yes that's backwards from the slider you're used to

By lany42·Created 23 days ago·Updated 16 days ago· 0
GPU LayerStyles ColorTemperature
  • image
  • image
◄temperature0►
◄output_devicecpu►
◄batch_size0►

One slider, one job: shift the white balance of a whole image or a whole video batch. The sign convention is the thing to burn in first, because it's the opposite of a "colour temperature in Kelvin" field: negative values warm the image, positive values cool it. Stick a value in the wrong direction and you'll spend ten minutes wondering why your "warming" pass made everything blue.

What it does, mechanically

It's a channel gain, not a photometric daylight/tungsten conversion. The source computes a normalised amount t = -temperature / 100 and picks a gain triple from the sign:

  • Temperature below 0 (warming): red and green go up - (1+t, 1+0.4t, 1). Blue is untouched.
  • Temperature above 0 (cooling): red comes down slightly and blue goes up - (1+0.2t, 1, 1-t). Green is untouched.

Values are clamped to [0, 1], and 0 returns the input unchanged with no maths at all. Two consequences fall out of that shape. The warming path never reduces the blue channel, so a strong warm push can clip your red and green and leave you with a flat, amber-highlighted frame rather than a clean colour shift. And because it's pure gain, the effect is proportional - subtle on a dark frame, dramatic in the highlights.

If what you wanted was a physically-plausible white-balance conversion (a shifted and renormalised Planckian locus), this isn't that. It's the same operation as nudging the tint and temperature sliders in a grade panel, and it's plenty for making two shots match.

The inputs that matter

image is the connection; temperature is a float from -100 to 100, step 1, default 0. Practically: ±5 to ±20 is a grade, ±50 is a mood change, ±100 is the ends of the slider and will clip.

Then the two execution controls shared by every colour node in this pack:

  • output_device - cpu (default) or gpu. Work is done in float32 on ComfyUI's compute device either way; this only picks where the result sits. Leave it on cpu unless the next node is also running on the device.
  • batch_size - frames processed per chunk; 0 means start at 64, and the node halves the chunk size automatically and logs a warning if an allocation fails. It governs temporary memory, not the memory your full input and output need.

Output is a single image batch, same dimensions, same length. Alpha passes through.

The workflow it's most useful in

Two places it earns its keep. First, shot matching - you generated six clips of the same scene and two of them came out cooler than the rest. Run those two through this with a small negative value and you're done, deterministically, in milliseconds. Second, the cheap emotional grade: a warm grade reads as memory or nostalgia, a cool one as clinical or night, and doing it here rather than in a prompt means it applies to every frame identically instead of wobbling with the sampler.

If you need the brightness to move too, stack BrightnessContrastV2 after it. If you need the image to match a specific reference rather than just lean warm, that's ColorMatch - this node has no reference input and no idea what you're matching to.

Install

ComfyUI Manager → search GPU LayerStyles and install, then restart. Or:

cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/lany42/gpu-layerstyles
# restart ComfyUI

No dependencies to install - the runtime dependency list is empty, there's nothing to download and no key to paste, which is the main reason this pack exists as a counterweight to the much larger, dependency-heavy ComfyUI_LayerStyle it benchmarks against. Requires Python 3.13+ and a ComfyUI build with comfy_api. AGPL-3.0-only.

The README's 42× figure comes from a chain that includes this node, measured on a 525-frame 720×1280 clip - an informal, user-reported number with no hardware detail. Direction: true. Precision: ignore.

Getting burned

The clipping, mostly. Because the transform is a gain with a clamp, cranking temperature to ±80 on a bright frame flattens highlights instead of tinting them, and no amount of slider travel gets the detail back. If a frame is already near-white in the sky, warm it before you raise anything else, and keep it under about ±25.

Also worth saying out loud: this is a global grade. It won't fix a mixed-lighting frame where the subject is cool and the background is warm - that needs a mask and two passes, not one slider.

CategoryGPU LayerStyles/Color

Inputs (4)

NameTypeDefaultDescription
imageIMAGE—
temperatureFLOAT0-100–100—
output_deviceCOMBOcpuReturn output on CPU (default) after float32 processing on ComfyUI's selected compute device. GPU keeps output on that device to avoid transfers between compatible nodes. ComfyUI CPU mode returns CPU output.
batch_sizeINT00–2147483647Frames per processing chunk. 0 starts at up to 64 frames. Positive values can exceed 64, capped by the output length. Allocation failures halve the chunk size for this run; each run starts fresh. Complete inputs and outputs still need memory. Pass smaller batches through the entire workflow to reduce complete-batch memory.

Outputs (1)

NameTypeDescription
imageIMAGE—