Analyze Noise Pattern (Debug)
Is your extracted noise even any good? This debug node tells you
- noise_pattern
- pattern
- stats
NoisePatternVisualizer is the debug node of the fuselayer noise-match pack, and it does exactly one job: tell you whether the noise pattern you extracted is worth applying. It changes nothing - no blending, no cropping, no magic. It's a meter you hold up to your grain before you commit to it.
And you do want to check, because every node in this pipeline is downstream of one number: the pattern's mean. The whole scheme assumes a noise pattern centered at 0.5 (50% gray). Gray means "no change," and the deviations from gray are the grain. If your pattern's mean has drifted off 0.5, ApplyNoisePattern won't just add grain - it'll shift the brightness or color of everything it touches. This node catches that before you ruin a composite.
What it does
One input, two outputs:
noise_pattern(IMAGE) - feed it whateverRealNoiseExtractorproduced, or thenoise_samplecrop if you want to eyeball the raw material.pattern(IMAGE) - a passthrough of the input, so you can preview it while also reading stats.stats(STRING) - the report: size, channel count, mean, standard deviation, min/max, per-channel means, and a center offset.
The verdict logic is in the code, so it's not a black box. If center_offset < 0.01 and std > 0.001, it prints "Ready to apply". Otherwise: "Check extraction settings." A ⚠ WARNING: Not centered! flag means your mean drifted - head back to the extractor.
How to read the numbers
- Mean ≈ 0.5 is the whole ballgame. Off by more than ~0.01 and the apply node will tint or brighten your cutout.
- Std dev tells you the grain's punch. Tiny std and your "noise" is basically flat gray - raise
contrast_boostor lowerhigh_pass_radiusinRealNoiseExtractor. - Channel means matter if you extracted with
preserve_coloron. If the R channel mean sits well off 0.5, your pattern carries a color cast from the wall you sampled - either fix the extraction or use grayscale.
Install
Same pack as everything else - fuselayer/comfyui-noise-match, installed via ComfyUI Manager ("comfyui-noise-match") or:
cd ComfyUI/custom_nodes
git clone https://github.com/fuselayer/comfyui-noise-match
Restart, and it's under image/noise as "Analyze Noise Pattern (Debug)". No models, no heavy deps beyond the pack's usual numpy/scipy/opencv.
Where it sits
It's an output node, so it terminates a wire instead of passing data on. Slip it between RealNoiseExtractor and ApplyNoisePattern to verify the pattern before it touches your composite - that's the whole intended usage, and it saves you the "why is my result gray/washed out" debugging session that everyone else has once.
One honest note: it's a debugging aid, not a quality guarantee. A pattern can pass these checks and still be wrong for your particular composite - too coarse, sampled from the wrong image. But it catches the two failure modes that waste the most time, and the stats string is exactly the thing to paste when you ask for help in a community. That alone earns it a permanent spot in the chain.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| noise_pattern | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| pattern | IMAGE | — |
| stats | STRING | — |