2x Entangled Curves [0,1] (Frequency)
A two-prompt crossfade that always sums to one
- KEYFRAMED_CURVE
- KEYFRAMED_CURVE
If you've ever tried to animate between two prompts in AnimateDiff, you know the classic trick: keyframe a hard switch, or manually write a crossfade and pray the conditioning weights add up. This node is the cleaner version. It hands you two sine curves that are entangled - phase-shifted so that at any moment they sum to 1 - which means one prompt fades up exactly as the other fades down. No arithmetic, no guessing, no weights that drift.
This is the 2x member of the "Entangled Curves" family in dmarx's ComfyUI-Keyframed pack, parameterized by frequency. The whole family exists for what the README calls prompt superposition: instead of one prompt at a time, all of them stay active and their relative strengths oscillate through the animation. With only two curves, that's a straight crossfade - the mildest, most predictable flavor of entanglement.
How it works
Each output is a SinusoidalCurve. The pack takes your frequency, builds N curves with phase offsets evenly spaced around the circle (for N=2, that's a half-turn apart), and gives each an amplitude of 1/N with a tiny floor so it never fully zeroes out - the README notes that completely zeroing a conditioning creates "sharp edges" in the traversal. Because the phases are balanced, the two curves always sum to ~1. Individually each one swings between ~0 and ~1 (2/N with N=2), so at the peaks your prompt is at full strength, and between peaks you get an honest weighted blend.
The only input is frequency (a FLOAT, default 1/12 - one full cycle every 12 frames, stepped at 0.01). The two KEYFRAMED_CURVE outputs are your per-prompt weights.
Wiring it up
Each output curve goes into its own Apply Curve To Conditioning node - curve A with prompt A's conditioning, curve B with prompt B's - then combine the two conditionings and feed the result to your sampler. With AnimateDiff, each frame then gets a different blend of the two prompts.
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 (give the first load a minute). The node lives under keyframed → entangled [0-1]. If you've got exactly two moods to oscillate between, this is the one to grab - every other member of the family just adds more participants to the same dance.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| frequency | FLOAT | 0.08 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| KEYFRAMED_CURVE | KEYFRAMED_CURVE | — |
| KEYFRAMED_CURVE | KEYFRAMED_CURVE | — |