[BMZ] TransferColors
Make a whole batch of images agree on one palette
- images
- images
If you've ever upscaled an image in tiles, outpainted an edge, or stacked reference frames and watched the seams give the game away, you know the real problem isn't content - it's color. Each tile comes back with slightly different exposure, and the batch looks like it was shot by three different cameras. BmzTransferColors fixes that in one move: it takes your batch of images and makes every frame's colors match the one before it, so the whole run settles into the palette of the first image.
How it works
This is the clever one in the pack, and it's worth understanding before you use it, because it hides a dependency. The node splits your batch into individual images, then folds through them in order: image 2 is color-matched to image 1, image 3 to that result, and so on. Each match runs through the ColorMatch node from Kijai's KJNodes pack, using its hm-mvgd-hm method (a hybrid of histogram matching and the MVGD color-transfer approach) at your match_strength, multithreaded. At the end it re-batches everything with KJNodes' ImageBatchMulti.
Here's the thing: BmzTransferColors doesn't do the math itself. It builds a little subgraph at execution time and delegates to nodes that live in ComfyUI-KJNodes. If you don't have KJNodes installed, this node errors out the moment it runs. The pack's own requirements.txt only lists jinja2, so nothing will warn you ahead of time. Install ComfyUI-KJNodes first - you'll want it anyway, it's one of the most-installed packs in the ecosystem.
Inputs and outputs
- images - an IMAGE tensor. A batch of several images (that's the point), or a single one. Feed it the output of your tile-combiner, your frame stack, or your reference set.
- match_strength - FLOAT, default 0.9. How hard each image is pushed toward the previous one's colors. Crank it to 1.0 for full uniformity; dial it down when you want the mood to transfer without flattening every image into the same wash.
- images (output) - the same count of images you put in, re-batched, each color-shifted toward the head of the sequence.
A single image passes through unchanged - there's nothing to match against. The whole trick lives in the ordering: the first image is the reference, so put your "look" frame first.
Installing it
Two installs, not one. ComfyUI Manager → search "ComfyUI-BmzUtils" → install, then search "ComfyUI-KJNodes" → install. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/bmalhz/ComfyUI-BmzUtils
git clone https://github.com/kijai/ComfyUI-KJNodes
Restart after both.
When it's the right tool
This is the node for "these tiles must not look like tiles" workflows - upscaled or outpainted regions, multi-tile generations you're about to composite, or a sequence of frames you want color-graded as one unit. It is not a per-image style grader; it's a harmonizer, and its job is making a set look like it came from one source. The KJNodes ColorMatch node underneath is battle-tested, so the hard part is reliable - the wrapper just saves you wiring up the accumulation loop yourself. Just don't forget its silent partner, because KJNodes is the real engine under the hood.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| match_strength | FLOAT | 0.90 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |