Nodes/MD Nodes/MD: Universal Context Bus
ComfyUI Node

MD: Universal Context Bus

The MD Universal Context Bus

By MDMAchine·Created about a year ago·Updated 3 months ago· 15
MD: Universal Context Bus
    • BUS
    • GENRE
    • STEPS
    • ADG_ANGLE
    • LEGACY
    genre
    lyrics
    duration
    steps
    glide_power
    master_strength
    legacy_mode
    adg_angle
    vocals
    seed

    If you've built an ACE-Step audio workflow with MD Nodes, you know the pain this node exists to solve: SceneGeniusAutocreator hands you ten separate outputs - genre, lyrics, duration, steps, glide power, master strength, a legacy flag, an ADG angle, vocals, and a seed - and suddenly your canvas is a spiderweb of wires going everywhere. The Universal Context Bus catches them all and lets you route them as one bundle.

    How it works

    Every input on this node is optional and forceInput, meaning they're noodle ports you wire things into rather than widgets you type in. The bundle function collects whatever you actually connected, drops the empty ones, and packages the rest into a single BUS output of type CONTEXT (in practice, a plain dict of your parameters).

    It also re-emits a few typed outputs so you can pick values off individually: GENRE (STRING), STEPS (INT), ADG_ANGLE (FLOAT), and LEGACY (BOOLEAN). If a value wasn't connected, it falls back to a sane default - steps 180, adg_angle 0.13, legacy mode True - so downstream nodes always get a valid number instead of a crash.

    What it's for

    Two honest uses. First, canvas hygiene: wire SceneGenius' outputs into it, then run the typed outputs to the parts of your graph that need them. Second, snapshots: because the BUS is a dict of the whole run's parameters, you can stash it, log it, or feed it to a custom node you write that wants the full context in one object. The pack's own sampler nodes accept YAML config strings, so a context dict is a natural thing to convert and push.

    The straight talk

    This is a tidy-up node, not a processing node. It performs no computation - no value is transformed, nothing is validated, a string goes in and the same string comes out. If you're wondering whether it's worth installing the pack for, it isn't; it earns its keep only inside an existing MD workflow where parameter bundles are flying around. But in that context, it's exactly the kind of small thing that keeps a graph readable.

    Installing it

    Ships with MD Nodes:

    cd path/to/ComfyUI/custom_nodes
    git clone https://github.com/MDMAchine/ComfyUI_MD_Nodes.git
    cd ComfyUI_MD_Nodes
    pip install -r requirements.txt
    

    Or search MD_Nodes in ComfyUI Manager and restart. Note the pack installs a heavy dependency set even though this particular node only does dicts and defaults.

    CategoryMD_Nodes/Utility

    Inputs (10)

    NameTypeDefaultDescription
    genreoptSTRINGGENRE INPUT
    lyricsoptSTRINGLYRICS INPUT
    durationoptFLOATDURATION INPUT
    stepsoptINTSTEPS INPUT
    glide_poweroptFLOATGLIDE POWER INPUT
    master_strengthoptFLOATMASTER STRENGTH INPUT
    legacy_modeoptBOOLEANLEGACY MODE INPUT
    adg_angleoptFLOATADG ANGLE INPUT
    vocalsoptSTRINGVOCALS INPUT
    seedoptINTSEED INPUT

    Outputs (5)

    NameTypeDescription
    BUSCONTEXT
    GENRESTRING
    STEPSINT
    ADG_ANGLEFLOAT
    LEGACYBOOLEAN