Model Params
Every parameter, its shape, and whether it actually trains
- model
- params_str
CdlModelParams lists every trainable weight in a cdlModel: its name, its shape, and whether it's trainable - plus a running total at the end. If Model Layers is the architecture map and Model Info is the summary, this is the itemized inventory. It's the node for the moment you ask "wait, what is actually being trained here?" and want the receipts.
For someone learning deep learning through this pack, it's quietly one of the most educational nodes in the whole suite. The name tells you where in the network each weight lives (e.g. 2.weight for the second block's conv kernel), the shape tells you its dimensions, and the trainable flag tells you whether an optimizer will touch it. Look at a CdlLeNet through this node and you can hand-count how a CNN's parameters accumulate through the layers - which is a genuinely great way to internalize how conv nets work.
How it works
It walks model.named_parameters(), writing one line per parameter with name: shape=(...) trainable=True/False, then appends the total parameter count. "Trainable" reflects requires_grad, which matters when you're dealing with frozen layers or mixed training setups - a frozen embedding won't show as trainable, and this node is how you'd catch that.
Inputs and output
model- the only input, anycdlModel.
The single output is params_str, a STRING, meant for a text display node. Expect lines like:
0.weight: shape=(6, 1, 5, 5) trainable=True
...
Total parameters: 61,706
Installing ComfyDL
It ships with the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Cynthia-lxx/ComfyDL
pip install -r ComfyDL/requirements.txt
Restart ComfyUI. The only extra dependency is matplotlib; torch comes with ComfyUI. ComfyUI Manager users: search "ComfyDL", and if it's not in the built-in list (the pack isn't published to the official Comfy Registry yet), use Install via Git URL with the repo link.
Common issues
The same Lazy-module timing caveat as the rest of the Model Utils family applies: before a Model Forward pass, Lazy layers haven't materialized shapes, so the parameter list can look incomplete or show placeholder shapes. Run the model once, then inspect. The other thing people misread is the trainable flag - it reports requires_grad, which isn't the same as "this parameter will change this epoch." It's the flag that decides whether an optimizer can update it at all, and for the small textbook nets here nearly everything is trainable by default. If you ever see a long list of trainable=False in a ComfyDL model, something upstream froze weights - and this node is how you'd prove it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model | cdlModel | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| params_str | STRING | — |