Nodes/ComfyUI_Fill-Nodes/FL Image Collage
ComfyUI Node

FL Image Collage

FL_ImageCollage — turn one image into a photomosaic tiled from another

By filliptm·Created 3 years ago·Updated about 10 hours ago· 628
FL Image Collage
  • base_image
  • tile_image
  • IMAGE
tile_size32
spacing0

Remember those posters that look like one big picture from across the room but are actually made of thousands of tiny photos up close? That's a photomosaic, and FL_ImageCollage builds one. You give it a base image (the big picture you want to see) and a tile image (the little picture it's built from), and it tiles the small one across the big one, tinting each tile to match the color of the region it's covering. Step back, and the base image emerges from the pattern of tiles.

It's a VFX/novelty node, and an honest one - this isn't going in a serious production pipeline, it's for making a specific, recognizable effect. But it's a genuinely fun one, and it's the kind of thing that's annoying to build by hand, so having it as a single node is nice.

How it works

The node divides the base image into a grid of cells at your chosen tile size. For each cell, it takes the tile image, colorizes it toward the average color of the base image underneath that cell, and pastes it in. Because each tile carries the local color of the base, the overall base image reads through the mosaic. Smaller tiles mean more cells, which means more faithful reproduction of the base (at the cost of the tiles being too small to make out).

The inputs and outputs

  • base_image - the picture you want to see in the finished mosaic.
  • tile_image - the little image every tile is made from.
  • tile_size (8–256, default 32) - the size of each tile in pixels. Smaller = more tiles = closer to the base image but less visible tile detail. Larger = big chunky tiles you can clearly see, but a coarser rendition of the base.
  • spacing (0–64, default 0) - gap between tiles. A little spacing gives that grid-of-photos look; zero packs them seamlessly.

Output is a single IMAGE - the finished mosaic.

How to install it

Part of filliptm's Fill-Nodes pack. ComfyUI Manager → search ComfyUI_Fill-Nodes → Install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
pip install -r ComfyUI_Fill-Nodes/requirements.txt

No model download - it's PIL image compositing.

Common issues & troubleshooting

It's slow / makes a huge image on tiny tiles. Small tile_size on a large base means thousands of paste operations and a big output. If it's crawling, either raise tile_size or shrink the base image first. There's a real tradeoff here: fidelity to the base costs tiles, and tiles cost time and pixels.

The base image barely reads. The effect works best when the base has strong, large-scale shapes and good contrast - a portrait, a bold logo, a high-contrast scene. A busy, low-contrast base gets lost because there's no dominant structure for the tinted tiles to reconstruct. Pick a base you'd recognize as a thumbnail.

The tiles all look the same color. They're tinted toward the base region's average, so if your base is flat in color, the tiles will be too. That's the base's fault, not the node's - feed it something with tonal variation.

Spacing background. When you add spacing, the gaps fill with the node's background (black by default), which frames each tile like a physical photo grid. If you want a seamless mosaic instead, leave spacing at 0.

Category🏵️Fill Nodes/VFX

Inputs (4)

NameTypeDefaultDescription
base_imageIMAGE
tile_imageIMAGE
tile_sizeINT328–256
spacingINT00–64

Outputs (1)

NameTypeDescription
IMAGEIMAGE