SNR Model Analyzer
Check a model's limits before you shrink it
- report
SNR Model Analyzer is the "before" to SNR Quant's "after". The pack's quantizer shrinks a model and never really explains why it cut the layers it did; this node is the diagnostic half - it loads the same diffusion_models safetensors file, runs the same per-layer SNR and outlier analysis, and hands you a text report saying how much quantization this specific model can take and roughly where it'll land.
It answers the question pre-quantized downloads never let you ask: is my weights file, at my target size, actually safe to shrink?
What you get
One input, one output:
- model_name - pick a
.safetensorsmodel fromComfyUI/models/diffusion_models - report - a STRING output you wire into any text display or preview node
The report is the whole product. It gives you the model's fragility (fragile / moderate / robust), the SNR distribution (min, max, median, plus a breakdown of excellent vs poor layers), an outlier risk breakdown, a safety analysis counting layers that are safe to quantize versus high-risk, current size versus minimum achievable, and - the actually useful bit - three concrete recommendations:
- Conservative target - only clearly safe layers as FP8, "near-lossless", for production work
- Balanced - safe layers plus some moderate-risk ones, "minimal degradation", the general-use pick
- Aggressive - everything except high-risk layers, for VRAM-constrained setups
Those numbers drop straight into SNR Quant's target_size_GB field. Run the analyzer first, take the balanced number, feed it to the quantizer. That's the intended loop, and it beats guessing at a target and re-running the quantizer until one sticks.
How it works
Same engine as the quantizer. For every 2D weight layer it simulates an FP8 round-trip (encode to float8_e4m3fn, decode back) and measures signal-to-noise in dB, plus an outlier index (max abs weight over std). Layers already in FP8 are skipped from the analysis. It buckets layers by SNR and outlier risk, then prices out what each strategy would save. It doesn't write any files - this is read-only, a dry run that shares the exact code path the quantizer uses, minus the actual casting.
When to run it
- Before your first quantize of a big Wan or Flux file, to get a recommended target instead of inventing one.
- To check whether a model is already fully quantized. The report will say "no quantizable layers - already fully quantized," which saves you from re-processing a file someone else already shrank.
- To settle the "how small can I go" argument with yourself. The aggressive number is the honest answer; the conservative one is what you actually ship.
Install and gotchas
It ships in the same pack as SNR Quant, so install is identical - clone ComfyUI-SNR-quant into custom_nodes and restart, or look it up in Manager. No model downloads, no heavy deps beyond a torch that supports FP8.
- It loads the whole model into system RAM to analyze it (CPU-only, no VRAM). A 50GB file means 50GB+ free, and it isn't instant.
- It only reads
.safetensors; a.ckptwill fail at load. - The report is a STRING output, not a file. Route it to a text node to actually see it - there's no CSV and nothing written to
output/from this node. It's a look-before-you-leap tool, not a printer.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | Model from ComfyUI/models/diffusion_models |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| report | STRING | — |