comfyui-mini-nodes Introduction
comfyui-mini-nodes is a collection of small, practical nodes for ComfyUI. It helps you match colors between images, choose latent dimensions for an image workflow, and decide whether a saved image should include workflow metadata.
The color-matching node is especially useful when an edit or outpainting pass changes colors you wanted to keep consistent. For example, an edited portrait may have a different skin tone from the original even though the face was not meant to change. Instead of matching the entire image—which may include new clothing or a new background—you can tell the node which areas to compare.
How comfyui-mini-nodes Works
ComfyUI workflows connect nodes so that images and settings pass from one step to the next. Each mini node handles a specific task:
- Color matching compares a target image with a reference image, then adjusts the target’s colors. Think of the reference as a color guide. Optional masks act like highlighted areas: they tell the node which pixels to study in each image. The target and reference masks are separate, so the highlighted areas do not need to be in the same position or in images of the same size.
- Resolution selection provides latent-size presets and a channel setting for the model you are using. A latent is the image representation a generation model works with internally; choosing compatible dimensions and channels helps avoid shape-related errors.
- Image saving with metadata gives you a switch to control whether workflow metadata is embedded in the saved image.
For a portrait edit, you might mask the face in both the edited image and the reference. The color-matching node then uses those selected pixels as its guide, rather than letting a changed background or outfit influence the match.
comfyui-mini-nodes Features
Color matching with mini_color_match
mini_color_match helps correct color shifts introduced during editing and supports stylized color grading. You can use it with two separate masks—one for the target and one for the reference—or leave the masks disconnected to match using full-image color statistics.
Separate masks are particularly helpful for outpainting and portraits. The node samples each image in its own original coordinates, without forcing the reference to be resized or cropped to match the target. You can therefore select a face in each image even when the images have different dimensions or the faces appear in different places. Feathered mask edges can also contribute to sampling, helping you make more natural selections.
You can draw masks manually or supply them from segmentation nodes. For instance, selecting skin in both images can help preserve character skin-tone consistency while leaving unrelated scene changes out of the comparison.
Edited-image color shift example
Color-matching result comparison
Example color-matching workflow
Using segmentation nodes to select areas
Stylized color grading with separate masks
Method determines how the colors are matched:
| Method | When to try it |
|---|---|
linear | A strong color match, particularly for a selected area such as skin. It scales the red, green, and blue channels independently. |
mean | A gentler adjustment when you want to preserve the target’s original contrast. It shifts average color values. |
unbalanced_linear | A color-and-contrast adjustment that scales the channels uniformly. |
MKL | General full-image color transfer. |
Wavelet | Color or white-balance correction when the target and reference show the same composition. |
Strength controls how much of the correction is applied: 0.0 gives no effect, while 1.0 applies the full effect. If a match looks too pronounced, lower the strength before changing other parts of your workflow.
For local matching—such as bringing an edited face closer to a reference skin tone—start with separate masks and try linear or mean. For an overall color treatment, try an unmasked full-frame match with MKL. If two images have the same composition but differ in white balance, try Wavelet.
Resolution and latent dimensions
The node now called Resolution was previously named Latent Size. It offers presets for selecting latent dimensions quickly and lets you choose an architecture channel setting to suit your generation model.
| Channel setting | Models identified in the author’s documentation |
|---|---|
16-channel (default) | FLUX.1, QWEN-IMAGE, WAN2.1/2.2, Z-IMAGE, SD3, and others |
4-channel | SD1, SD1.5, SDXL1.0, and other older models |
128-channel | FLUX2, FLUX2.KLEIN, and other newer models |
These are compatibility settings, not models supplied by the extension. Match the channel setting to the model in your workflow to help avoid “Dimension Mismatch” or “Shape Error” messages.
Image saving with metadata
The image-save node includes a boolean switch for embedding workflow metadata in the saved image. Turn it on when you want the saved file to include that workflow information; turn it off when you do not.
What’s New with comfyui-mini-nodes
- v1.0.4: Fixed a high-resolution shape mismatch and added
nodes_video_color_match. - v1.0.3: Updated and optimized the resolution presets. Renamed Latent Size to Resolution for clarity; the node’s functionality remains the same.
- v1.0.2: Added
MKLfor general full-image transfer andWaveletfor color or white-balance fixes in identical compositions. Reintroducedlinearandmeanas prominent choices for stable, precise mask-based matching. Removed the redundant Balanced Linear option; adjust strength instead. - v1.0.1: Improved
mini_color_matchfor outpainting and skin-tone consistency. Target and reference images are sampled independently, masks became optional for full-frame matching, feathered mask edges became easier to include in sampling, and Balanced Linear matching gained a wider contrast-scaling range.
Troubleshooting comfyui-mini-nodes
An older workflow shows a missing Latent Size node.
Replace it with Resolution. The node was renamed in v1.0.3, but its functionality remains the same.
You see a “Dimension Mismatch” or “Shape Error.”
Check the architecture-channel setting in Resolution against your generation model. For example, the author lists SDXL1.0 under 4-channel and FLUX.1 under 16-channel. If the issue occurs at high resolution, check that you are using a version with the v1.0.4 high-resolution shape-mismatch fix.
The color match is influenced by a changed outfit or background.
Connect separate masks that select comparable, unchanged areas in the target and reference images. For a portrait, try selecting the face or skin in each image. This keeps unrelated changes from guiding the match.
The color adjustment looks too strong.
Lower Strength toward 0.0. If you want to retain the target image’s contrast, try mean.
Do the two images need to have the same size or framing?
No. mini_color_match samples the target and reference independently. Place each mask over the area you want sampled in its respective image.
Are masks required?
No. Without masks, the node uses full-frame image statistics. Use masks when you need to match a specific area more precisely.
Learn More about comfyui-mini-nodes
- Explore the ComfyUI project for information about the workflow environment in which these nodes run.
- Use the workflow and result images above as visual guides when trying mask-based color matching and resolution settings.
