Skip to content

Preserve LavaSR digital silence - #61

Merged
Tinnci merged 1 commit into
mainfrom
agent/preserve-lavasr-digital-silence
Jul 12, 2026
Merged

Preserve LavaSR digital silence#61
Tinnci merged 1 commit into
mainfrom
agent/preserve-lavasr-digital-silence

Conversation

@Tinnci

@Tinnci Tinnci commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • preserve strictly zero LavaSR inputs after weight, runtime, and device validation but before model inference
  • keep near-silence and every non-zero input on the normal model path
  • make eval matrix return a non-zero exit code when any run fails
  • make the Colab evidence script reject failed matrices
  • record the v0.6.0 T4 evidence and update roadmap/release status

Root cause

The v0.6.0 Colab T4 failure-case matrix passed four of five fixtures. Exact digital silence produced deterministic model output with RMS 0.0001772631 and peak 0.000664089, causing the harness to correctly report silence_hallucination. Five repeated CUDA runs had the same SHA256, while the reference and degraded inputs remained exactly zero. The model output, not degradation, WAV writing, or CUDA variance, was the source.

Fix validation

On the same Colab T4 session, weights, and fixtures, the matrix changed from four passed plus one stability failure to five passed with zero failures. Silence duration drift changed from 0.0026667 seconds to zero.

Checks

  • local targeted regression tests passed
  • pixi run lint
  • pixi run format-check
  • pixi run typecheck
  • pixi run test: 159 passed, 6 skipped
  • remote Colab regression tests: 5 passed
  • remote LavaSR failure-case matrix: 5 passed
  • git diff --check

@Tinnci
Tinnci marked this pull request as ready for review July 12, 2026 05:33
Copilot AI review requested due to automatic review settings July 12, 2026 05:33
@Tinnci
Tinnci merged commit 9ce8175 into main Jul 12, 2026
3 checks passed
@Tinnci
Tinnci deleted the agent/preserve-lavasr-digital-silence branch July 12, 2026 05:33
Copilot stopped reviewing on behalf of Tinnci due to an error July 12, 2026 05:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR improves LavaSR failure/silence handling and makes CLI evaluation workflows correctly fail when an eval-matrix run fails.

Changes:

  • Short-circuit lavasr-compat inference for exact digital silence to prevent deterministic low-level “texture” output.
  • Make audio-super-res eval matrix return a non-zero exit code when any run fails, and enforce the same in the Colab evidence workflow.
  • Add/refresh documentation and changelog entries to reflect the updated behavior and validation evidence.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/test_lavasr_compat.py Adds regression test ensuring exact digital silence stays silent and model load is avoided.
tests/test_cli.py Adds test asserting eval matrix returns non-zero exit code when failures occur.
src/audio_super_resolution/cli.py Returns exit code 1 when the eval matrix manifest reports failures.
src/audio_super_resolution/backends/lavasr_compat.py Adds silence short-circuit in enhance() to preserve exact silence.
examples/colab_lavasr_validation.py Treats matrix runs as failed if the manifest indicates failures.
docs/ACCELERATORS.md Records validation/evidence notes for the published tag and silence fix.
ROADMAP.md Updates release milestone status to completed.
CHANGELOG.md Documents the fixes under an Unreleased section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 117 to +122
device = resolve_device(self.config.device, supported_devices=LAVASR_CAPABILITY.accelerators)
_require_torch_runtime()

prepared_audio, was_mono = _prepare_lavasr_input(audio, sample_rate)
if not np.any(prepared_audio):
return _restore_lavasr_output(np.zeros_like(prepared_audio).T, was_mono=was_mono)

prepared_audio, was_mono = _prepare_lavasr_input(audio, sample_rate)
if not np.any(prepared_audio):
return _restore_lavasr_output(np.zeros_like(prepared_audio).T, was_mono=was_mono)
)
print(f"Wrote eval matrix {args.output_dir / 'matrix.json'} ({manifest['run_count']} run(s))")
return 0
return 0 if manifest["passed"] else 1
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.

2 participants