Nodes/ComfyUI-3D-MeshTool/Tensor to List
ComfyUI Node

Tensor to List

The bridge from torch tensors to this pack's array nodes

By 807502278·Created 2 years ago·Updated 2 years ago· 23
Tensor to List
  • Tensor
  • array

This whole 3D pack runs on two kinds of numbers: torch Tensors and plain Python LISTs. They don't mix on their own - a tensor is a GPU-backed, typed array, while the pack's array1 nodes (transpose, append, convert, select element) all expect LIST. Tensor to List is the one-node bridge between the two. Feed it a tensor, get back the same data as a regular list you can run through every array operation in the pack.

Under the hood there is zero magic: it calls Tensor.tolist(), which recursively turns a torch tensor into nested Python lists (and scalars into plain numbers). A (3,) tensor becomes [a, b, c]; a (2, 3) tensor becomes [[a, b, c], [d, e, f]]. That's the whole mechanism, and it's why this node is trustworthy - no rescaling, no dtype surprises, just the tensor's raw values in list form.

The single input is Tensor, and the single output is array. If the tensor is small enough to be sensible, you can even read the values straight off the node's output in the UI and verify what you're about to process - which makes this a handy debugging step before you hand data to a camera-pose or batch-generation chain.

Where you'll actually use it: any time a mesh or 3D node returns data as a tensor - camera rotations, translations, per-frame values - and you want to run this pack's list utilities on it, or feed a downstream node that only accepts LIST. It pairs naturally with List to Tensor (same pack) for the round trip.

Fair warning about the pack's general health: 807502278/ComfyUI-3D-MeshTool is a one-developer project that openly borrows conventions from ComfyUI-3D-Pack, and the author has renamed nodes between releases - old ones turn red and need recreating. Installation is standard:

cd ComfyUI/custom_nodes
git clone https://github.com/807502278/ComfyUI-3D-MeshTool
cd ComfyUI-3D-MeshTool
pip install -r requirements.txt   # kiui, xatlas, pyfqmr, plyfile

Or use ComfyUI Manager: search "ComfyUI-3D-MeshTool", install, restart. No model files are involved in the conversion nodes, so there's nothing to download. If a workflow using this node won't load, the usual culprit is a missing dependency or the 3D-Pack types - check the console for what ComfyUI actually failed to find.

Category3D_MeshTool/Convert

Inputs (1)

NameTypeDefaultDescription
TensorTensor

Outputs (1)

NameTypeDescription
arrayLIST