Nodes/SongBloom_ComfyUI/SongBloom DeepSeek Lyric Formatter
ComfyUI Node

SongBloom DeepSeek Lyric Formatter

This node formats lyrics via DeepSeek — and it needs a key

By xuchenxu168·Created 12 months ago·Updated 10 months ago· 15
SongBloom DeepSeek Lyric Formatter
    • formatted_lyrics
    • raw_response
    lyrics
    api_key
    modelDeepSeek-V3
    system_prompt
    seed0

    Take a block of messy, unstructured lyrics - a verse you jotted down, a chorus from somewhere else, prose that's barely song-shaped - and this node sends them to DeepSeek with instructions to return them in SongBloom's strict tag format. That's the whole job, and the name tells you exactly that: it's a DeepSeek-powered formatter, not a generator.

    It earns its place because SongBloom's lyric format is fiddly and hand-fixing it is exactly the kind of chore an LLM is good at. Rather than writing your own prompt around the format spec every time, the node bakes the formatting rules into the request. You paste garbage in, formatted lyrics come out.

    But let's be direct about the cost: this is an API node. It calls DeepSeek's chat/completions endpoint through the OpenAI SDK (base URL https://api.deepseek.com, model name DeepSeek-V3 internally mapped to deepseek-chat). No key, no output - the node will hand your input back with a message about it. The key lookup order is: api_key input on the node → DEEPSEEK_API_KEY environment variable → DeepseekAP-config.json in the pack's root → deepseek.api_key in config.yaml. Set it once in the config file and you never think about it again.

    Inputs and outputs

    • lyrics (required) - the raw text to reformat. Multiline.
    • api_key (optional) - paste it here if you don't want it in a file or env var.
    • model - DeepSeek-V3, the only choice; mapped to deepseek-chat internally.
    • system_prompt (optional) - blank by default; override the formatting instructions if you want a different output shape.
    • seed (optional) - for reproducible responses.

    Outputs:

    • formatted_lyrics (STRING) - the DeepSeek response. Feed it to SongBloomLyricProcessor (validation) and then to the generator.
    • raw_response (STRING) - the full raw API response as JSON. This is a debugging gift: when formatting goes sideways, you can see exactly what the API returned instead of guessing.

    Where it sits in a workflow

    The typical chain is SongBloomLyricGenerator (or your own text) → this formatter → SongBloomLyricProcessorSongBloomGenerator. The formatter gets you from "anything" to "tagged"; the processor polishes and validates; the generator sings. There's also a SongBloomLyricGenerator in this pack that already does DeepSeek formatting internally when its own use_deepseek toggle is on - so this node is the lighter-weight, single-purpose version for when you just have existing lyrics to fix up.

    Common issues are the API's, not the node's: a 400/401 almost always means a bad or expired key, and if you've got HTTP_PROXY/HTTPS_PROXY set, the SDK inherits them - clear those if you need a direct connection. Watch your DeepSeek quota, since every run is a paid call.

    Install

    The whole pack installs the same way:

    cd ComfyUI/custom_nodes
    git clone https://github.com/xuchenxu168/SongBloom_ComfyUI
    cd SongBloom_ComfyUI
    pip install -r requirements.txt
    

    ComfyUI Manager: search "SongBloom_ComfyUI". Restart and it's under SongBloom/Text. The node needs the OpenAI SDK (it's a pack dependency), so the pip install step is not skippable here.

    CategorySongBloom/Text

    Inputs (5)

    NameTypeDefaultDescription
    lyricsSTRING
    api_keyoptSTRING
    modeloptCOMBODeepSeek-V31 options: DeepSeek-V3
    system_promptoptSTRING
    seedoptINT00–18446744073709550000

    Outputs (2)

    NameTypeDescription
    formatted_lyricsSTRING
    raw_responseSTRING