Image Levels Adjustment
Contrast and tone control in ComfyUI
This is the Photoshop Levels dialog, ported into a node. Image Levels Adjustment lets you set the black point, the white point, and the midtone gamma of an image - the single most useful tonal control there is. Flat, washed-out render? Pull the black point in and it snaps to life. Too contrasty? Ease the points apart. If you only learn one tonal node in WAS Node Suite, make it this one.
Levels is a photographer's staple because it's precise. Instead of a vague "brightness" slider, you're telling the image exactly which input value should become pure black, which should become pure white, and how the middle stretches between them.
How it works
An image's tones live on a 0–255 scale. Levels remaps that scale. The black level says "anything this dark or darker becomes 0" - pulling it up crushes shadows and adds contrast. The white level says "anything this bright or brighter becomes 255" - pulling it down brightens and clips highlights. The midtone (gamma) bends everything in between, brightening or darkening the midtones without moving the black and white ends. Together they give you full control over the tonal curve in three numbers.
You feed in an image, set those three points, and get the remapped image out. It's the clean, technical way to fix contrast - far more controllable than stacking brightness/contrast tweaks.
The inputs and outputs that matter
The three that matter are the black level, the white level, and the mid/gamma - shadows, highlights, and midtones respectively. Your image goes in, the adjusted image comes out. Nudge the black and white points inward to add punch to a flat image; adjust the midtone to brighten or darken without re-clipping the ends.
Small moves. Levels is powerful enough to wreck an image quickly - bring the points in until it looks right, not until the histogram is empty.
How to install it
Ships in WAS Node Suite. Install once through ComfyUI Manager (search WAS Node Suite, install, restart) or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui
pip install -r was-node-suite-comfyui/requirements.txt
then restart. On Windows portable, run the pip step with python_embeded\python.exe -s -m pip install -r ... (or use install.bat) so dependencies target ComfyUI's Python.
Common issues & troubleshooting
You clipped detail into pure black or white. Push the black point too high or the white point too low and you don't just add contrast - you destroy information. Whole regions flatten to 0 or 255 and there's no getting them back. Ease the points off the extremes; leave a little headroom at each end.
The image looks posterized or bands appear. Aggressive levels on an 8-bit image stretches the remaining tones over fewer values, which shows as banding in smooth areas like skies. Go gentler, or do heavy tonal work earlier in the pipeline (before upscaling) so there's more data to spread across.
Confused about which node to use. WAS ships several tonal tools - Levels, Shadows and Highlights, Filter Adjustments. Levels is the precise one for overall contrast and tonal range; Shadows and Highlights is the targeted one for rescuing just the dark or bright ends. Reach for Levels first for general "this looks flat" fixes.
The suite won't import. WAS Node Suite is large and unmaintained since late 2023; its signature failure is an "Import Failed" after a ComfyUI update, from a dependency version clash (opencv the usual offender). Reinstall the requirements against your ComfyUI Python and restart. The node works fine - it's the suite install that's the fragile bit.
Inputs (0)
No inputs
Outputs (0)
No outputs