Skip to content

feat(sa3): spread denoise changes across the product dial - #321

Draft
ryanontheinside wants to merge 1 commit into
ryanontheinside/fix/sa3-monotonic-a2a-schedulefrom
ryanontheinside/feat/sa3-denoise-product-mapping
Draft

feat(sa3): spread denoise changes across the product dial#321
ryanontheinside wants to merge 1 commit into
ryanontheinside/fix/sa3-monotonic-a2a-schedulefrom
ryanontheinside/feat/sa3-denoise-product-mapping

Conversation

@ryanontheinside

@ryanontheinside ryanontheinside commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Product decision, intentionally separate

Map the public sa3_denoise control onto entry sigma using the inverse of the measured audio-change curve, so useful change is spread across the dial instead of concentrated near the top.

This is deliberately not presented as another sampler fix. DEMON #320 / Stability-AI/stable-audio-3#94 contain the mathematical monotonicity correction. This PR is an opinionated product mapping layered on top, isolated so we can decide whether we actually want that opinion.

Behavior

The measured knots are:

dial:  0.00  0.10  0.20  0.30  0.40  0.50  0.65  0.80  1.00
sigma: 0.00  .3786 .5762 .6853 .7321 .7683 .8376 .8843 1.00

Endpoints retain their existing meaning:

  • 0.0: preserve the source
  • 1.0: generate from pure noise

Intermediate positions interpolate linearly between measured knots. The manifest description now describes the knob as measured audio-change amount rather than raw init_noise_level.

Set this to bypass only the product mapping:

DEMON_SA3_DENOISE_MAPPING=identity

Identity mode still uses the corrected monotonic upstream schedule.

Evidence and limits

The curve comes from a 41-entry-sigma sweep over nine clips. Less than one fifth of the measured available change occurred below sigma 0.70, which explains why the corrected raw-sigma control still felt mostly inactive until its upper range.

The referee combines harmonic and rhythmic change and reproduced two independent listening-order judgments that a loudness-based metric did not.

Important limitations are kept in the source documentation:

  • this validates ordering and the location of the dead region, not that every resulting step is equally perceptible
  • one global curve cannot move every kind of material equally
  • sparse acoustic input moved faster than dense electronic material in the measured set

Verification

7 focused mapping tests passed
466 cumulative DEMON unit tests passed (4 skipped)

Focused coverage checks monotonicity, exact endpoints, measured knots, interpolation, clamping, default calibrated behavior, identity rollback, and invalid configuration.

Integration with the corrected upstream builder was checked in both modes at dial 0.5:

calibrated entry: 0.7683
identity entry:   0.5000

Both produced monotonic, bounded schedules with exact entry and zero endpoints.

Dependencies and merge instructions

Depends on:

  1. DEMON chore(sa3): repin current upstream and version SAME-L engines #319 — current upstream pin and versioned SAME-L engine
  2. DEMON fix(sa3): use the monotonic audio-to-audio schedule #320 — monotonic sampler correction
  3. upstream schedule review Fix shifted audio-to-audio schedules across backends Stability-AI/stable-audio-3#94

Do not merge this into main before the two DEMON parent PRs. After #320 merges, retarget/rebase this PR onto main; the final diff should contain only the mapping helper, call-site mapping, manifest copy, and tests.

This PR is intentionally draft until Product accepts the nonlinear default. If the mapping is rejected, #319 and #320 remain independently useful and unaffected.

Keep the upstream-corrected monotonic schedule, but map the product dial
to entry sigma using the inverse of the measured change curve. This
spreads useful movement across the control instead of concentrating it
near the top.

The mapping is deliberately presented as a product choice, not another
sampler fix: its referee is validated for ordering rather than equal
perceptibility, and one global curve moves different material at
different rates. DEMON_SA3_DENOISE_MAPPING=identity bypasses it while
retaining the upstream schedule correction.
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