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

4x Entangled Curves [0,1] (Wavelength)

Four prompts, one wavelength, no math

By dmarx·Created 3 years ago·Updated 2 years ago· 92
4x Entangled Curves [0,1] (Wavelength)
    • KEYFRAMED_CURVE
    • KEYFRAMED_CURVE
    • KEYFRAMED_CURVE
    • KEYFRAMED_CURVE
    wavelength12.0

    Four prompts is a natural storytelling unit - four moods, four characters, four seasons - and this node gives you a four-way blend where each one takes its turn in the lead. It emits four phase-locked sine curves that sum to ~1 at every frame. The lead prompt tops out at half the conditioning; the other three stay present underneath. It's a rotating emphasis, not a sequence of switches.

    It's the 4x member of the "Entangled Curves" family in dmarx's ComfyUI-Keyframed, parameterized by wavelength - you set the number of frames per full cycle. With the default 12, one full lap through all four leads takes 12 frames. If you want each of your four phases to hold its turn longer, just bump the wavelength; that's the whole appeal of the wavelength flavor over the frequency one - the dial reads in frames, which is how animators actually think.

    How it works

    Four SinusoidalCurves with phases a quarter-turn apart, each with amplitude 1/4 plus a small floor so none fully zeroes - fully zeroed conditions create "sharp edges" in the traversal, per the README. Balanced phases make the four sum to ~1 at any instant. Each swings between ~0 and ~1/2, so the leading prompt contributes half the conditioning while the other three split the rest. The lead rotates smoothly around the cycle.

    One input, wavelength (FLOAT, default 12, stepped at 0.5). Four 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. The wiring is identical to every other member of the family - only the count changes.

    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 files; the only dependency is the keyframed library, auto-installed on first startup (expect a pause; pip install keyframed if it fails). It's under keyframedentangled [0-1]. Four is the biggest count that still keeps each prompt's turn legible - beyond this, individual voices start to blur together.

    Categorykeyframed/entangled [0-1]

    Inputs (1)

    NameTypeDefaultDescription
    wavelengthFLOAT12.0

    Outputs (4)

    NameTypeDescription
    KEYFRAMED_CURVEKEYFRAMED_CURVE
    KEYFRAMED_CURVEKEYFRAMED_CURVE
    KEYFRAMED_CURVEKEYFRAMED_CURVE
    KEYFRAMED_CURVEKEYFRAMED_CURVE