ComfyUI Node

ER Grade

Match your black and white points to a reference — the two-click grade

By esperandoelrender·Created 2 days ago·Updated 2 days ago· 0
ER Grade
  • images
  • reference
  • images
multiply1.00
offset0.000
gamma1.00
points{"bp": [0.0, 0.0, 0.0], "wp": [1.0, 1.0, 1.0], "lift": [0.0, 0.0, 0.0], "gain": [1.0, 1.0, 1.0]}

The fastest way to fix a washed-out or foggy image isn't a contrast slider - it's telling the image what black and what white are supposed to be. That's the classic "grade": sample the darkest and brightest points, remap the whole tonal range between them, and suddenly a flat render has punch. ER Grade does exactly that, but with the reference built in: you pick your image's blackpoint and whitepoint, pick the target black/white from a reference image, and it remaps one to the other.

It's from the ER VFX Nodepack by Héctor Gallego (ER Academy), and it's the node to reach for when you have a hero image you love and a new render you want to sit next to it - matching the blacks and whites is 80% of making two images feel like the same grade.

How it works

The math is the standard per-channel grade, applied in the node's Python:

A = multiply · (gain − lift) / (whitepoint − blackpoint), B = offset + lift − A · blackpoint, then out = (A · v + B)^(1/gamma).

Plainly: it stretches your image so its measured black lands on the target black and its white on the target white, per color channel, then lets you fine-tune. Because it works per channel, a color cast in the blacks gets corrected too - this is why the tool is a color-match, not just a contrast bump.

Using the pickers (the whole game)

Wire your image into images and optionally a reference into reference, then run once (a Load Image source loads the preview automatically). Four pick buttons do the work:

  • ⚫ In black - click the darkest area of your image.
  • ⚪ In white - click the brightest area of your image.
  • ⚫ Ref black / ⚪ Ref white - click the darkest and brightest areas of the reference.

Each pick samples a 3×3 pixel average, and the viewer has three tabs - Result, Input, and Ref - that switch automatically as you arm a picker, so you always sample on intact pixels, never on your own corrected result. When the points are set, the Result regrades live. Manual multiply, offset, and gamma (direct FLOAT inputs on the node) are there for the final nudge, and the picked points are saved with the workflow - reload it next week and the grade is still there.

The points string input carries the picked blackpoint/whitepoint/lift/gain state if you ever want to inspect or copy it; you don't normally touch it.

Tips and traps

  • Pick extremes, not midtones. If you click a shadow that isn't the darkest thing in frame, the whole stretch shifts. The same discipline applies to the reference.
  • The grade is applied per frame and is deterministic - safe on frame batches for a consistent look across a clip.
  • If your image is already near-black/white-correct and just needs mood, the manual multiply/offset/gamma controls alone are enough; the reference pickers are only for matching.

Installing

ER Grade ships as part of the ER VFX Nodepack. ComfyUI Manager → search "ER VFX Nodepack" → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/esperandoelrender/ComfyUI-ER-VFX-Nodepack.git

Restart and find it under image/adjust (search "ER"). No extra dependencies or model downloads. If you have the older individual er_* packs, remove them first - this pack supersedes them.

Where it slots into a workflow: generation → ER Grade with your reference image → out. It's the cheapest "make my render look like that" tool in the pack, and it pairs with ER Color Correct when you need wheels and secondaries on top of the match.

Categoryimage/adjust

Inputs (6)

NameTypeDefaultDescription
imagesIMAGE
multiplyFLOAT1.000–4
offsetFLOAT0.000-1–1
gammaFLOAT1.000.2–5
pointsSTRING{"bp": [0.0, 0.0, 0.0], "wp": [1.0, 1.0, 1.0], "lift": [0.0, 0.0, 0.0], "gain": [1.0, 1.0, 1.0]}
referenceoptIMAGEReference image to match: pick its blacks/whites with the ref pickers

Outputs (1)

NameTypeDescription
imagesIMAGE