Nodes/Music Production Toolkit/Style hint · template or text
ComfyUI Node

Style hint · template or text

Tell Cover Studio what style you're after without blowing up the graph

By jplenio·Created 19 days ago·Updated a day ago· 55
Style hint · template or text
    • style_hint
    style_text
    user_prompt_sourcebundled_library
    user_prompt_directory
    user_prompt_filecustom

    This is a plumbing node with one job, and it exists because of a ComfyUI error message you'll hit otherwise: Dependency cycle detected.

    Here's the trap. The Cover Studio's plan step takes a target_style input - a hint for how the source material should be reworked. The obvious thing to wire into it is your Song request node, since that's where you picked the genre template. You can't. The Song request node consumes the studio's rewritten score (its final prompt has to describe the rewritten key, tempo and structure), so it sits downstream of the studio, and a link from it back into the studio is a cycle. ComfyUI rejects the whole prompt.

    So the style text has to come from something outside that chain. That's this node: a small standalone source of style text, with the same dropdowns as the structured prompt node, which you wire into target_style legitimately.

    What it does, mechanically

    It resolves a prompt template - from the toolkit's bundled library, from a folder on the ComfyUI machine, or not at all - and outputs the text.

    The resolution order is the bit to internalise: a selected prompt file wins over the typed text. Pick a file and the hint follows that file; the two nodes can then share one style definition, since you select the same template in Song request · template & fields and here. The node even strips the prompt file's YAML front matter before handing the text on, so a metadata block can't leak into your prompt as prose.

    With no file selected and nothing typed, the output is an empty string. That is not an error state - empty means "no extra hint", and the studio then works from the interpretation profile alone. This node can never stop a run.

    Inputs and output

    style_text is the hint itself, multiline. Selecting a template copies its body here; edit it freely when user_prompt_file is custom, or type your hint and leave the file unselected.

    user_prompt_source picks where text comes from - bundled_library, external_directory or manual. user_prompt_directory is the folder for the external mode (environment variables and ~ are expanded, and reads stay inside that folder). user_prompt_file is the template, and its list is the pack's prompt library - around 240 genre and system templates, plus custom and a blank placeholder. The widget names and dropdown are deliberately identical to the structured prompt node's, because the intended workflow is "select the same file in both".

    One output: style_hint (STRING). In the bundled workflow it goes to exactly one input - target_style on YuE2 Cover Studio · 1 plan.

    What it deliberately doesn't do

    It does not override the song request. The requested style - its template, its fields, its description - stays the master for what the track sounds like, and its STYLE PRIORITY rule is forwarded to the model untouched. This value only guides how the source material gets reworked, and the studio's own prompts say it may not contradict the request.

    It also doesn't fill in the description on the song request node. That node has its own separate template dropdown and fills its own description from it, on purpose: two dropdowns, so a hint can refine the rework but never rewrite the brief the LLM receives. That's the design, not a bug to work around.

    One practical consequence: leaving target_style empty does not mean "follow the source's character". It means no hint at all. If you want the rework aimed somewhere in particular, say so.

    Install

    Nothing node-specific - this ships with the pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/jplenio/ComfyUI-MiniMax-Music-Production-Toolkit.git
    cd ComfyUI-MiniMax-Music-Production-Toolkit
    python -m pip install -r requirements.txt
    

    Restart ComfyUI and refresh the browser. The pack is at 3.1, and the workflows were consolidated into two files in that release - reopen the bundled JSONs rather than an old saved copy of your graph.

    When the dropdown is empty

    Three usual causes, in order of likelihood. You set external_directory but the folder only exists on your workstation - the toolkit reads it on the server, and if ComfyUI isn't running locally those are different machines. Or the repo lost its prompts/user/ and prompts/system/ directories; verify they're still there for bundled_library. Or the browser is holding a stale list - click Refresh prompt lists, and hard-refresh the page after any toolkit upgrade.

    Only .txt, .md and .prompt files are offered, which catches people who keep templates as .yaml. And if you edit a template and the output doesn't change, the node fingerprints the selected file's contents so that shouldn't happen - if it does, your external LLM node is probably the cached one, not this.

    CategoryMiniMax Music Production Toolkit/prompts

    Inputs (4)

    NameTypeDefaultDescription
    style_textSTRINGThe style hint as free text, used when no prompt file is selected below. It is a hint for how the Cover Studio reworks the source material, never a replacement for the style the song request sets. Leave it empty to send no hint at all.
    user_prompt_sourceoptCOMBObundled_libraryWhere the hint text comes from. bundled_library uses the prompt files shipped with the toolkit, external_directory reads them from a folder on the ComfyUI machine, and manual uses only the typed text above.
    user_prompt_directoryoptSTRINGFolder to read prompt files from when prompt_source is external_directory. Environment variables and ~ are expanded; files stay inside this folder. Ignored in the other modes.
    user_prompt_fileoptCOMBOcustomThe template whose text becomes the hint. Select the same file you use in 'Song request · template & fields' so both use one style definition; picking a file here wins over the typed text.

    Outputs (1)

    NameTypeDescription
    style_hintSTRING