NNT Show Model Info
A spec sheet for the compiled model, dropped right into your graph
- MODEL
- model
- model_info
The difference between "Show Layer Stack" and "Show Model Info" is the difference between reading a recipe and weighing the finished cake. The layer stack node reports what you asked for; this one reports what the compiler built. NNT Show Model Info takes your compiled MODEL, walks its actual nn.Module structure, and hands back a spec sheet: every layer, its shape, its parameter counts, and - if you want - the memory footprint and even the weight values.
The neat part is that it's a pass-through. The model output echoes the input model unchanged, so you can drop this node inline in a chain of nodes without interrupting the data flow. Stick it between your compile node and your training node, run the graph once, read the report, then forget it's there.
What it tells you
Two inputs matter: show_details (Basic or Detailed) and include_weights (True/False).
- Basic - a compact layer-by-layer breakdown. For each
LinearorConvlayer you get its in/out features or channels, and the activation name. Good for a quick "does the architecture look right" glance. - Detailed - digs into each module: bias flags, activation specifics (like
negative_slopeon LeakyReLU orinplace), normalization parameters (eps,momentum,affine,track_running_stats). It uses a memory formatter that converts byte counts to human units, so you also get a sense of model size. - include_weights=True - this is the "show your work" option. It dumps actual weight tensors (their shapes and values) into the report. Great for teaching what initialization actually produced; brutal on your console for a big model. Don't turn it on for something with millions of parameters unless you enjoy scrolling.
Outputs are model (pass-through) and model_info (the string report, ready for a text display node).
Where it fits
This is the node you reach for after NntCompileModel to verify the compile actually did what you think. If your training loss does nothing useful, the first suspect is that the network is not shaped the way you believe - and this node settles it in one run. It's also the natural companion to NntShowLayerStack: stack report says "I asked for stride 2", model info says "here's what compile delivered". When they disagree, compile wins.
For the CIFAR10 and MNIST example workflows in the pack's workflows/ folder, dropping a Show Model Info between compile and train is a great way to see how the conv blocks and dense head actually come together before you spend a training run finding out.
Install
It ships with the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/inventorado/ComfyUI_NNT.git
cd ComfyUI_NNT
pip install -r requirements.txt
Restart ComfyUI afterward, or install through Manager by searching "ComfyUI Neural Network Toolkit NNT". Yes, the requirements list is long - torch, sklearn, matplotlib, transformers, statsmodels, onnx, pinned shap 0.41.0 and more - and yes, the first install feels like it's never going to end. It does.
One thing worth knowing: like the rest of the NNT pack, this is a learning tool, and the README says so. The report is text - it tells you what's there, it doesn't graph it. If you want the pretty picture, that's NntVisualizeGraph's job. This node is for reading, not admiring.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| MODEL | MODEL | — | |
| show_details | COMBO | Basic | 2 options: Basic, Detailed |
| include_weights | COMBO | False | 2 options: True, False |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| model_info | STRING | — |