ποΈ Latent Image Adjust
Brightness, contrast, hue and sharpness on the latent before it's ever pixels
- latent
- LATENT
The boring way to brighten a render is decode β photoshop it β re-encode, and every trip through the VAE is a little lossy, as anyone who's chained a few img2img passes knows. ποΈ Latent Image Adjust does the whole adjustment suite - brightness, contrast, hue, saturation, sharpness - directly on the latent tensor, right off the KSampler and before the decoder ever runs. You wire it between your sampler and VAEDecode, and the tweak is part of the generation, not a post-process.
Is it magic? No. It's a bundle of classic image-processing math applied to latent channels, and like its sibling in this pack it treats the first three channels of the latent as pseudo-RGB. That makes global tweaks - "this render came out a touch dark and washed" - work great, because those kinds of changes are forgiving. Hue is the shakiest of the five, since rotating hue on something that isn't actually RGB is approximation all the way down. It's still the fastest way to grade five renders without decoding each one.
How it works
Each adjustment is a distinct bit of math, applied in sequence:
- Brightness - additive, and deliberately scaled down by 0.5 because latent magnitudes don't match pixel magnitudes. Negative darkens, positive brightens.
- Contrast - multiplicative around each channel's mean. Below 1.0 flattens, above 1.0 punches.
- Hue - converts the first three channels to HSV via kornia, rotates the hue channel in degrees, converts back. If kornia is missing it falls back to a crude RGB channel-rotation approximation that's honestly pretty rough.
- Saturation - a luminance-weighted blend between grayscale and the original. 0.0 is gray, 1.0 is unchanged, above 1.0 gets loud.
- Sharpness - unsharp masking with a 3Γ3 Gaussian. Below 1.0 blurs, above 1.0 sharpens. Both intensities are toned down for latent space.
All of it runs batched, and the node handles both 4D and 5D latent shapes, squeezing and restoring extra dimensions so it plays nice with models that hand you odd tensor shapes.
The inputs that matter
latent- your latent, straight from the KSampler.brightness(-1 to 1) - additive, 0 is neutral.contrast(0 to 3) - 1.0 is neutral; the mean of each channel is the pivot point.saturation(0 to 3) - 1.0 is neutral, 0 is grayscale.hue(-180 to 180) andsharpness(0 to 3) - 0 and 1.0 respectively are the no-op positions.
Every slider defaults to its neutral value, so the node is a no-op until you touch something - nice for dropping into a workflow and dialing in later. Output is a LATENT, same shape as the input, meant for VAEDecode. device and batch_size have sensible defaults.
Installing it
It's part of the Latent Color Tools pack (DenRakEiw/Latent_Nodes), installed from ComfyUI Manager by searching "Latent Color Tools", or manually:
cd ComfyUI/custom_nodes/
git clone https://github.com/DenRakEiw/Latent_Nodes
cd Latent_Nodes
pip install -r requirements.txt
Restart, and the node shows up under latent/adjust. Dependencies are just kornia>=0.6.0 and color-matcher>=0.2.0, and only kornia matters for this node. No models to download. Watch out: the README's manual-install block contains a placeholder URL (yourusername/...), so use the repo path above, not the one printed in the readme.
Common issues
- Hue does almost nothing, or does something weird. You're likely running without kornia, stuck on the crude rotation fallback.
pip install kornia>=0.6.0and restart. - Brightness feels weak. It's scaled for latent space and additive - nudge it up. Latent-space tweaks are more subtle than pixel-space ones at the same slider number.
- Sharpness smears. The unsharp masking kernel is tiny and conservative; if 3.0 isn't enough, this node isn't your sharpener - that's what the upscaler ecosystem is for.
- Same console debug spam as the rest of the pack. Cosmetic.
If your "adjustment" is actually a creative filter - film grain, color LUTs, vignettes - you still want the image-space toolboxes (WAS Node Suite, KJNodes) and you'll eat the VAE round trip. But for "this batch is a little dark and flat," Latent Image Adjust is the node that lives in my finishing pass.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | β | |
| hue | FLOAT | 0-180β180 | β |
| saturation | FLOAT | 1.000β3 | β |
| brightness | FLOAT | 0.00-1β1 | β |
| contrast | FLOAT | 1.000β3 | β |
| sharpness | FLOAT | 1.000β3 | β |
| device | COMBO | 3 options: auto, cpu, gpu | |
| batch_size | INT | 00β1024 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | β |