Repository navigation
fix(paraformer): handle trailing zero-fire samples in mixed CIF batches - #3854
Merged
Merged
Conversation
LauraGPT
added a commit
that referenced
this pull request
Nov 7, 2026
Preserve the original PR #3854 commit. Synchronize retained main content to the exact reviewed integration tree and add fail-closed CPU/ONNX regression CI. No history rewrite, pretrained download, or protection bypass. Signed-off-by: LauraGPT <zhifu.gzf@alibaba-inc.com>
LauraGPT
added a commit
that referenced
this pull request
Nov 7, 2026
Preserve the original contributor commit and add maintained regression coverage. No administrator bypass. Signed-off-by: LauraGPT <zhifu.gzf@alibaba-inc.com>
Merged
LauraGPT
added a commit
that referenced
this pull request
Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cif_v1andcif_v1_exportassume each sample has at least one CIF firing during frame processing. If a sample produces no firings while an earlier sample in the batch does, the code can access an invalid index and crash. Very short audio segments can trigger this case.The guard added in #3028 handles batches where no sample fires. This fix covers mixed batches by skipping zero-fire samples when resetting frame boundaries.
Type of change
Validation
[1, 0]. With a fixed seed, three independent GPU runs per version fail before the fix and pass afterward.python -m compileall funasr examples testsandgit diff --checkpass.User impact
Mixed batches containing trailing zero-fire samples complete CIF aggregation instead of crashing.