Optional audio stage · Audio + reports
Turn Mastering Off and the Mastering Nodes Never Execute
- original_audio
- processed_audio
- audio
- report_1
- report_2
- report_3
- report_4
- report_5
- report_6
- report_7
- report_8
In most workflows, "switch a stage off" means bypass a node and hope the rest of the chain tolerates a missing wire. MusicOptionalStage does something stricter and more useful: when the stage is disabled, the upstream branch is never executed, and downstream report consumers still receive valid data instead of a stale string or a crash.
Two instances of it sit in the production workflow, one for Refinement and one for Mastering. That's the whole idea - the big optional lumps of DSP get a yes/no gate in front of them.
Inputs and outputs
Required:
enabled- a boolean input, wired from the production choices node's refinement or mastering outputstage- a dropdown,RefinementorMastering. It labels the bypass record; it doesn't change the routing.original_audio- the audio as it arrives, before the stageprocessed_audio- the audio as it leaves the stage
Optional: report_1 through report_8, the stage's own report strings.
Outputs: audio plus report_1 through report_8. So it's a two-in-one gate - the audio and the paperwork go through the same valve. That second half is the part that's easy to overlook and the reason it exists. The toolkit's production JSON wants a section for every stage, including the ones you skipped. Without the gate, the record side would still demand that the stage run to produce its report, which would defeat the whole point of skipping it.
The mechanism
The audio sockets and all eight report slots are lazy, and the node implements a lazy-status check: with enabled false, only original_audio is requested. Nothing upstream of it gets pulled, so the declipper, the low-pass filters, FlashSR, the crossover, the HF repair - or the whole auto-EQ / eight-band EQ / compressor / limiter stack - simply don't run. Their models don't load. Their downloads don't happen. No GPU time, no VRAM.
Pass-through is honest about itself. Disabled, the audio socket returns the original untouched, and all eight report slots return a small JSON string like {"stage": "refinement", "enabled": false, "status": "bypassed"} rather than an empty string. For Refinement, two of those slots are special - they normally carry preset names, so a bypassed refinement writes the word Bypassed there instead, which keeps the production record human-readable.
Enabled, the node passes processed_audio and all eight reports through unchanged. It behaves like a wire, and the reports are the real stage's.
What the switches actually do
From the toolkit's own mapping: Mastering off means incoming audio survives at its existing sample rate - the Auto-EQ, the manual EQ, the loudness targeting, the limiter and the sample-rate conversion all go away together. Refinement off removes the restoration chain. Disable both and generation goes straight to the release savers. Both defaults on, and on the YuE2 path refinement defaults off because the default route skips restoration entirely and goes direct to mastering.
Install and the one trap
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 # same Python as ComfyUI
Restart and hard-refresh, then reopen the bundled workflow - the gates and their report wiring are part of the graph, and a saved personal workflow from an older version won't have them.
The trap is the classic one from ComfyUI's plumbing layer: laziness only holds if nothing inside the stage is an output node. Connect a plain PreviewAudio or a saver inside the refinement branch and the branch executes whether or not the gate is open - you've re-anchored the graph around the gate you built. Keep previews and savers downstream of the gate, and the switch means what it says.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | BOOLEAN | Connect the central refinement or mastering Boolean. Off skips both audio processing and report dependencies. | |
| stage | COMBO | Labels bypass records. Refinement slots 2 and 4 carry preset names; other report slots carry JSON. | |
| original_audio | AUDIO | Audio before this stage. Requested only when the stage is disabled. | |
| processed_audio | AUDIO | Audio after this stage. Requested only when enabled. | |
| report_1opt | STRING | Configuration input 'report 1'. This value is passed directly to the node's processing logic; keep it at the workflow default unless you intentionally want to change that part of the production chain. | |
| report_2opt | STRING | Configuration input 'report 2'. This value is passed directly to the node's processing logic; keep it at the workflow default unless you intentionally want to change that part of the production chain. | |
| report_3opt | STRING | Configuration input 'report 3'. This value is passed directly to the node's processing logic; keep it at the workflow default unless you intentionally want to change that part of the production chain. | |
| report_4opt | STRING | Configuration input 'report 4'. This value is passed directly to the node's processing logic; keep it at the workflow default unless you intentionally want to change that part of the production chain. | |
| report_5opt | STRING | Configuration input 'report 5'. This value is passed directly to the node's processing logic; keep it at the workflow default unless you intentionally want to change that part of the production chain. | |
| report_6opt | STRING | Configuration input 'report 6'. This value is passed directly to the node's processing logic; keep it at the workflow default unless you intentionally want to change that part of the production chain. | |
| report_7opt | STRING | Configuration input 'report 7'. This value is passed directly to the node's processing logic; keep it at the workflow default unless you intentionally want to change that part of the production chain. | |
| report_8opt | STRING | Configuration input 'report 8'. This value is passed directly to the node's processing logic; keep it at the workflow default unless you intentionally want to change that part of the production chain. |
Outputs (9)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |
| report_1 | STRING | — |
| report_2 | STRING | — |
| report_3 | STRING | — |
| report_4 | STRING | — |
| report_5 | STRING | — |
| report_6 | STRING | — |
| report_7 | STRING | — |
| report_8 | STRING | — |