Nodes/Manga Screen/Manga Panel
ComfyUI Node

Manga Panel

The crop, border and paper pass that makes a screenshot look printed

By ashukae·Created 5 days ago·Updated 2 days ago· 118
Manga Panel
  • image
  • IMAGE
◄frame4:3 wide►
◄crop_x0.50►
◄crop_y0.40►
◄border5►
◄margin60►
◄paperwhite►
◄ink0.50►

You've got a hard black-and-white image out of Manga Finish and it still looks like a file. A finished panel has paper around it, a border with weight to it, and blacks that aren't quite the pure #000000 of a colour-managed render. Manga Panel does those three things in one node and stops there.

That last part is the honest limit: this is not a page compositor. It takes one image in and gives you one framed panel out. No guttering, no multi-panel layout, no speech bubbles. What it's good at is the final 5% that makes a generated image read as a scan of something printed.

How it works

First it decides what's ink. It averages the three channels and thresholds at 0.5, so the output is a true binary ink mask - there's no grey left to carry. That's why the image tooltip says "a finished black-and-white page": feed it a colour render and you get a crude luminance threshold, which is not what you want.

Then it cuts the largest window of the shape you asked for, anchored at crop_x / crop_y. It crops as little as possible - for a 16:9 frame out of a square image it keeps full width and trims height - so you're never scaling the artwork, only choosing which slice survives. The border is then painted inside the window as solid ink, and the margin is added outside it as paper. Both of those numbers are specified in pixels at 1024 px width and scale with the actual image, so border: 5 is 10 px on a 2048-wide page.

The paper and ink pass is the part with taste. Ink edges get a sub-pixel softness so they don't look like vector shapes, solid blacks get slight density mottling so they don't look like a flat fill, and the paper gets a colour plus a fine fibre texture - white is pure 255, off-white and cream are warmer with more grain. ink at 0 keeps everything hard black and white; the default 0.5 gives you soft edges and slightly uneven blacks. None of it is random in a way that changes between runs, so it's safe to iterate on.

The inputs

frame is the one you set first: original (no crop at all), 4:3 wide, 16:9 wide, 3:4 tall, 1:1. With original, crop_x and crop_y do nothing - there's no window to move.

crop_x (0.5) and crop_y (0.4) place that window: 0 pins it to the left/top edge, 1 to the right/bottom, and 0.5 centres it however much is left over. The 0.4 default on crop_y is a small nudge upward, which is usually where the face is.

ink (0.5) is the whole print feel in one slider, and it's the most fun one to scrub. paper is a three-way choice with no wrong answer: white for clean digital, off-white for a scanned tankōbon, cream when you want it to look forty years old.

Output is a single IMAGE - batches processed one frame at a time - so it goes to Save Image or any preview node.

Install

Manager → search Manga Screen, or:

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

Dependencies are opencv-python and numpy; no models, no downloads. Restart ComfyUI afterwards. An IMPORT FAILED across all three nodes means cv2 isn't in ComfyUI's Python - python -m pip install -r requirements.txt from the pack folder with ComfyUI's interpreter, then restart.

Where it goes wrong

Feeding it colour. The 0.5 threshold is unforgiving: a mid-grey background becomes solid black, skin becomes white or black depending on which side of the line it lands. Put Manga Levels or Manga Finish in front of it.

Expecting a page. One image in, one panel out. If you want four panels on a sheet, you're compositing in an image editor or building that yourself - this node won't do it, and doesn't pretend to.

Border and margin don't travel. Because they scale with width, a panel tuned at 1024 looks tight at 2048 and chunky at 512. Retune, don't reuse.

The pack itself is a single-file, MIT-licensed, one-person project with a modest footprint - which is fine, because "crop, add a border, tint the paper" is exactly the kind of small deterministic job you want handled by 260 readable lines of OpenCV rather than another download. Read the source if you're the cautious type; it's one file and it does what it says.

Categoryimage/postprocessing

Inputs (8)

NameTypeDefaultDescription
imageIMAGEA finished black-and-white page (Manga Finish output).
frameCOMBO4:3 widePanel shape cut out of the image.
crop_xFLOAT0.500–1Where the panel sits horizontally: 0 left edge, 1 right edge.
crop_yFLOAT0.400–1Where the panel sits vertically: 0 top, 1 bottom.
borderINT50–40Panel border thickness in pixels at 1024 px width.
marginINT600–400Paper around the panel in pixels at 1024 px width.
paperCOMBOwhite3 options: white, off-white, cream
inkFLOAT0.500–1Printed-ink feel: soft ink edges and slightly uneven solid blacks. 0 keeps pure black and white.

Outputs (1)

NameTypeDescription
IMAGEIMAGE—