2x Entangled Curves [0,1] (Wavelength)
The two-curve crossfade, in frames per cycle
- KEYFRAMED_CURVE
- KEYFRAMED_CURVE
The simplest entangled node there is: two sine curves, half a cycle apart, that always add up to ~1. Wire each one to a prompt's conditioning and you get a clean crossfade where prompt A fades up exactly as prompt B fades down - no keyframe notation, no [a:b] syntax, no weight drift. It's the entire "prompt superposition" idea in its most legible, two-party form.
This is the 2x member of the "Entangled Curves" family in dmarx's ComfyUI-Keyframed pack, and it's parameterized by wavelength - you think in frames per cycle instead of cycles per frame. Set wavelength to 24 and one full A→B→A exchange takes 24 frames. Same curve family, same default tempo (wavelength 12 = frequency 1/12), just a different way of thinking about the dial.
How it works
The node builds two SinusoidalCurves with phases a half-turn apart, each with amplitude 1/2 plus a small floor so it never fully zeroes - the README notes that fully zeroed conditions create "sharp edges" in the traversal. Because the phases are balanced, the two curves always sum to ~1. Individually each swings between ~0 and ~1, so at its peak a prompt is at full strength, and everywhere else you get an honest weighted mix of both. It's the family's only member where a single prompt can hit full volume.
One input, wavelength (FLOAT, default 12, stepped at 0.5). Two KEYFRAMED_CURVE outputs.
Wiring it up
Each curve output into its own Apply Curve To Conditioning node with its prompt's conditioning, merge with KfConditioningAdd, then into the sampler for AnimateDiff. Each frame gets a different two-prompt blend.
Installing it
Part of ComfyUI-Keyframed. ComfyUI Manager: search "ComfyUI-Keyframed". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/dmarx/ComfyUI-Keyframed
Restart ComfyUI. No model downloads; the only dependency is the keyframed library, auto-installed on first startup (first load can pause on pip; pip install keyframed if it fails). It sits under keyframed → entangled [0-1]. If you think in "how many frames does the cycle take," this is your crossfade - and its frequency-driven twin is waiting if you'd rather dial in beats-per-cycle instead.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| wavelength | FLOAT | 12.0 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| KEYFRAMED_CURVE | KEYFRAMED_CURVE | — |
| KEYFRAMED_CURVE | KEYFRAMED_CURVE | — |