ComfyUI Node Runs on cloud

Tuple to floats

Unpack a pair back into two separate values

By Derfuu·Created 3 years ago·Updated 2 years ago· 455
Tuple to floats
  • Tuple
  • FLOAT
  • FLOAT

The mirror image of Tuple: instead of bundling two numbers together, this one breaks a Derfuu TUPLE back apart. Feed it a (A, B) pair, and it hands you back A and B as two separate FLOAT outputs. You reach for it whenever something downstream doesn't understand Derfuu's TUPLE type and just wants plain float sockets - which is most of ComfyUI, since TUPLE is specific to this pack.

How it works

It reads the two values out of the tuple and exposes each as its own output, in the same order they went in. No math happens here - it's pure unpacking, the inverse operation of Tuple.

The inputs and outputs that matter

  • Tuple (TUPLE) - the pair to unpack.
  • Two outputs, both FLOAT - the first and second component of the tuple, in order. The pack labels both simply FLOAT, so which socket is which is positional: first output is the first value you packed in, second output is the second.

Where it fits

Two typical situations. First, you did some math on a tuple (with Tuple multiply, say) and now need the individual numbers to feed into separate native ComfyUI widgets that don't know what a TUPLE is - a width field here, a height field there. Second, debugging: unpacking to floats and running each through Float debug print gives you a labeled, per-component view that Tuple debug print doesn't quite give you at a glance. If the values need to end up as whole numbers rather than floats - pixel offsets, latent dimensions - use Tuple to ints instead, which does the same unpacking but casts each component to INT on the way out.

How to install it

ComfyUI Manager: search Derfuu_ComfyUI_ModdedNodes, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/Derfuu/Derfuu_ComfyUI_ModdedNodes

then restart. No dependencies, no models - plain Python.

Common issues & troubleshooting

Values came out in the wrong socket. Order is positional - the first FLOAT output is whatever was packed first (Value_A, typically your width or x). If a downstream node is getting height where it expects width, you've likely got the two outputs crossed, not a bug in the node.

Downstream node wants an integer, not a float. This node always outputs FLOAT, even if the tuple started as whole numbers. Use Tuple to ints instead if the consumer needs INT - most native size and offset widgets in ComfyUI do.

Node missing after a pack update. Derfuu's tuple family has a documented history of being renamed or removed between versions without a kept legacy copy - a long-time user reported this specifically happening to the tuple nodes and said they stopped using the pack over it. If this node loads red in an old workflow, check the current repo for a renamed equivalent before assuming your install is broken. A ModuleNotFoundError about Derfuu_ComfyUI_ModdedNodes_legacy means a duplicated folder; keep exactly one, named Derfuu_ComfyUI_ModdedNodes.

CategoryDerfuu_Nodes/Tuples

Inputs (1)

NameTypeDefaultDescription
TupleTUPLE

Outputs (2)

NameTypeDescription
FLOATFLOAT
FLOATFLOAT