Nodes/Eric_Image_Processing_Nodes/Batch Image Processing
ComfyUI Node

Batch Image Processing

Five classic restoration algorithms, one batch node

By EricRollei·Created 9 months ago·Updated 8 months ago· 9
Batch Image Processing
  • images
  • processed_images
processing_methodwavelet_denoise
consistent_parameterstrue
wavelet_typedb8
wavelet_methodBayesShrink
wavelet_sigma0.0
nlm_h0.0
nlm_patch_size7
homo_d040
homo_gamma_h1.8
homo_gamma_l0.60
rl_iterations10
rl_blur_size2.0
wiener_noise_variance0.000
memory_efficienttrue
show_progresstrue
fail_on_errorfalse

This is the closest thing this pack has to a table of contents. Instead of a neural network, it's a menu of five classical, pre-deep-learning image processing techniques - wavelet denoising, non-local means, homomorphic filtering, Richardson-Lucy deconvolution, and Wiener filtering - wired up to run consistently across a whole batch. None of these need a pretrained model or a download; they're decades-old algorithms with real math behind them, and this node is the fast way to apply one of them to a folder of images at once.

How it works

processing_method picks which of the five you're running. Wavelet denoising decomposes the image into frequency sub-bands via a wavelet transform, shrinks the small coefficients that are probably noise, and reconstructs - wavelet_type picks the actual wavelet family (db8/db4 are Daubechies wavelets, bior2.2 biorthogonal, coif2 Coiflets, haar the simplest and oldest), and wavelet_method picks the thresholding rule (BayesShrink and SureShrink estimate the right threshold statistically per sub-band, VisuShrink uses a simpler universal threshold, manual lets you set wavelet_sigma yourself). Non-local means denoises by averaging pixels from anywhere in the image that have a similar surrounding patch, not just nearby pixels - nlm_h is filtering strength, nlm_patch_size how big a neighborhood counts as "similar." Homomorphic filtering works in the frequency domain to separate illumination from reflectance, which is the standard fix for uneven lighting - homo_d0 is the cutoff frequency, homo_gamma_h/homo_gamma_l control how much high- and low-frequency content get boosted or suppressed. Richardson-Lucy here is the same iterative PSF-deconvolution algorithm as RichardsonLucyGPUNode, just simplified to two knobs (rl_iterations, rl_blur_size) for batch convenience. Wiener filtering is a classic frequency-domain deconvolution filter that balances sharpening against noise amplification via wiener_noise_variance (0 = auto-estimate).

The inputs and outputs that matter

  • images - required, plural.
  • processing_method - wavelet_denoise (default), nonlocal_means, homomorphic_filter, richardson_lucy, wiener_filter.
  • consistent_parameters (default true) - use the same settings across the whole batch (faster) versus letting the node adapt per image (slower, but better if your batch has varied noise/lighting).
  • The method-specific fields listed above only matter for whichever processing_method you picked; the rest are ignored.
  • memory_efficient (optional, default true) and show_progress (optional, default true) - batch-processing conveniences worth leaving on for large folders.
  • fail_on_error (optional, default false) - stop the whole batch on the first bad image, or skip it and keep going. Default (false) is usually right for a large batch where one corrupt file shouldn't kill the run.
  • Output: processed_images.

How to install it

Search Eric_Image_Processing_Nodes in ComfyUI Manager, or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/Eric_Image_Processing_Nodes
cd Eric_Image_Processing_Nodes
pip install -r requirements.txt

Restart ComfyUI. Every method this node offers is classical signal processing, not a pretrained model, so nothing downloads on first use. The one dependency that actually gates it is PyWavelets - required specifically for wavelet_denoise - which is already part of the pack's core requirements.txt, so a clean install covers it.

Common issues & troubleshooting

Import error mentioning wavelets. PyWavelets is a core requirement, not optional, but if your install skipped it somehow, wavelet_denoise is the method that will fail first - reinstall requirements.txt to fix it.

Wavelet denoise over-smooths or leaves visible blocky artifacts. Try a different wavelet_type (haar is the crudest and most likely to block; db8 or bior2.2 tend to look more natural) and check wavelet_method - BayesShrink is generally the safer statistical default over manual unless you actually know your noise level to set wavelet_sigma correctly.

Non-local means is very slow on a large batch. That's inherent to the algorithm - it searches the whole image for similar patches per pixel, which is expensive. Reduce nlm_patch_size, or switch to wavelet denoising if speed matters more than NLM's edge-preserving quality.

Homomorphic filter result looks flat or unnatural. homo_gamma_h/homo_gamma_l are doing real work here - if the image looks over-flattened, bring homo_gamma_l up closer to 1.0; if lighting unevenness isn't fixed enough, push homo_gamma_h higher.

One bad image stopped the whole batch. Check fail_on_error - it defaults to false (skip and continue) but if you've set it true, a single corrupt or unusually-shaped image in the batch will halt everything. Turn it off for large, less-curated batches.

Richardson-Lucy or Wiener results look grainy at higher settings. Same fundamental trade-off as the dedicated RichardsonLucyGPUNode - both deconvolution methods amplify noise as they sharpen. Back off rl_iterations or raise wiener_noise_variance rather than pushing further.

CategoryEric's Image Processing/Batch

Inputs (17)

NameTypeDefaultDescription
imagesIMAGE
processing_methodCOMBOwavelet_denoiseProcessing method to apply to all images
consistent_parametersBOOLEANtrueUse same parameters for all images (faster) or auto-adapt per image
wavelet_typeoptCOMBOdb8Wavelet type for wavelet denoising
wavelet_methodoptCOMBOBayesShrinkWavelet thresholding method
wavelet_sigmaoptFLOAT0.00–100Wavelet noise level (0 = auto)
nlm_hoptFLOAT0.00–30NLM filtering strength (0 = auto)
nlm_patch_sizeoptINT73–11NLM patch size
homo_d0optFLOAT4010–100Homomorphic cutoff frequency
homo_gamma_hoptFLOAT1.80.5–5Homomorphic high frequency gain
homo_gamma_loptFLOAT0.600.1–1Homomorphic low frequency gain
rl_iterationsoptINT101–50Richardson-Lucy iterations
rl_blur_sizeoptFLOAT2.00.5–10Richardson-Lucy blur size
wiener_noise_varianceoptFLOAT0.0000–1Wiener noise variance (0 = auto)
memory_efficientoptBOOLEANtrueUse memory-efficient processing (slower but uses less RAM)
show_progressoptBOOLEANtrueShow processing progress in console
fail_on_erroroptBOOLEANfalseStop processing on first error, otherwise skip failed images

Outputs (1)

NameTypeDescription
processed_imagesIMAGE