Tuple
Bundle two floats into one wire
- TUPLE
This one only makes sense once you know Derfuu invented its own data type for this. A TUPLE is just two numbers bundled together - almost always a (width, height) pair, an (x, y) position, or a size/offset combo - and a whole sub-family of nodes in Derfuu_ComfyUI_ModdedNodes takes that bundle as a single input instead of two separate sockets. Tuple is the node that builds one from scratch: two floats in, one TUPLE out, with an optional rounding step. It's the foundation the rest of the tuple nodes (Tuple multiply, Tuple swap, Tuple to floats, Tuple to ints, and the tuple-aware LatentComposite with tuples) are built to consume.
How it works
You give it two float values and it packs them into the pack's TUPLE type in order - Value_A first, Value_B second - with an optional rounding pass applied before packing. Whatever downstream node consumes the tuple decides what the two slots mean: for a size tuple that's (width, height), for an offset it's (x, y).
There's also a companion Int to tuple node elsewhere in this pack that does the same job starting from two integers instead of floats - reach for that one if your source values are already ints and you don't need the rounding step.
The inputs and outputs that matter
- Value_A (FLOAT, default 1) - the first number in the pair.
- Value_B (FLOAT, default 1) - the second.
- round_ - one of
No,Yes,Ceil,Floor.Nopacks the raw floats as-is.Yesrounds each to the nearest whole number (while staying a float).CeilandFloorround up or down respectively - handy when you're about to feed the tuple into something that expects clean latent or pixel coordinates and don't want to round twice further down the chain. - Output: TUPLE - the bundled pair, fed into a Derfuu tuple-consuming node.
Where it fits
Derfuu's tuple nodes are a small self-contained sub-language for driving positions and sizes off computed numbers instead of hand-typed widgets. Compute a width and height with the math nodes, pack them here into a tuple, and one driver value can determine an entire region or paste position - change the base number and everything downstream recalculates. Without tuples, you'd be wiring two separate float sockets everywhere and keeping them in sync by hand across the whole graph.
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
A downstream node won't accept your tuple. TUPLE is a Derfuu-specific type. Only Derfuu's own tuple-consuming nodes understand it - you can't wire it into a native ComfyUI node expecting separate width/height widgets. If you need those, use Tuple to floats or Tuple to ints to unpack it first.
Values landed in the wrong slot. Order matters - Value_A is the first element, Value_B the second. If a region or a paste position comes out sideways, you've likely got width and height (or x and y) swapped.
The node vanished after an update. Worth flagging specifically: Derfuu's tuple nodes have a documented history of being deleted between versions - one long-time user reported exactly this happening and said they stopped using the pack over it. If a downloaded workflow's Tuple node loads red, the installed version may not include it under that name. Reinstall from the current repo; a ModuleNotFoundError about Derfuu_ComfyUI_ModdedNodes_legacy means a duplicated folder, so keep exactly one, named Derfuu_ComfyUI_ModdedNodes.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| Value_A | FLOAT | 1.00 | — |
| Value_B | FLOAT | 1.00 | — |
| round_ | COMBO | 4 options: No, Yes, Ceil, Floor |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| TUPLE | TUPLE | — |