mirror of
https://github.com/vladmandic/automatic
synced 2026-09-06 04:50:44 +02:00
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:
@@ -628,6 +628,10 @@ def process_diffusers(p: processing.StableDiffusionProcessing):
|
||||
timer.process.add('lora', lora_common.timer.total)
|
||||
lora_common.timer.clear(complete=True)
|
||||
|
||||
# process_decode flattens video output to a frame list and drops the audio attribute;
|
||||
# stash it on `p` so video pipelines can recover it after process_images returns.
|
||||
if output is not None and getattr(output, 'audio', None) is not None:
|
||||
p.audio_capture = output.audio
|
||||
results = process_decode(p, output)
|
||||
timer.process.record('decode')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user