From fbb447f419f6c5f32fb19c1c0bc441992c41f0d5 Mon Sep 17 00:00:00 2001 From: CalamitousFelicitousness Date: Sat, 8 Aug 2026 14:19:00 +0100 Subject: [PATCH] fix(video): capture pipeline audio before batch script hooks The audio waveform rides as an attribute on the decoded sample list, but the batch script hooks rewrap samples into a plain list before the capture ran, so joint audio-video models muxed silent files whenever a script runner was attached. Capture the attribute before the hooks run. --- modules/processing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/processing.py b/modules/processing.py index fafd4d9f6..98cf0a566 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -513,6 +513,8 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: if not _keep: break + audio = getattr(samples, 'audio', None) # captured before the batch script hooks, which rewrap samples into a plain list without the attribute + if p.scripts is not None and isinstance(p.scripts, scripts_manager.ScriptRunner): p.scripts.postprocess_batch(p, samples, batch_number=n) if p.scripts is not None and isinstance(p.scripts, scripts_manager.ScriptRunner): @@ -531,8 +533,6 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: output_images.append(batch_image) infotexts.append(batch_infotext) - audio = getattr(samples, 'audio', None) - if shared.cmd_opts.lowvram: devices.torch_gc(force=True, reason='lowvram') timer.process.record('post')