Nodes/Eric_Image_Processing_Nodes/BM3D Profile Comparison
ComfyUI Node

BM3D Profile Comparison

See which BM3D profile actually wins before you commit

By EricRollei·Created 9 months ago·Updated 8 months ago· 9
BM3D Profile Comparison
  • image
  • profile_1
  • profile_2
  • profile_3
  • profile_4
  • comparison_report
stageall
noise_sigma0.000
colorspaceYCbCr
compare_profilesnp,refilter,high,vn

BM3D has been the reference denoiser since 2007, and it still shows up whenever someone wants "the theoretically correct" answer rather than a neural network's guess. The catch is it ships with half a dozen tuning profiles, and the difference between np and refilter on your actual image is not obvious from the names alone. This node exists so you stop guessing: feed it one image, get back up to four denoised versions side by side plus a PSNR/SSIM report telling you which profile actually did the best job.

What BM3D is doing under the hood

Block-matching and 3D filtering groups similar-looking patches from across the whole image into a 3D stack, denoises that stack in a transform domain (wavelet or DCT), then reassembles the result. It's the opposite of a local blur - it borrows detail from every patch in the image that resembles the one it's currently cleaning up, which is why it holds onto fine texture that simpler filters smear away. It's also genuinely CPU-only; block matching does random-access memory lookups that don't map onto a GPU, so don't expect this to be fast. A single comparison run processing four profiles on one image can take real seconds to a minute depending on resolution.

This comparison node runs the same image through whichever profiles you list - np (balanced default), refilter (a second collaborative-filtering pass for extra quality), high (maximum quality, slowest), vn/vn_old (tuned for very noisy input) - and reports PSNR/SSIM for each against an internal noise estimate, so you're not just eyeballing thumbnails.

Inputs and outputs that matter

  • stage - all runs BM3D's full two-stage pipeline (hard-threshold then Wiener refinement); hard or wiener isolates one stage if you want to see what each contributes.
  • compare_profiles - a comma-separated string, default np,refilter,high,vn. Only the first four are used; that's a hard limit baked into the outputs.
  • noise_sigma - leave at 0 to let BM3D auto-estimate the noise level from the image itself, which is what you want unless you already know your sigma.

Outputs are profile_1 through profile_4 (one IMAGE per profile you listed, in order) and comparison_report, a STRING with the PSNR/SSIM numbers and a one-line description of each profile's character. Wire the report into a text preview node if you want to actually read it rather than guess from the thumbnails.

Installing it

Through ComfyUI Manager, search Eric's Image Processing Nodes (or the repo name, Eric_Image_Processing_Nodes) and install. By hand:

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. Here's the part requirements.txt doesn't tell you: the BM3D-specific nodes (this one plus BM3D Denoising and BM3D Deblurring) import the standalone bm3d PyPI package directly, and it isn't listed anywhere in the pack's requirements file. If the node fails to appear, or you see console warnings about "BM3D components not available," run pip install bm3d in ComfyUI's own Python environment and restart. No model weights are involved - BM3D is a pure algorithm, nothing to download.

Where people get burned

Two real ones. First, the missing bm3d package above - it's the single most likely reason this node silently does nothing on a fresh install. Second, the refilter profile calls into BM4D internally for its second pass, and on newer NumPy installs that code path can crash with a shape-broadcast error rather than returning a (possibly worse) result - it's an internal bug in BM4D's residual-correlation step, not something this node can catch and recover from. If compare_profiles includes refilter and one of your four output slots comes back as your original unprocessed image with an error line in the report, drop refilter from the list and compare np, high, and vn instead - you'll still get a useful answer, just from three profiles rather than four.

Once you know which profile wins for your kind of noise, skip this comparison node for production and go straight to the plain BM3D Denoising node with that profile locked in - this one's a decision tool, not something you want in a batch pipeline given how slow four CPU passes get.

CategoryEric's Image Processing/BM3D

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
stageCOMBOall3 options: all, hard, wiener
noise_sigmaoptFLOAT0.0000–1
colorspaceoptCOMBOYCbCr2 options: YCbCr, opp
compare_profilesoptSTRINGnp,refilter,high,vnComma-separated list of profiles to compare

Outputs (5)

NameTypeDescription
profile_1IMAGE
profile_2IMAGE
profile_3IMAGE
profile_4IMAGE
comparison_reportSTRING