Pt Show Size
See the shape of a tensor without printing to the console
- size
- STRING
Pt Show Size answers one question: "what shape is this tensor, actually?" It's a debugging node, pure and simple. You're building a ComfyUI-Pt-Wrapper training graph, you've chained a reshape into a squeeze into a stack, and the next node is complaining about dimensions. Instead of squinting at error messages or hunting through your terminal output, you drop this node on the end of the chain and it shows you the size right in the UI. Half of debugging tensor workflows is knowing what shape things are at each step; this node makes that visible.
What it actually does
It takes a PTSIZE - that's the custom type produced by Pt Size (which extracts a tensor's shape) or Pt Size Create (which builds one from scratch) - and displays it as text. Under the hood it's borrowed from pythongosssss's well-known show_text node in ComfyUI-Custom-Scripts, and the pack credits that properly. It's an output node: it doesn't pass the size forward to anything, it just displays it in the ComfyUI UI and returns it as a STRING (marked as a list output) if you want to capture it.
There's exactly one input:
- size - a
PTSIZE, fed from Pt Size or Pt Size Create.
The result shows up as the node's displayed text, e.g. torch.Size([2, 3, 96, 32]). Wire Pt Size's output into this and you get a live readout of whatever tensor is feeding Pt Size. Change anything upstream and the display updates on the next run.
How to install it
Part of the ComfyUI-Pt-Wrapper pack, so one install gets it plus the ~200 other nodes. ComfyUI Manager: search ComfyUI-Pt-Wrapper, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/HowToSD/ComfyUI-Pt-Wrapper
Restart after. The pack's requirements.txt is heavy (transformers, datasets, accelerate, peft, gensim, sentencepiece, pandas, scikit-learn, scipy) - expected for a training pack, but the first install is slow and can collide with other nodes' pinned transformers versions.
Gotchas
The main thing to remember is that this is a terminal node. Its output is the display itself; it doesn't hand a PTSIZE forward for more processing. If you want to show the size and keep using it, branch the wire - put Pt Show Size on one fork and your downstream nodes on another. And if you feed it a PTSIZE and see nothing, double-check that something's actually producing that size upstream; the node has no other inputs, so a missing wire means an empty display.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| size | PTSIZE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |