๐๏ธ Levels Adjustment
Black Point, White Point, Gamma
- image
- IMAGE
Levels Adjustment is the classic three-step exposure fixer: set where black starts, where white starts, and how the gamma curves everything in between. It's the Photoshop Levels tool, faithfully ported, and it's the first thing to reach for when a render comes out flat, too dark, or washed out. If you only remember one node from this pack, make it this one - it's the workhorse.
It's one of the pack's Core Effects (alongside Curves, Channel Mixer and Shadow/Highlight), and it belongs at the end of your pipeline, after the VAE decode and before Save. Where the CSS Filters node is a quick and dirty contrast nudge, Levels gives you genuine tonal control with three honest sliders.
How it works
Each slider does one specific thing, applied in order. input_black and input_white remap the tonal range: everything at or below input_black becomes pure black, everything at or above input_white becomes pure white, and the values between are stretched across the full range. That's the "fix a washed-out render" move - a flat image has no true blacks or whites, so you pull input_black up and input_white down until it spans the full range. Then gamma (0.1โ3, default 1) applies a power curve to the middle: gamma below 1 lifts the midtones (brighter, airier), above 1 deepens them. Finally output_black and output_white compress the result into a narrower range - that's for flattening an image down to a more muted, film-like contrast on purpose.
All values are 0โ1 normalized, which takes a moment to get used to if you've only ever used Photoshop's 0โ255 levels - 0.05 means "5% of the way to black," not "level 5."
The inputs that matter
- input_black (0โ1, default 0) and input_white (0โ1, default 1) - the range remap. This pair does 90% of the work.
- gamma (0.1โ3, default 1) - midtone brightness, the "taste" dial.
- output_black / output_white (0โ1) - output range compression; leave at defaults until you know you want a flat look.
- channel - RGB (default), Red, Green or Blue. Per-channel levels let you fix a color cast: if an image is too blue, pull Blue's
input_whitedown or raise itsinput_black- the classic white-balance repair.
Output is the corrected IMAGE.
Installing it
From ComfyUI-Image-Effects (Orion4D). ComfyUI Manager โ search "Image Effects", or:
cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/ComfyUI-Image-Effects
cd ComfyUI-Image-Effects
pip install -r requirements.txt
Restart, then it's under Add Node โ Image Effects. It's pure NumPy - no models, no downloads beyond the pack.
Gotchas
Pack-wide: only the first image of a batch is processed, CPU-bound (fast here - it's just per-channel math). The trap to avoid is clipping without realizing it: pulling input_black too high crushes shadow detail, and input_white too low blows highlights - there's no live histogram to warn you, so check the result before you commit. And if you're chasing a selective fix (only shadows, only highlights), Levels is the wrong tool - that's the pack's Shadow/Highlight node. Levels is global, and that's exactly what makes it the reliable first step.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | โ | |
| input_black | FLOAT | 0.000โ1 | โ |
| input_white | FLOAT | 1.000โ1 | โ |
| gamma | FLOAT | 1.000.1โ3 | โ |
| output_black | FLOAT | 0.000โ1 | โ |
| output_white | FLOAT | 1.000โ1 | โ |
| channelopt | COMBO | RGB | 4 options: RGB, Red, Green, Blue |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | โ |