fix(processing): preserve pipeline audio across process_decode

process_decode strips video pipeline output to a flat list of frames at the
PIL early-return (processing_diffusers.py:461-465), so any output.audio is
lost before processing.process_images returns. video pipelines that produce
synchronized audio (LTX-2 audio-capable models) were getting silent mp4s on
the non-latent path.

stash output.audio on p.audio_capture before process_decode runs and let
processing read it back as a fallback when samples is a flat list.

ltx_process non-latent branch strips the (B, 2, N) batch dim with [0] so
write_audio's .T+contiguous() path produces interleaved bytes for AAC s16.
This commit is contained in:
CalamitousFelicitousness
2026-05-02 04:08:55 +01:00
parent a6870f7d27
commit 207e7d8b3b
3 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -528,7 +528,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
output_images.append(batch_image)
infotexts.append(batch_infotext)
audio = getattr(samples, 'audio', None)
audio = getattr(samples, 'audio', None) or getattr(p, 'audio_capture', None)
if shared.cmd_opts.lowvram:
devices.torch_gc(force=True, reason='lowvram')