Nodes/ComfyUI-CineSpatial/CineSpatial · QuerySeparateEvent
ComfyUI Node

CineSpatial · QuerySeparateEvent

Pull one sound out of a mix by describing it

By Vighneshjs·Created about a month ago·Updated about a month ago· 0
CineSpatial · QuerySeparateEvent
    • artifact_json
    ◄effects_audio_path►
    ◄query►
    ◄start_seconds0.00►
    ◄end_seconds1.00►

    This is the most fun node in the pack. Type "door slam", "glass shatter", "distant thunder" - and the node pulls that one sound out of an effects track, leaving you with the isolated event and the residual, plus a report of what it thinks it found. It's source separation with a text prompt instead of a fixed stem list.

    How it works

    Thin client to the fixed loopback runner at http://127.0.0.1:8199/v1, requesting the query_separate_event operation. The model behind it is the "audiosep" slot in the pack's health report - the language-queried audio separation family, where you describe a sound and it separates exactly that out of the mix, rather than splitting into a fixed set of categories.

    The runner executes in its own isolated environment and returns the three required artifact roles for this operation: isolated_event (the sound you asked for, on its own), parent_residual (the effects track with that event removed - the space you'd re-synthesize or replace), and isolation_report (what the model believes it found and where). Files are verified non-zero-length and SHA-256-checked, confined to a fresh per-run directory, then surfaced as downloadable worker_ref entries in ComfyUI's output folder. Everything arrives in the single artifact_json output.

    Inputs and outputs

    • effects_audio_path (STRING, required) - the track to mine. The effects stem from CineSpatialBanditSeparate is the intended source.
    • query (STRING, required) - your description of the sound. This is the star input. Specific beats generic: "footsteps on gravel" isolates better than "noise".
    • start_seconds (FLOAT, default 0, min 0) and end_seconds (FLOAT, default 1, min 0) - the window to search. The defaults are just a starting point, not a recommendation; set them around the actual event so the model spends its budget on the right stretch of track instead of auditioning the whole clip.

    Output: artifact_json (STRING), an output node, so it prints when run.

    Install and the gotcha

    Same as every node in the pack: ComfyUI Manager Git URL installer, or

    cd ComfyUI/custom_nodes
    git clone https://github.com/Vighneshjs/ComfyUI-CineSpatial
    

    then restart. Nothing to pip-install, no weights to download here - the separation model runs in the separate cinespatial runner. If it's not up, you get CineSpatial runner service is unavailable or invalid, and CineSpatialWorkerHealth shows whether the audiosep backend is actually loaded.

    Troubleshooting

    • Poor isolation → your window is too wide or your query too vague. Narrow start_seconds/end_seconds to the actual moment and make the query match what a listener would call the sound.
    • "runner service is unavailable or invalid" → the loopback service isn't running on 8199; start it and check health first.
    • Nothing useful comes back → check whether the runner reports the audiosep model ready. A missing checkpoint fails explicitly on the runner side - the pack never pretends a registered node or a matching filename is proof a model loaded.
    • Long tracks → operations have a 3600-second timeout, so it won't hard-fail, but the node blocks the graph while the runner works.

    The workflow shape is: separate the mix into stems, point this at the effects stem, describe the one sound you need for the next edit, and hand the isolated event to whatever wants a clean single-sample source. It's the closest the pack comes to a magic trick, and the closest it comes to being genuinely fun.

    CategoryCineSpatial/AI Worker

    Inputs (4)

    NameTypeDefaultDescription
    effects_audio_pathSTRING—
    querySTRING—
    start_secondsFLOAT0.00—
    end_secondsFLOAT1.00—

    Outputs (1)

    NameTypeDescription
    artifact_jsonSTRING—