mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user