Nodes/ComfyUI-Keyframed/3x Entangled Curves [0,1] (Frequency)
ComfyUI Node

3x Entangled Curves [0,1] (Frequency)

Three prompts, one always leading

By dmarx·Created 3 years ago·Updated 2 years ago· 92
3x Entangled Curves [0,1] (Frequency)
    • KEYFRAMED_CURVE
    • KEYFRAMED_CURVE
    • KEYFRAMED_CURVE
    frequency0.08

    Three prompts is where prompt scheduling starts to hurt with notation. Writing [a:b:c]-style strings with correct timing for three-way transitions is a debugging session waiting to happen. This node sidesteps the whole thing: it emits three sine curves, equally phase-shifted, that sum to exactly ~1 at every moment. Each prompt keeps its own curve, and they take turns being the strongest voice while the other two hold the background.

    It's the 3x member of the "Entangled Curves" family in dmarx's ComfyUI-Keyframed pack, driven by frequency. Same DNA as the 2x version, but with three curves the behavior gets more interesting: no prompt ever fully disappears, and no prompt dominates for long. It's the smallest count that still gives you that "superposition" feel rather than a simple A/B crossfade.

    How it works

    The node builds three SinusoidalCurves with phases spread evenly around the circle (a third of a turn apart) and an amplitude of 1/3 per curve, each raised slightly off zero so nothing fully zeroes out - the README flags that fully zeroed conditions create "sharp edges" in the traversal. Because the phases are balanced, the three sine terms cancel and the curves always sum to ~1. Individually each swings between ~0 and ~2/3, so a single prompt peaks at two-thirds strength while the other two split the remaining third between them. It's a triangle with rotating vertices, not a binary switch.

    One input, frequency (FLOAT, default 1/12 - a full cycle every 12 frames, stepped at 0.01). Three KEYFRAMED_CURVE outputs, one per prompt.

    Wiring it up

    Standard superposition wiring: each curve output into its own Apply Curve To Conditioning node paired with its prompt's conditioning, then KfConditioningAdd (the "Add Conditions" node) to merge, then into the sampler. With AnimateDiff you get per-frame blends where the lead prompt cycles.

    Installing it

    Ships in ComfyUI-Keyframed. ComfyUI Manager: search "ComfyUI-Keyframed". Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/dmarx/ComfyUI-Keyframed
    

    Restart ComfyUI after. No models; the only dependency is the keyframed library, auto-installed on first startup - the first load can hang on pip, and if that fails, pip install keyframed by hand. It sits under keyframedentangled [0-1]. Three prompts is the sweet spot where this approach stops being overkill and starts being the obvious answer.

    Categorykeyframed/entangled [0-1]

    Inputs (1)

    NameTypeDefaultDescription
    frequencyFLOAT0.08

    Outputs (3)

    NameTypeDescription
    KEYFRAMED_CURVEKEYFRAMED_CURVE
    KEYFRAMED_CURVEKEYFRAMED_CURVE
    KEYFRAMED_CURVEKEYFRAMED_CURVE