Skip to content

Fix Stable Audio short-input encoder stitching - #815

Merged
0xShug0 merged 1 commit into
mainfrom
fix/stable-audio-short-inpaint
Oct 6, 2026
Merged

0xShug0 merged 1 commit into
mainfrom
fix/stable-audio-short-inpaint

Conversation

@0xShug0

@0xShug0 0xShug0 commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Summary

Fix heap corruption when SAME encoder conditioning contains fewer than 128 latent frames. The old final-chunk offset becomes negative; use the planned chunk start and copy only the valid prefix of a padded short chunk.

Complete-chunk placement and overlap trimming are unchanged. No weights, graph shapes, inference math, framework, or ggml changes.

Add regression coverage to the existing CLI path cases for short mono/stereo inpainting, short initial-audio conditioning, the 128-frame boundary, longer inputs, and session reuse.

Validation

  • Reproduced the zero-padding short-inpaint crash on main.
  • CUDA: all seven regression requests pass.
  • CPU and Vulkan: short mono/stereo inpainting passes.
  • Normal padded CUDA output is byte-identical before and after the fix.
  • Three consecutive identical CUDA requests in one session produce byte-identical WAVs; repeating the short request after intervening differently shaped requests also matches.

@0xShug0
0xShug0 merged commit 3878865 into main Oct 6, 2026
@0xShug0
0xShug0 deleted the fix/stable-audio-short-inpaint branch October 8, 2026 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant