Nodes/DiffusionGemma Prompt Builder/DiffusionGemma Advertisement Audio Audition & Lock
ComfyUI Node

DiffusionGemma Advertisement Audio Audition & Lock

Audition Four Soundtracks, Lock One, and Make It Impossible to Swap In Another

By exportAnything·Created 2 months ago·Updated a day ago· 44
DiffusionGemma Advertisement Audio Audition & Lock
  • candidate_1
  • candidate_2
  • candidate_3
  • candidate_4
  • selected_audio
  • suggested_start_seconds
  • waveform_sha256
  • director_report_json
  • audit_report_json
  • status
  • ready
soundtrack_contract_json
candidate_count1
selection_modeauto_select
expected_bpm0.0
excerpt_duration_seconds30.0
minimum_score0.52
locked_waveform_sha256
locked_start_seconds-1.0
source_policyminimax_music3

DiffusionGemmaAdvertisementAudioCandidateSelector is the music picker with teeth. In the advertisement stack, MiniMax Music 3 (or your upload) produces a few candidate soundtracks, and this node runs them through decoded-audio QC, picks a usable excerpt, and then locks the result by waveform hash so the rest of the pipeline can never silently swap in a different song. The "audition" in the display name is doing real work: this is the point where you listen, choose, and commit.

It's a content-aware version of the music-video pack's audio selector, adapted for ads. The key difference is the explicit content contract: soundtrack_contract_json says whether the campaign wants Instrumental, Vocal, or Auto, and the QC respects it. Instrumental music does not need a vocal proxy; vocal music does. So an instrumental candidate won't get failed for lacking a voice, and a vocal candidate can't slip through without one.

The mechanism, roughly: you can hand it up to four candidate_N AUDIO inputs and a candidate_count (1–4), then selection_mode decides the behavior. auto_select runs the QC heuristics - measured tempo, onset pressure, tonal consistency, clipping, silence, artifact detection - and picks. Or you lock explicitly: lock_candidate_1 through lock_candidate_4, or lock_by_hash against a locked_waveform_sha256 you already approved. expected_bpm (0 = don't enforce) and excerpt_duration_seconds (30 by default) bound the choice, and minimum_score (default 0.52) is the weighted numeric floor - importantly, just the floor: hard QC failures like clipping or silence block regardless of score. source_policy tells it whether the candidates are generated (full musical QC) or an uploaded track (technical-integrity checks plus the vocal-content contract).

Outputs are where the locking shows: selected_audio (the exact excerpt you approved), suggested_start_seconds, waveform_sha256 (the lock), plus director_report_json and audit_report_json with the evidence, and the universal status/ready pair. In the full workflow the selected report also feeds the DiffusionGemma Director so H3 camera and body motion follow the measured excerpt rather than the requested metadata.

The hard rule to internalize: this node fails closed. A failed lock blocks rather than falling back to some other song, because for an ad the soundtrack is contractual - the mixer, assembler, and QA gate all verify that the audio they receive still hashes to the waveform you locked here. If you hear a better take, don't fight the lock; re-run the selector with the new candidate and lock that.

The practical workflow is: generate your two to four candidates, run once in auto mode, look at the reports, then listen - the pack is explicit that QC is a lightweight signal heuristic, not a substitute for ears - and lock your chosen candidate and its excerpt start for repeatable production. Where people stumble: forgetting to connect soundtrack_contract_json and then being confused why a generated instrumental failed vocal checks, or re-running with a different seed and wondering why downstream won't accept the new audio - because it now hashes differently than the lock. Install is the pack install (ComfyUI Manager, search "DiffusionGemma Prompt Builder", or clone into custom_nodes); the workflow around it wants ComfyUI 0.33.1+ and the Music 3/H3 models, but this selector itself only decodes and measures audio.

Categoryprompt/diffusiongemma/advertising

Inputs (13)

NameTypeDefaultDescription
soundtrack_contract_jsonSTRING
candidate_countINT11–4
selection_modeCOMBOauto_select6 options: auto_select, lock_candidate_1, lock_candidate_2, lock_candidate_3, lock_candidate_4, lock_by_hash
expected_bpmFLOAT0.00–300
excerpt_duration_secondsFLOAT30.00.5–600
minimum_scoreFLOAT0.520–1
locked_waveform_sha256optSTRING
locked_start_secondsoptFLOAT-1.0-1–2000
candidate_1optAUDIO
candidate_2optAUDIO
candidate_3optAUDIO
candidate_4optAUDIO
source_policyoptSTRINGminimax_music3ace_step retains generated-candidate musical QC; uploaded_song retains technical integrity gates plus the explicit vocal-content contract.

Outputs (7)

NameTypeDescription
selected_audioAUDIO
suggested_start_secondsFLOAT
waveform_sha256STRING
director_report_jsonSTRING
audit_report_jsonSTRING
statusSTRING
readyBOOLEAN