ComfyUI Node

SplitVec2

Unpack a 2-value vector into the two floats you actually need

By robertvoy·Created 2 years ago·Updated 9 months ago· 239
SplitVec2
  • a
  • FLOAT
  • FLOAT

ComfyUI has a few node packs that bundle several numbers into one wire as a "vector" - a VEC2 being just two floats glued together. That's tidy for the node that produces them, but annoying for every downstream node that wants the numbers separately. SplitVec2 is the tiny bridge: one VEC2 in, two FLOAT outputs out. Index [0], index [1], done.

Where you'll actually meet it

Inside Flux Continuum, the vector producers are its own sliders. The CannySlider outputs a VEC2 - low and high thresholds for Canny edge detection. And in the shipped workflow, that's exactly what SplitVec2 is for: you'll see its two float outputs feeding the Canny preprocessor's low-threshold and high-threshold inputs. One bundled control from the interface, split into the two real inputs the preprocessor wants.

ControlNet work in general is where this pattern pays off. A strength/start/end trio is the classic ControlNet bundle, and when you're tuning edge-guided generation you want each number independently addressable - which is the VEC3 sibling's job. SplitVec2 handles the two-value case: low/high thresholds, start/end percentages, X/Y offsets, any paired float.

The mechanism is three lines of Python (return a[0], a[1]), so there's nothing to configure beyond the single a input, which defaults to (0.0, 0.0). If a node you're using outputs a VEC2 and you need to inspect or route its parts, this is the cleanest way to get at them.

Install

It's part of the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/robertvoy/ComfyUI-Flux-Continuum

Restart ComfyUI, or install via ComfyUI Manager → search "Flux Continuum". No dependencies to download.

Troubleshooting

  • The output floats are zero when nothing's connected - expected. With no VEC2 on the input, it splits the default (0.0, 0.0).
  • Both outputs look identical - check which output you're reading. FLOAT #1 is the first component, FLOAT #2 the second. Getting them swapped is the classic off-by-one here.
  • A "VEC2" node won't connect - some packs use a differently-named vector type; this node only splits the VEC2 type specifically.

This is a pure utility - no quality impact, no hidden behavior. If you need the two halves of a pair and some node refuses to hand them over separately, this is the screwdriver for the job.

CategoryFlux-Continuum/Utilities

Inputs (1)

NameTypeDefaultDescription
aVEC20,0

Outputs (2)

NameTypeDescription
FLOATFLOAT
FLOATFLOAT