ꘇ top.lookup
Gradient-map any image with your own ramp — LUTs without a LUT file
- image
- lookup
- image
A lookup table is the cheapest way to make an arbitrary grade, and top.lookup implements one the visual way: you supply the ramp as an image, and it maps your picture's luminance (or each channel) through it. Landscape photographers call this a gradient map; colourists call it a LUT; the math is identical either way. Give it a black-to-orange-to-white strip and a flat render comes back golden-hour. Give it a proper viridis strip and a depth map becomes a readable plot.
The reason to own it is the same reason the KB gives for the whole post-processing layer: LUT work is settled, deterministic, instant, and there's no single canonical pack with a good one. top.colormap in this same pack covers five built-in palettes; top.lookup is the escape hatch for your ramp.
How it works
You connect two images: image (the picture being looked up) and lookup (the ramp). The ramp is read as a horizontal gradient - sample position across the width is the input value, left edge = 0, right edge = 1 - and the node interpolates linearly between texel centres, so a 16-pixel ramp still gives you a smooth result rather than visible steps.
mode chooses what gets looked up. luma sends each pixel's luminance through the ramp, which is the classic gradient-map/duotone look. channels sends R, G and B through the ramp separately, which is either a powerful per-channel grade or an instant mess depending entirely on your ramp - a single greyscale ramp in channels mode is roughly an identity, while a photographic ramp turns everything into a swirl of complementary casts.
row picks the vertical position in the ramp image, normalized 0..1. The default 0.5 reads the middle row. The interesting consequence: one ramp image is actually a whole stack of LUTs, and row is your selector. Pack eight hand-made grades as eight rows of one PNG and switch between them with a single float - or automate that float from the timeline.
mix blends the looked-up result back toward the source. The source's alpha is preserved, and the ramp's alpha is explicitly ignored (the interior is forced opaque), so you can use a ramp PNG that has transparency without it bleeding in.
The inputs that matter
image, lookup, mode, row, mix. That's the whole surface. Output is one image, which is what makes LUT work so satisfying to chain: look-up a plate, then top.composite it, then top.level to dial the contrast the ramp didn't provide.
Where the ramp comes from is your business - a top.noise field turned into a two-colour strip, a photo's own left-to-right gradient, or any palette image you like. The pack's own top.colormap is the fast path when one of its five built-ins happens to be what you want.
Install
ComfyUI Manager → search ꘇ Genereti → install, or:
git clone https://github.com/languel/genereti.git custom_nodes/genereti
./.venv/bin/python -m pip install -r custom_nodes/genereti/requirements.txt
Restart Comfy, refresh the page. One frontend pin, no models, nothing to download - though note this node needs a wired IMAGE supplying the ramp, unlike the built-in palettes in top.colormap. Find it as ꘇ top.lookup under Genereti / TOP, searching genereti since the leading glyph sorts badly.
Traps
A ramp is not a colour-match node. Gradient mapping is a look; matching two shots' colour statistics is a different operation, and the KB is explicit that these get confused. If you're trying to make a composited subject sit in a background's light, LUTing it won't do it.
Vertical ramps read one row. If your ramp image is a vertical gradient, row 0.5 slices through the middle of it and you'll wonder why the output is one flat colour. Ramps must run left-to-right.
channels mode is a wildcard. Start in luma; only switch to channels with a deliberately designed per-channel ramp.
Live vs Queue. Live mode runs on the browser GPU (WebGPU required), Queue on PyTorch. Live intermediate textures are 8-bit, so a subtle ramp can band slightly differently than in a queued render.
Pack status: super-alpha, early classroom testing. Back up workflows you care about.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| lookup | IMAGE | — | |
| mode | COMBO | 2 options: luma, channels | |
| row | FLOAT | 0.500–1 | — |
| mix | FLOAT | 1.000–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |