ComfyUI Node

lay_mul_image

Hero image + thumbnails layout in ComfyUI

By cardenluo·Created 2 years ago·Updated 18 days ago· 309
lay_mul_image
  • main_image
  • image1
  • image2
  • image3
  • image4
  • image
sub_team_directioncolumn
main_positionleft
font
main_text
main_text_size60
main_long_size1024
image1_text
image2_text
image3_text
image4_text
sub_text_size30
sub_team_size512
border8

Think of the social-post format where one big image sits next to a strip of smaller ones - a hero shot with thumbnails, or a "main character plus supporting cast" layout. That's specifically what lay_mul_image builds, and it's the most opinionated of the layout nodes in cardenluo's ComfyUI-Apt_Preset.

What it does

The node's own description (translated from the author's Chinese docstring) says it plainly: sub-images arrange horizontally or vertically as a group, and the main image sits positioned around that group. Concretely, you get one main_image slot plus up to four image1image4 slots. sub_team_direction (row or column) decides whether those four line up side by side or stacked; main_position (top/bottom/left/right) decides which side of that strip the main image sits on.

Each image slot has its own optional caption - main_text for the hero, image1_text through image4_text for the thumbnails - rendered in one of eight bundled fonts via the font dropdown, sized independently with main_text_size and sub_text_size. main_long_size controls the main image's long-edge size (so it scales to fit your layout), sub_team_size does the same for the thumbnail strip, and border adds a uniform border around images in the composite.

Inputs and outputs

Required: sub_team_direction (row/column), main_position (top/bottom/left/right), font (one of eight bundled .otf/.ttf files). Optional: main_image, image1image4 (all IMAGE), main_text + main_text_size + main_long_size, image1_textimage4_text, sub_text_size, sub_team_size, border.

Single image output.

Everything under "optional" is genuinely optional - you can leave any of the four sub-images empty if you only have two or three to show, and skip captions entirely if you just want the layout without text.

Where this fits

This is a social-content layout node more than a comparison tool: think "final result plus three process shots," a character portrait with three outfit variants, or a product hero shot with detail crops. If you actually want a uniform, apples-to-apples comparison grid instead of a visual hierarchy, lay_ImageGrid or lay_image_grid_note are the simpler fit; lay_mul_image is for when one image is genuinely the point and the rest are supporting material.

Installing it

Through ComfyUI Manager: search ComfyUI-Apt_Preset. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git

Run install.bat on Windows (or the equivalent pip install -r requirements.txt elsewhere), restart ComfyUI. The font dropdown pulls from font files that ship inside the pack's repo - a full git clone (not a partial download) is what gets you all eight options; if you only grabbed part of the repo somehow, some fonts in the list may not resolve.

Troubleshooting

Same starting point as the rest of this pack's nodes: if lay_mul_image isn't showing up at all, check for an import failure on ComfyUI startup - ComfyUI-Apt_Preset is large enough that a missing dependency can take the whole pack down, and that's exactly what one Reddit user hit while debugging an unrelated node.

For this node specifically: if a font in the dropdown renders as boxes or fails silently, that's almost always a missing font asset rather than a bad font choice - reinstall the pack via a fresh git clone rather than patching the existing folder. And if your layout looks cramped or images overlap, that's main_long_size/sub_team_size fighting with border and main_position - those three settings interact (a wide border on a tightly sized sub-image strip leaves little room), so adjust main_long_size and sub_team_size before reaching for border to fix crowding.

CategoryApt_Preset/imgEffect

Inputs (18)

NameTypeDefaultDescription
sub_team_directionCOMBOcolumn2 options: row, column
main_positionCOMBOleft4 options: top, bottom, left, right
fontCOMBO8 options: QuakeLove-Regular.otf, Autography.otf, Romellast.otf, FlowPerfect.ttf, en-LOLItalic.ttf, Alibaba-PuHuiTi-Heavy.ttf, +2
main_imageoptIMAGE
image1optIMAGE
image2optIMAGE
image3optIMAGE
image4optIMAGE
main_textoptSTRING
main_text_sizeoptINT608–128
main_long_sizeoptINT1024128–4096
image1_textoptSTRING
image2_textoptSTRING
image3_textoptSTRING
image4_textoptSTRING
sub_text_sizeoptINT308–128
sub_team_sizeoptINT512128–4096
borderoptINT80–128

Outputs (1)

NameTypeDescription
imageIMAGE