Audio Mood Analyzer (Advanced)
When You Need to Rewrite the Prompts It Uses
- audio
- mood_json
- subject_json
- environment_prompt
- subject_prompt
- merge_prompt
- summary
The base Audio Mood Analyzer is opinionated about how it talks to the LLM. It has hardcoded prompt templates for every step - the mood analysis, the subject analysis, the environment, subject, and merge prompt generation - and they're good templates. But the moment you want the analysis to sound like your art direction instead of the author's, the base node gives you one lever (custom_context) and makes you live with the rest. Audio Mood Analyzer (Advanced) is the same node with five full prompt-template overrides bolted on. If you find yourself fighting the built-in prompts, this is the variant you want.
Everything from the base node carries over identically - same audio input, same Ollama URL and model defaults (qwen3:14b), same temperature split (0.4 analysis / 0.8 prompt generation), same style presets, same six outputs (mood_json, subject_json, environment_prompt, subject_prompt, merge_prompt, summary). You can copy a working base-node workflow, swap the node class, and change nothing else.
The five overrides
Each override replaces one internal Ollama prompt. Leave it empty and the built-in template is used; fill it in and it replaces the built-in entirely. They use standard Python {placeholder} syntax, and each has documented variables:
| Override field | Replaces | Available variables |
|---|---|---|
| mood_prompt_override | Mood analysis prompt | {features}, {custom_context}, {style_block} |
| subject_analysis_prompt_override | Subject analysis prompt | {lyrics_or_text}, {focus_fragment}, {song_title}, {song_description}, {song_genre}, {custom_context} |
| environment_prompt_override | Environment prompt-gen | {mood_json}, {subject_json}, {style_block} |
| subject_prompt_override | Subject prompt-gen | {subject_json}, {style_block} |
| merge_prompt_override | Merge prompt-gen | {mood_summary}, {environment_prompt}, {subject_prompt}, {style_block} |
A realistic use: the base node's subject-analysis template insists on third-person conversion and its own JSON schema. If your pipeline wants a first-person subject or a different schema, you drop a template into subject_analysis_prompt_override that says so, using {lyrics_or_text} and {focus_fragment} where the content should land. Similarly, mood_prompt_override lets you demand a JSON shape with fields your downstream nodes expect - which matters if you're feeding the output into custom tooling.
Two safety behaviors are built in. If you reference a variable name the node doesn't recognize, it logs a warning and falls back to the built-in template for that call rather than crash. If the override fails to render for any reason, same fallback. And because the overrides set state on the node instance, the Advanced node serializes its calls behind a lock so concurrent workflow runs don't corrupt each other's templates.
The honest take
This is a "you'll know if you need it" node. If you're happy with the built-in prompts - and you should try them first, they're genuinely considered - the base node is sufficient and this is extra inputs doing nothing. If you've already decided the built-in mood analysis is too literal, or you need the merge prompt to follow a specific format, the overrides are the difference between a workaround and the actual fix. Since the pack ships both variants in the same install, the only cost of starting with the Advanced node is a slightly busier UI.
Install
Identical to the base node - it's the same pack:
cd ComfyUI/custom_nodes
git clone https://github.com/andrea-spoldi/ComfyUI-AudioMoodAnalyzer.git
pip install -r ComfyUI-AudioMoodAnalyzer/requirements.txt
Restart ComfyUI; it lives under audio/analysis with the rest of the pack. Ollama must be running locally with a model pulled (ollama pull qwen3:14b) - this node is entirely local, no keys, no cloud, same as its sibling.
Inputs (21)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| ollama_url | STRING | http://localhost:11434/api/generate | — |
| model | STRING | qwen3:14b | — |
| analysis_temperature | FLOAT | 0.40–1.5 | — |
| prompt_temperature | FLOAT | 0.80–1.5 | — |
| custom_context | STRING | Analyze the music as pure sound, not lyrics. Translate sonic qualities into emotional visual direction. | — |
| lyrics_or_text | STRING | — | |
| focus_fragment | STRING | — | |
| song_title | STRING | — | |
| song_description | STRING | — | |
| song_genre | STRING | — | |
| style_preset | COMBO | painterly | 5 options: painterly, cinematic, raw, abstract, custom |
| style_notes | STRING | — | |
| generate_environment_prompt | BOOLEAN | true | — |
| generate_subject_prompt | BOOLEAN | true | — |
| generate_merge_prompt | BOOLEAN | true | — |
| mood_prompt_overrideopt | STRING | Override the audio mood analysis prompt. Leave empty to use built-in. Available variables: {features}, {custom_context}, {style_block} | |
| subject_analysis_prompt_overrideopt | STRING | Override the subject analysis prompt. Leave empty to use built-in. Available variables: {lyrics_or_text}, {focus_fragment}, {song_title}, {song_description}, {song_genre}, {custom_context} | |
| environment_prompt_overrideopt | STRING | Override the environment image-gen prompt. Leave empty to use built-in. Available variables: {mood_json}, {subject_json}, {style_block} | |
| subject_prompt_overrideopt | STRING | Override the subject image-gen prompt. Leave empty to use built-in. Available variables: {subject_json}, {style_block} | |
| merge_prompt_overrideopt | STRING | Override the merge prompt. Leave empty to use built-in. Available variables: {mood_summary}, {environment_prompt}, {subject_prompt}, {style_block} |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| mood_json | STRING | — |
| subject_json | STRING | — |
| environment_prompt | STRING | — |
| subject_prompt | STRING | — |
| merge_prompt | STRING | — |
| summary | STRING | — |