Nodes/AQnodes for ComfyUI/AQ_parse_json_to_acestep
ComfyUI Node

AQ_parse_json_to_acestep

Split any JSON into the acestep output slots

By 2frames·Created about a year ago·Updated 6 months ago· 1
AQ_parse_json_to_acestep
    • response_json
    • tags
    • lyrics
    • seed
    • bpm
    • duration
    • timesignature
    • language
    • keyscale
    • coverImage
    • title
    • tagline
    • headline
    • yt_description
    • yt_tags
    • yt_title
    json_text

    The acestep family's secret weapon: a pure parser that takes a JSON string - from any LLM node, not just this pack's - and splits it into the exact outputs the ACE-Step pipeline expects. No API key, no network, no model, no cost. If you already have a local model or another LLM node producing JSON, this is how you plug it into the song-generation flow.

    Why it exists

    The pack's own LLM nodes (AQ_Gemini_acstep15, AQ_OpenAI_acstep15, AQ_openai_compatible) all return the same 16-slot metadata set - tags, lyrics, seed, bpm, duration, timesignature, language, keyscale, coverImage, title, tagline, headline, and the three yt_* fields. But maybe you want the metadata from a different tool, or you'd rather call the LLM yourself. This node decouples the LLM from the music pipeline: JSON in, typed slots out.

    How it works

    It regex-extracts the first {...} block from the input - so markdown-wrapped JSON from sloppy LLMs still parses - then json.loads it and coerces each field to its output type with defaults: bpm→120, duration→120.0, timesignature→"4", language→"en", keyscale→C major. Literal \n escapes in lyrics get unescaped into real newlines.

    Inputs

    • json_text - the JSON string, multiline.

    Outputs

    The 16 acestep slots: response_json, tags, lyrics, seed, bpm, duration, timesignature, language, keyscale, coverImage, title, tagline, headline, yt_description, yt_tags, yt_title.

    Install

    Ships in AQnodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/2frames/ComfyUI-AQnodes
    cd ComfyUI-AQnodes
    pip install -r requirements.txt
    

    or search "AQnodes" in ComfyUI Manager and restart.

    Gotchas

    It expects the exact schema keys the pack's LLM nodes produce - bpm, durationSeconds, keyscale, and so on. JSON from a random node won't populate the slots unless it uses those same keys; a field your LLM calls "tempo" instead of "bpm" just silently defaults. And unlike the API nodes, it raises on malformed JSON rather than returning empties - check the console if nothing comes out. Honest bottom line: if you're already using one of the pack's acestep LLM nodes, you don't need this one. It's for when you're not.

    CategoryAquasite/LLM

    Inputs (1)

    NameTypeDefaultDescription
    json_textSTRING

    Outputs (16)

    NameTypeDescription
    response_jsonSTRING
    tagsSTRING
    lyricsSTRING
    seedINT
    bpmINT
    durationFLOAT
    timesignatureCOMBO
    languageCOMBO
    keyscaleCOMBO
    coverImageSTRING
    titleSTRING
    taglineSTRING
    headlineSTRING
    yt_descriptionSTRING
    yt_tagsSTRING
    yt_titleSTRING