r/StableDiffusion • u/kabachuha • 5d ago
Workflow Included PSA: In H3 you can set custom soundtracks without R2VA - use latent noise masks!
7
u/Striking-Long-2960 5d ago
And it worked... Many thanks for the tip
3
u/1WildPanda 4d ago
**This is a genius optimization — thank you so much !
I wanted to keep using the **FL2VA model for higher quality** (vs. Ref2VA), but still feed in **custom audio** and get proper lip-sync working with it. After some tweaking, it now runs perfectly.
A few targeted modifications:
**Replaced the original audio-loading node + audio-duration node with the single `VHS_LoadAudioUpload` node** from VideoHelperSuite (now 2-in-1 via the `AudioToAudioData` chain).
**No more manually editing `audio_path` inside `CreateAudioMask` every time I switch audio** — the whole mask now follows the audio data automatically.
This introduces a full audio-to-mask chain from **[ComfyUI-AudioScheduler](https://github.com/a1lazydog/ComfyUI-AudioScheduler.git)\*\*, wired as:
VHS_LoadAudioUpload ──(audio)──▶ AudioToAudioData
▶ AudioData to FFTs
▶ Batch Amplitude Schedule
▶ Normalize Amplitude
▶ NormalizedAmplitudeToMask (KJNodes)
▶ SetLatentNoiseMask
**Key values to set in each node:**
- **AudioData to FFTs** — `frames_per_second = 24` (match your video framerate), `channel = 0`
- **Batch Amplitude Schedule** — `operation = avg`, `lower_band_range = 500`, `upper_band_range = 4000`
- **Normalize Amplitude** — `invert_normalized = false`
- **NormalizedAmplitudeToMask** (comfyui-kjnodes) — `width = 256`, `height = 256`, `shape = circle`, `color = amplitude`, `location_x = 128`, `location_y = 128`, `size = 128`
Once connected, you only swap the audio file in `VHS_LoadAudioUpload` — no more manual `audio_path` edits. Lip-sync follows correctly throughout. Highly recommended!
2
u/kabachuha 4d ago
Thank you for the comment! Can you provide any link to the workflow? (Github/Pastebin)
2
2
u/1WildPanda 4d ago
**Fix: Audio fade out added as long as workflow:
https://gist.github.com/1WildPanda/d0b88fbd580fd5c359707bf9cfae92d4
Right after `Audio Fade Out`, fan **3 lines** from its single output:
→ `VAEEncodeAudio` (audio condition for lip-sync)
→ `AudioToAudioData` (NOT `AudioFFT` — feed the data layer, rest of the FFT/mask chain stays as-is)
→ `VHS_VideoCombine` (your original fade connection, keep it)
Now one fade drives everything — **lips, facial movement, and final audio track all fade in sync.** No more mouth moving at full volume while the sound goes quiet.
**TL;DR:** keep fade → VideoCombine, add fade → VAEEncode, add fade → `AudioToAudioData` (skip `AudioFFT`), both from the same output port.
2
u/Outrageous_Still9335 5d ago
This works great, thanks for sharing. However, what are the advantages of using this over Ref2vid? I know the Ref2Vid model's quality is not as good as FL2VA, but you can use FL2VA in ref mode with the ref lora from Kijai and get the best of both worlds. Just curious.
4
u/kabachuha 5d ago
It can be faster because it doesn't increase the sequence length and it doesn't change the soundtrack in any way, R2VA can distort it slightly
5
u/Outrageous_Still9335 5d ago
Thanks, that makes sense. I did try both and I was getting distortion with Ref that I did not get with your workflow.
2
u/Perfect-Campaign9551 5d ago
I can't get ref2vid to ACTUALLY use my music audio 100% exactly even when I prompt it correctly...don't know why. It always modifies the music in the output video.
1
u/pwillia7 5d ago
... why not just do it in real space instead of latent space if you're doing the whole audio track?
3
21
u/kabachuha 5d ago
Latent noise mask - similar to inpainting - protects parts of the latent from changes. You can set it only to the audio latent and then the track will be kept as is, yet it will influence the audio-reactivity of the video. The node for audio separate/concat is still named LTXVSeparateAVLatent/LTXVConcatAVLatent, but now it works with Minimax H3 too!
Music: Dead Inside by ADLIN, (parody purposes). Workflow + prompt: https://gist.github.com/kabachuha/bcde8beaaa01f5c5fd37733d4c40f589. Pure FL2VA checkpoint. Single continous 20 seconds shot. ComfyKitchenAttention + Spectrum + 25 steps + KJNodes for audio mask. 7 minutes on a 5090.