Nodes/ComfyUI-3D-MeshTool/array1 convert
ComfyUI Node

array1 convert

Three list conversions in one pass

By 807502278·Created 2 years ago·Updated 2 years ago· 23
array1 convert
  • array_input
  • array_int
  • array_abs
  • array_str

Every workflow eventually hands you a list of floats when the downstream node wants ints, or a list with negative values when everything has to be positive. array1 convert is the pack's one-stop shop for the three conversions that keep coming up: to integers, to absolute values, and to a string. One input, three outputs, no extra nodes.

The input is array_input (a LIST). The outputs:

  • array_int - every element cast to an integer (astype(int) under the hood). Note this truncates; 2.7 becomes 2, not 3. If you need rounding, do it before this node.
  • array_abs - every element turned into its absolute value, so negatives flip positive. The classic fix for a batch that can't handle negative radii or coordinates.
  • array_str - the whole list rendered as a string, e.g. [1, 2, 3.5] as text. Wire this into a text display or logging node and you can read the list's contents right in the UI.

That last output is the quiet gem. A lot of "why is this batch wrong?" debugging in ComfyUI comes down to not being able to see your data. The array_str output gives you a way to surface a list's contents on screen without digging through the console - a poor-man's inspector for list data.

Because everything routes through numpy, it handles nested 2D lists fine - ints, abs, and string all apply element-wise, so a pose array converts cleanly in all three directions.

Where you'll use it: cleaning up generated sequences before they hit nodes with type opinions. Camera arrays that must be positive, index lists that must be ints, and "let me just see what's in here" - that's the trio this covers. It's a plumbing node, but plumbing is what keeps a graph from leaking.

This is part of 807502278/ComfyUI-3D-MeshTool, a one-author 3D utility pack. Pure Python, no models. Install via ComfyUI Manager (search "ComfyUI-3D-MeshTool") and restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/807502278/ComfyUI-3D-MeshTool
cd ComfyUI-3D-MeshTool
pip install -r requirements.txt

Pack habits to expect: node renames go red on old workflows (recreate and reconnect), and remember array_int truncates rather than rounds - that's the one surprise that'll bite a careful workflow.

Category3D_MeshTool/Array/list_edit

Inputs (1)

NameTypeDefaultDescription
array_inputLIST

Outputs (3)

NameTypeDescription
array_intLIST
array_absLIST
array_strSTRING