Tone Curve
S-curve contrast in two numbers
- src_image
- image
Tone Curve is a contrast tool with more finesse than a plain contrast slider. Instead of stretching everything uniformly, it bends the tonal response into an S-curve: shadows get pushed a little darker, highlights a little brighter, and the midtones stay put. That's the classic "give it some pop" move photographers make - it adds punch and depth without crushing the whole image flat. Applied gently it's the difference between a render that looks a bit washed-out and one that looks graded.
It's part of ComfyUI_Mira, mirabarukaso's personal utility pack, one of the image-adjustment family (Contrast, Brightness, Saturation, HUE, Sharpness, Gamma, RGB Channel, Grayscale) that all daisy-chain together - one node's image output feeds the next node's src_image, so Tone Curve slots naturally into a small finishing stack.
How it works
You get two handles: low and high. Roughly, low controls how hard the bottom of the curve dips (darkening the shadows) and high controls how much the top lifts (brightening the highlights). The two together define the steepness and shape of the S. Both range from -10 to 10; the defaults are low = -1, high = 1, which is already a mild, sensible S-curve. Push both outward for more aggressive contrast; invert their signs to flatten or reverse the curve for a faded, low-contrast look.
Because it's a curve and not a linear multiply, it protects the midtones - which is why it reads as more natural than yanking a contrast slider.
The inputs and outputs that matter
- src_image - the image to grade.
- low - shadow end of the curve, -10 to 10, default -1.
- high - highlight end of the curve, -10 to 10, default 1.
- image (output) - the graded image, into your next node.
Start from the defaults and move in small steps. A tiny push on each handle is usually all a generated image needs.
Installing it
ComfyUI Manager: search ComfyUI_Mira, install, restart. Or clone:
cd ComfyUI/custom_nodes && git clone https://github.com/mirabarukaso/ComfyUI_Mira.git
then restart. If loading errors, run pip install -r requirements.txt in the ComfyUI_Mira folder. It's under Mira/Util/Image.
Common issues
- Easy to overdo. Big low/high values crush shadow detail to black and blow highlights to white. If the image loses texture in the dark or bright areas, ease off.
- It's contrast, not exposure. Tone Curve reshapes contrast around the midtones; it won't rescue an image that's globally too dark or too bright. Use Adjust Brightness or Gamma for overall level, then Tone Curve for pop.
- Faded look on purpose. Flipping the curve (lifting shadows, lowering highlights) gives that matte, low-contrast film look. Handy, just know that's what the reversed settings do.
- Chain last-ish. Grade after color correction and before final sharpening, so contrast isn't fighting a cast you haven't fixed yet.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| src_image | IMAGE | — | |
| low | FLOAT | -1.00-10–10 | — |
| high | FLOAT | 1.00-10–10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |