ComfyUI Node

Image Pro

Thirty-one image operations, from histogram color-matching to glitch art, in one node

By IxMxAMAR·Created 4 months ago·Updated about a month ago· 0
Image Pro
  • image
  • source
  • reference
  • background
  • foreground
  • mask
  • image
  • mask
  • width
  • height
  • metadata_json
modeblur_gaussian
theme(use pack default)
path
pattern*.png
folder
seed-1
index0
hue_shift0.00
saturation1.00
lightness1.00
black_point0.00
white_point1.00
gamma1.00
bits4
threshold0.50
strength1.00
blend_modenormal
opacity1.00
block_size8
radius2.00
amount150
shift_pixels4
softness0.60
k0.20
cols2
rows2
multiple64
fill_value0.00
luminance_dependence0.50
quality30
strips8
max_shift16
dot_size6
blur_radius8
output_kindhigh_frequency
channel_actiongrayscale
n_colors5

Image Pro is the pack's Swiss-army image knife: one node, a mode dropdown with 31 operations, and outputs for image, mask, width, height, and metadata_json. The modes split into five families: loaders (path, glob, random-from-folder, last-saved, Nth-in-sequence), value and color (invert, HSL shift, levels, posterize, solarize, threshold, histogram color-matching, alpha composite), spatial (pixelate, blur, sharpen, chromatic aberration, vignette, lens distortion, tile, pad-to-multiple), style (noise, film grain, JPEG degradation, glitch, halftone, frequency separation), and inspect (image info, channel ops, palette, histogram).

The two modes that justify the install on their own are color_match_histogram and image_composite_over. The first transfers one image's color distribution to another per-channel via CDF mapping, which is the classic trick for compositing: render a subject, then match its color to a background plate so it doesn't look pasted. strength blends between the original and the matched result, so you can push it partway. The second composites foreground over background with blend_mode (normal/add/multiply/screen), opacity, and an optional mask - and it respects the foreground's alpha channel if it's RGBA. Put those two together and you can assemble a believable composite without touching an external editor.

How it works

Same skeleton as the rest of the pack: pick mode, the relevant widgets appear, one process method dispatches, and unused outputs pad to empty defaults. A few inputs to know:

  • Loaders take path, folder, pattern, seed, or index depending on mode, and fill image, width, height, and metadata_json (which includes EXIF).
  • color_match_histogram wants source and reference IMAGE inputs plus strength.
  • image_composite_over wants background, foreground, mask, blend_mode, opacity.
  • levels takes black_point, white_point, gamma; frequency_separation takes blur_radius and an output_kind of high_frequency or low_frequency - the retoucher's favorite, since it lets you smooth skin without flattening the whole image.

Installing it

It ships with Utility-MegaPack - one install gets all eight nodes:

cd ComfyUI/custom_nodes
git clone https://github.com/IxMxAMAR/ComfyUI-Utility-MegaPack

Restart ComfyUI, or use ComfyUI Manager → search "Utility-MegaPack". No model files. Dependencies are the usual light set (numpy, Pillow, requests, simpleeval, Jinja2, PyYAML, cryptography); the heavy lifting here is Pillow and torch, which ComfyUI already has.

Where people get tripped up

Two things to know from the v0.3 changelog, because they explain past bugs you may hit in older copies: halftone_dots used to be pathologically slow (an O(N²) blowup that froze a 1024² image for seconds at dot_size=6 - fixed), and invert/threshold_binary used to destroy alpha on RGBA inputs (now preserved). If you're on the current release, neither bites you. The mask output socket exists on the node but no Image Pro mode actually produces a real mask - leave it unwired. And remember loaders like load_image_path read from disk by a raw path, so keep paths inside ComfyUI's folders unless you know what you're doing. One aside: quality_degrade_jpeg is a real PIL round-trip through JPEG, so it's great for data-augmentation-style workflows and terrible if you wanted a fake-looking "compressed" look with full control.

CategoryUtility-MegaPack

Inputs (43)

NameTypeDefaultDescription
modeCOMBOblur_gaussian31 options: blur_gaussian, channel_op, chromatic_aberration, color_match_histogram, color_shift_hsl, film_grain, +25
themeCOMBO(use pack default)17 options: (use pack default), (use ComfyUI default), cyberpunk, minimalist, glassmorphic, retro_terminal, +11
pathoptSTRING
patternoptSTRING*.png
folderoptSTRING
seedoptINT-1-1–4294967295
indexoptINT00–100000
imageoptIMAGE
hue_shiftoptFLOAT0.00-1–1
saturationoptFLOAT1.000–2
lightnessoptFLOAT1.000–2
black_pointoptFLOAT0.000–1
white_pointoptFLOAT1.000–1
gammaoptFLOAT1.000.1–5
bitsoptINT41–8
thresholdoptFLOAT0.500–1
sourceoptIMAGE
referenceoptIMAGE
strengthoptFLOAT1.000–1
backgroundoptIMAGE
foregroundoptIMAGE
blend_modeoptCOMBOnormal4 options: normal, add, multiply, screen
opacityoptFLOAT1.000–1
maskoptMASK
block_sizeoptINT82–256
radiusoptFLOAT2.000.1–100
amountoptINT1500–500
shift_pixelsoptINT40–64
softnessoptFLOAT0.600.1–1
koptFLOAT0.20-1–1
colsoptINT21–16
rowsoptINT21–16
multipleoptINT641–1024
fill_valueoptFLOAT0.000–1
luminance_dependenceoptFLOAT0.500–1
qualityoptINT301–100
stripsoptINT81–64
max_shiftoptINT160–256
dot_sizeoptINT62–32
blur_radiusoptINT81–64
output_kindoptCOMBOhigh_frequency2 options: high_frequency, low_frequency
channel_actionoptCOMBOgrayscale5 options: swap_rgb_to_bgr, isolate_r, isolate_g, isolate_b, grayscale
n_colorsoptINT52–32

Outputs (5)

NameTypeDescription
imageIMAGE
maskMASK
widthINT
heightINT
metadata_jsonSTRING