ComfyUI Node

BM3D Denoising

The pre-deep-learning denoiser that still holds up

By EricRollei·Created 9 months ago·Updated 8 months ago· 9
BM3D Denoising
  • image
  • denoised_image
  • processing_info
profilenp
stageall
noise_sigma0.000
colorspaceYCbCr
auto_estimatetrue

If you want a denoiser that doesn't rely on a pretrained neural network at all - no download, no risk of a training-data mismatch with your image type, just a well-understood classical algorithm - BM3D is still the reference answer almost twenty years after it was published. This is the plain denoising node; BM3DDeblurNode elsewhere in the pack adds a deconvolution step on top of the same machinery.

How it works

BM3D - Block-Matching and 3D filtering - works in two stages, and this node exposes both. Stage one, "hard thresholding," finds groups of similar-looking patches scattered across the image, stacks them into a 3D block, transforms that block (typically a wavelet or DCT-style transform), zeroes out the small coefficients that are probably noise, and transforms back to get a first-pass denoised estimate. Stage two, Wiener filtering, uses that first-pass estimate as a reference to build a more informed filter and runs the same block-matching-and-filtering process again, refining the result. Grouping similar patches together is the key idea: real image structure repeats across a patch neighborhood, noise doesn't, so filtering patches as a group averages out the noise while reinforcing the signal.

The inputs and outputs that matter

  • image - required.
  • profile (default np) - np (normal, balanced), refilter (a more careful second pass, better quality), vn/vn_old (tuned for genuinely noisy input), high (maximum quality, slowest), deb (debug). These are the actual named presets from the reference BM3D implementation.
  • stage (default all) - all runs both stages (hard thresholding then Wiener, the recommended full pipeline), hard stops after stage one, wiener focuses on the Wiener-filtering stage. Leave this on all unless you have a specific reason not to - running only hard skips the refinement pass that gives BM3D its reputation for quality.
  • noise_sigma (optional, 0–1, default 0, meaning auto-estimate) - set manually if you know the actual noise level.
  • colorspace (optional, default YCbCr) - YCbCr (separates luminance from color, the standard choice) or opp (an opponent color-space transform). Both are real options in BM3D's own reference implementation for handling RGB images; YCbCr is the safer default.
  • auto_estimate (optional, default true) - auto-detects noise level rather than requiring noise_sigma set manually.
  • Outputs: denoised_image and processing_info.

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. No pretrained weights - BM3D is pure algorithm, nothing to download. As with BM3DDeblurNode, if this specific node fails to import while the rest of the pack loads fine, that's usually a missing compiled BM3D wheel for your platform, a known friction point for Python BM3D packages generally rather than something specific to this pack.

Common issues & troubleshooting

Import error isolated to this node. BM3D implementations often ship as compiled extensions. If requirements.txt installed cleanly but this node still won't load, check for a platform-specific BM3D wheel issue before assuming the pack is broken.

Result looks over-smoothed, real texture disappearing. Drop profile from high/vn down to np, and double check noise_sigma isn't overestimating the actual noise level if you set it manually.

Not enough noise removed. The opposite problem - try high or refilter instead of np, or verify auto_estimate is actually reading the noise level correctly by comparing against a manual noise_sigma guess.

Wondering if stage: hard alone is enough. It's faster, but you're giving up the Wiener refinement pass, which is a meaningful chunk of BM3D's quality advantage. Use hard only when you specifically need speed over quality; all is the right default otherwise.

CategoryEric's Image Processing/BM3D

Inputs (6)

NameTypeDefaultDescription
imageIMAGE
profileCOMBOnpBM3D Profile: • np: Normal Profile (balanced) • refilter: Enhanced quality • vn: Very noisy images • high: Maximum quality • deb: Debug mode
stageCOMBOallProcessing stage: • all: Complete BM3D (recommended) • hard: Hard thresholding only • wiener: Wiener filtering focus
noise_sigmaoptFLOAT0.0000–1Noise standard deviation (0 = auto-estimate)
colorspaceoptCOMBOYCbCrColor space for RGB processing: • YCbCr: Standard luminance/chrominance • opp: Opponent color space
auto_estimateoptBOOLEANtrueAutomatically estimate noise level

Outputs (2)

NameTypeDescription
denoised_imageIMAGE
processing_infoSTRING