Pt Full
Conjure a constant tensor out of thin air
- TENSOR
Pt Full is the node you use when a workflow needs a tensor that didn't come from anywhere - no image, no latent, no model. Give it a shape and a fill value and it hands back a tensor where every element is that value. In the Pt-Wrapper ecosystem this is the "conjure a tensor from nothing" primitive, the same role torch.full plays in a Python script. You'll reach for it when you want a constant to add to another tensor, a baseline to compare against, an initial value to feed into a training pipeline, or a mask filled with ones to test something in isolation.
How it works
Under the hood it's a thin wrapper around torch.full. You type the size as a Python-style list - [2, 3, 96, 32] for a 4D tensor - and the node parses it with ast.literal_eval, turns it into a torch.Size, and fills it. The value you type gets cast to match the data_type you picked, so a "7" becomes 7.0 for float dtypes, 7 for integer dtypes, and for bool it accepts true/1 (case-insensitive) as True.
The inputs that matter
Only three required inputs, and honestly two of them are where people get tripped up:
- value - a string, not a number widget. Type the constant you want, e.g.
7or0.5. Mind the quotes; it's parsed as text. - size - a multiline string containing a Python list, like
[2, 3, 96, 32]. This is the shape of the output tensor. - data_type - a dropdown with ten choices: float32, float16, bfloat16, float64, uint8, int8, int16, int32, int64, bool. Pick the one your downstream nodes expect; mixups here are the most common way to break a graph.
The single output is TENSOR, ready to wire into any other Pt-* tensor node or into the training pipeline.
Installing the pack
Pt Full ships in the HowToSD/ComfyUI-Pt-Wrapper pack (~200 PyTorch nodes, a spin-off of the author's ComfyUI-Data-Analysis). Install it via ComfyUI Manager by searching "ComfyUI-Pt-Wrapper", or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/HowToSD/ComfyUI-Pt-Wrapper
Restart ComfyUI after installing. Dependencies come from the pack's requirements.txt (torch is expected already; it pulls in transformers, datasets, peft, gensim, scikit-learn and friends), so the first Manager install can take a minute. No model files are needed just to run tensor nodes like this one.
Common issues
- "ValueError: malformed node or string" - the
sizefield isn't valid Python syntax. It must be a real list, brackets and all:[2, 3], not2, 3. - Wrong dtype downstream - if you build a float tensor and later
Pt To Imageor a model expects uint8, you'll get silent scaling weirdness. Setdata_typedeliberately. - Shape mismatch on add/sub - the classic. A
[2, 3]full tensor won't broadcast against a[2, 4]tensor unless the shapes are compatible, and you'll see the torch broadcast error. Start from the shape of the tensor you're combining it with.
One caveat about this whole pack: it's a niche, single-author teaching tool with basically zero community footprint - search r/comfyui and you'll find almost nothing about it. That's fine, it's a learning instrument, not a diffusion pack. Just don't expect Stack Overflow to save you; the node docs and the author's example workflows are your real support.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| value | STRING | — | |
| size | STRING | — | |
| data_type | COMBO | 10 options: float32, float16, bfloat16, float64, uint8, int8, +4 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| TENSOR | TENSOR | — |