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.
This commit is contained in:
CalamitousFelicitousness
2026-08-08 14:19:00 +01:00
parent adf0385c52
commit fbb447f419
+2 -2
View File
@@ -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')