Repository navigation
fix(nano): avoid duplicate fs and preserve audio loading errors - #3778
Merged
Merged
Conversation
LauraGPT
approved these changes
Oct 18, 2026
LauraGPT
left a comment
Collaborator
There was a problem hiding this comment.
Validated exact head 2117b036496e2d3dba2d1e8f8a0cd4d50eb2bfc5 against current main a4ab3b9d204f9c8b14cd6d6846abaa29ffff4f7a and synthetic merge be212d45ef3376e56efddd93b39dff3d8fc97988.
- Recursive tree reconciliation found exactly the two Nano model copies and the submitted test file; changed blobs match the head and every other blob matches current main.
- The drifted synthetic merge passes the submitted audio-loading cases (12/12), adjacent Nano option tests (19/19), and changed-file compileall.
- On a real NVIDIA H100 with Torch 2.8.0+cu128/CUDA 12.8, the existing official
zh.mp3through the existing Fun-ASR-Nano-2512 + FSMN-VAD weights reproduces the maskedUnboundLocalError(data_src)on current main. The exact synthetic merge returns one non-empty result. CUDA hooks observed 2,691 ASR and 12 VAD Linear calls; both model components and tensors were oncuda:0.
This is a focused one-recording, batch-size-1 regression and hardware validation, not a full model/language/accuracy suite. Within that scope, the fix preserves the forwarded sampling-rate contract and surfaces loader errors instead of continuing with an unbound value.
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
Type of change
Validation
Tested on Windows with Python 3.12, using CPU tensors without model weights.
python -m compileall funasr examples testsUser impact
The initial error occurs because
fsis supplied both explicitly and throughkwargs:The handler logs this exception but continues into feature extraction with
data_srcunassigned, producing a second error that masks the original cause:This restores Nano audio loading through the VAD pipeline when fs is forwarded.
Notes for reviewers
The duplicate-keyword pattern dates to the initial Nano integration in 3e2c4c4 (December 2025). Explicit VAD-to-ASR fs forwarding in 9d61129 (October 2026) exposed it in the default VAD path