HivisionLayOutNode
Turn one ID photo into a printable sheet of them
- input_img
- normal_params
- IMAGE
The 排版 step - layout. Photo booths and print shops sell you ID photos as a single sheet of many copies that you cut apart yourself. HivisionLayOutNode is that sheet. Feed it the finished single photo and it arranges a grid of copies on a standard 1746x1180 pixel canvas - the sheet size these print services use - so you print once and cut out as many as you need.
It's the last node in the canonical chain, sitting after LaterProcessNode in the pack's shipped workflow. If you're only making a digital ID photo, you never need it. If you need physical copies, it's what makes the output worth printing.
How it works
Pure image composition, no models, no weights, instant. Two functions from the upstream project do the work:
generate_layout_photodecides the grid. Given your photo's spec size (fromnormal_params), it figures out how many columns and rows fit on the 1746x1180 canvas - with 30px gaps between photos and 50/70px margins - and it will rotate a portrait-format photo to landscape if that packs more copies onto the sheet. One-inch photos fit in the neighborhood of eight copies; bigger specs fit fewer.generate_layout_imagethen resizes your photo to the spec size and stamps it into each grid slot on a white canvas.
So the exact size you chose upstream matters here: the grid math is computed from it. If your PARAMS node says one-inch but you feed it a two-inch cutout, the sheet will look wrong.
Inputs and output
input_img- a single finished ID photo. Works with the opaque output ofAddBackgroundNode(color background and all) or the raw RGBA cutout fromHivisionNode. Both are fine.normal_params- the same PARAMS bundle as everywhere else; this node readssizeand nothing else.- Output - one
IMAGE: the assembled sheet, ready for aSaveImage.
Installing it
It ships in the same pack as HivisionNode, so install once for all of them. ComfyUI Manager, search "HivisionIDPhotos", or:
cd ComfyUI/custom_nodes
git clone https://github.com/AIFSH/HivisionIDPhotos-ComfyUI
Restart ComfyUI. This node has zero extra requirements beyond the pack's shared OpenCV/numpy stack - it's plain canvas math, which also means it runs anywhere.
Troubleshooting
- The sheet comes out blank or with photos off-center - the spec size in your params node doesn't match the image you fed in. Rebuild
normal_paramssosizeis consistent across the chain. - Fewer copies than you expected - that's the rotation decision and the fixed canvas, not a bug. Bigger specs simply fit fewer per sheet, and the node prefers the densest legal layout.
- Can't change the canvas size - right, it's hard-coded at 1746x1180 in the source. If you need a different print format, you'd compose the grid yourself with a custom node; this one targets the standard sheet.
Worth knowing the pack's maintenance status: it's been untouched since September 2024, but this node is so simple that the risk of it breaking is about as low as it gets in ComfyUI-land. It's also entirely local - the layout is computed deterministically, no calls out to anything.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| input_img | IMAGE | — | |
| normal_params | PARAMS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |