Nodes/Manga Screen/Manga Levels
ComfyUI Node

Manga Levels

Three numbers that decide what counts as black before you print

By ashukae·Created 5 days ago·Updated 2 days ago· 118
Manga Levels
  • image
  • IMAGE
◄black0.20►
◄white0.70►
◄gamma1.30►

Manga Levels is the boring node in the pack and that's the point. It's grayscale plus a levels adjustment, three inputs, no model, no download, works on CPU. Its whole job is to flatten a colour illustration into a black-and-white image where the only things left with tone are the things that should be toned - then hand that to Manga Finish.

Worth being blunt about what it isn't: it doesn't preserve lines, it doesn't descreen, it doesn't know what a face is. It's a luminance conversion and a curve. If you want the clever version, that's Manga Finish downstream.

Why bother with a plain levels node

Because the alternative is worse. Manga Finish decides tone by brightness, so whatever is mid-grey in your input becomes halftone texture. Skin is mid-grey. Light hair is mid-grey. A plain white shirt in shade is mid-grey. Run the filter on an untouched illustration and the character's face comes back covered in dots.

Levels is the cheap fix: crush everything that should be paper up to white, then let the downstream node tone what's genuinely dark. The README's Manga-Lite workflow is exactly this - Manga Levels → lineart preprocessor → Manga Finish → Manga Panel - and it needs no edit model at all, which means it runs on anything that runs ComfyUI. On clean lineart with a simple background it gets surprisingly close to the Qwen version.

A small thing that helps: a lot of anime checkpoints ship suggested negatives that list halftone, screentone and dithering, so their outputs arrive smooth and flat. That's exactly the kind of image a levels stretch handles well, and exactly the kind Manga Finish can tone cleanly.

How it works

Grayscale using the Rec.601 luma weights (0.299 / 0.587 / 0.114) on the red, green and blue channels, then the classic levels formula: subtract black, divide by the white − black range, clamp to 0–1, and finally apply a power curve of 1/gamma. The result is replicated back across three channels, so it's still an RGB IMAGE - no channel-count surprises.

That clamp ordering matters. The image is clipped before gamma lifts it, which means white and black are hard decisions, not gentle curves. Set white to 0.70 and everything brighter than 70% grey becomes pure paper, detail and all. Sometimes that's what you want. Sometimes you'll go too far and lose a whole highlight.

The inputs

black (0.20) - input darker than this becomes black. Raise it if your blacks look weak.

white (0.70) - input brighter than this becomes white. This is the one you actually tune, and the author's own instruction is the right one: lower white until skin and light hair lose their tone. That's the whole trick, and it's faster to do by eye than to reason about.

gamma (1.3) - above 1 brightens the mid tones, because it's applied as ^(1/gamma). This is the control that rescues a stretch that went too aggressive: pull the tones back without moving the black and white points.

Output is one IMAGE, batch-safe, and always three channels - no channel-count surprises downstream.

Install

It's the same pack as the rest - ComfyUI Manager → search Manga Screen, or:

cd ComfyUI/custom_nodes
git clone https://github.com/ashukae/ComfyUI-MangaScreen

Needs opencv-python and numpy, which most ComfyUI installs already have. Restart after installing. If all three nodes show up as IMPORT FAILED, that's a missing cv2 - from inside the node folder, python -m pip install -r requirements.txt using ComfyUI's own interpreter, then restart.

Where it goes wrong

Don't run it after Manga Finish. You'd be applying a levels stretch to an image that's already two values; all you can do is lose dot structure. Levels is a pre-pass, always upstream.

white below black is nonsense. The node guards the divisor, but the mapping inverts and you'll get a photographic negative. Keep black under white.

It won't save a painted background. Flat-shaded backgrounds come through fine; a painted gradient turns into a grey smear that Manga Finish will happily dot. That's the specific place the README admits the Qwen edit version wins - an edit model redraws the background as lines, while a levels curve can only compress it.

It's destructive by design. There's no mask input, no per-region control. If you need one part of the image treated differently, split the graph and composite, or accept that this node is a blunt instrument. For the light path - no edit model, CPU only, minutes not hours - blunt is exactly the right trade.

Categoryimage/postprocessing

Inputs (4)

NameTypeDefaultDescription
imageIMAGE—
blackFLOAT0.200–0.9Input darker than this becomes black.
whiteFLOAT0.700.1–1Input brighter than this becomes white. Lower it until skin and light hair lose their tone.
gammaFLOAT1.300.3–3Above 1 brightens the mid tones.

Outputs (1)

NameTypeDescription
IMAGEIMAGE—