ComfyUI Node Runs on cloud

Image Curves

Photoshop curves you drag right on the node

By WASasquatch·Created 3 years ago·Updated 4 days ago· 1,844
Image Curves
  • image
  • curve
  • IMAGE
curve_points
strength1.00

Every image editor worth its salt has curves, because curves are the honest version of every "magic" contrast or color tool: a graph of input brightness against output brightness, and anything a filter can do, a curve can do more precisely. Image Curves brings that to ComfyUI in the most direct way possible - you drag control points on the node itself and watch the image change. No separate popup editor, no importing a LUT to nudge one tone.

It's from WAS Node Suite (WASasquatch's MIT pack, v3 ships 457 nodes), filed under WAS Suite/Image/Adjustment.

How the node works

The graph maps a 0–255 input scale to a 0–255 output. A straight diagonal line leaves the image alone. Grab a point and pull the middle of the line down and you've got a contrast S-curve; pull the top of the line flat and you've crushed your highlights. The difference from a blunt brightness slider is that you can bend one part of the tonal range and leave the rest alone.

The curve is a monotone spline through your points - the line always rises or stays flat, never dips - which matters more than it sounds. A plain spline can overshoot, dipping below black or above white between points, and that overshoot reads as a halo around edges. This implementation's curve can't do that, so you can push points hard without inventing halos the points never asked for.

You can work the composite (all channels at once) or one color channel at a time - pull red's curve down in the shadows and you're cooling the darks the same way a colorist would, just with a graph instead of three wheels.

The inputs

  • curve_points - the control points, written by the interface as you drag and saved with the workflow. The format is rgb:0,0;255,255|r:...|g:...|b:... on the 0–255 scale; empty means every channel is a straight line. You can clear the field to reset everything, and a straight line leaves a channel alone. Most people never type in it - you drag on the node and this string is the record.
  • strength - how much of the curved result to keep, mixed against the original. 1.0 is the full curve, 0.5 is halfway, 0.0 passes the image through untouched. This is the dial that stops you from committing to a grade before you've seen it at full strength.
  • curve (optional) - a CURVE-type input you can feed from ComfyUI's own Curve Editor node if you'd rather draw there. That external curve runs over all three channels first, and then this node's own curve_points are applied on top. Left unwired, only curve_points is read.

Using it

Curves is where "make it punchier without wrecking the highlights" lives. A gentle S (pull shadows down a touch, highlights up a touch) is the single most useful correction in the tool. For color, per-channel curves are how you'd do the shadow-cool/highlight-warm thing with surgical control - pull blue up in the lows and red up in the highs on separate channel tabs and you've rebuilt a colorist's split tone as a graph.

The workflow-friendly move is the strength input. Wire it to a slider or animate it and you can ease a grade in, or A/B 0.6 vs 1.0 by toggling a value instead of re-dragging points.

Install

WAS Node Suite via ComfyUI Manager (search "WAS Node Suite v3") or git clone https://github.com/WASasquatch/was-node-suite-comfyui into ComfyUI/custom_nodes, then restart - ComfyUI 0.14.0+, Python 3.10+. v3 installs no Python packages, and the curve math runs on torch, so there's no OpenCV or numpy-install ceremony. (The old v2 of this suite was a notorious source of dependency collisions; the current one is deliberately clean.)

One habit to build: your curve_points string travels inside the workflow JSON, so if you share a graph, the grade goes with it. But it also means a shared node with a pre-set curve will overwrite what you draw if you paste a workflow over your current one - check the string is empty (or your intended points) before you drag a fresh curve.

CategoryWAS Suite/Image/Adjustment

Inputs (4)

NameTypeDefaultDescription
imageIMAGEThe image to adjust. Every image in a batch gets the same curve.
curve_pointsoptSTRINGThe control points, written by the interface and saved with the workflow, as 'rgb:0,0;255,255|r:...|g:...|b:...' on a 0-255 scale. A straight line leaves the channel alone, and empty is every channel straight. Clear the field to reset every curve.
strengthoptFLOAT1.000–1How much of the curved result to keep, mixed against the original. 1.0 is the full curve, 0.5 is halfway, and 0.0 passes the image through untouched.
curveoptCURVE[object Object]A curve drawn somewhere else, from ComfyUI's Curve Editor. It runs over all three channels before curve_points does, so the two combine. Left unwired, only curve_points is read.

Outputs (1)

NameTypeDescription
IMAGEIMAGEThe image with the curves applied.