Skip to content

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

Merged
leszko merged 3 commits into
ryanontheinside/fix/sa3-monotonic-a2a-schedulefrom
ryanontheinside/feat/sa3-denoise-product-mapping
Aug 18, 2026
Merged

feat(sa3): spread denoise changes across the product dial#321
leszko merged 3 commits 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

Summary

Product-side calibration for the sa3_denoise knob. With the schedule
fixed by #320, the dial is monotonic but still not perceptually even:
measured over a 41-point sweep on nine clips, less than one fifth of the
audible change happens below sigma 0.70, so most of the dial's travel
does nearly nothing. This PR adds sa3_denoise_mapping.py, a measured
knot table that inverts that curve so equal dial movement produces
roughly equal measured audio change. Endpoints are exact: 0.0 preserves
the source, 1.0 generates from pure noise.

DEMON-only, applied at the knob-to-sigma_max boundary in the backend.
Nothing in the vendored SA3 changes.

Rollback / opt-out

DEMON_SA3_DENOISE_MAPPING=identity bypasses the mapping (raw dial
passes straight through as init_noise_level) while keeping the #320
schedule fix. Default is calibrated.

Scope notes

  • The referee behind the knot table (harmonic + rhythmic change vs the
    codec round trip) is validated for ordering and for locating the dead
    region, not for equal steps being equally perceptible.
  • One global mapping for all material: sparse acoustic input moves faster
    than dense electronic material.

Merge handoff

Last in the stack: merge after #320. Awaiting a product listening pass
before merge; the code side is green (unit tests, live denoise sweeps
through the mapping with 0 stale ticks). Whether the mapping should be
default-on (current behavior) or client-activated is an open product
decision; flipping it is a one-word default change in
denoise_mapping_mode().

Move the managed SA3 source from the old FP8 development lineage to
current upstream plus the rebased TensorRT integer-attribute fix.

The current upstream SAME-L plugin bakes its AOT/JIT implementation into
the serialized engine. Include the plugin revision and implementation
choice in the engine name and metadata so stale decoders are ignored
instead of being paired with incompatible plugin code. Keep the plugin
revision stable across unrelated vendor bumps so they do not force a
1.2 GB decoder rebuild. Existing engines remain beside the new artifact
for rollback.

Also accept git worktrees as DEMON_SA3_SRC overrides.
Move SA3_VENDOR_SHA to the combined fork pin (current Stability main +
the TRT integer-attribute fix + the normalized-then-scaled schedule
ordering). The schedule change is host-side Python only; the SAME-L
plugin source is unchanged between the previous pin and this one, so
SA3_SAME_L_PLUGIN_REVISION stays put and the existing versioned decoder
engine is reused.
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.
@ryanontheinside
ryanontheinside force-pushed the ryanontheinside/fix/sa3-monotonic-a2a-schedule branch from 8322c5c to edbd8e6 Compare August 17, 2026 19:16
@ryanontheinside
ryanontheinside force-pushed the ryanontheinside/feat/sa3-denoise-product-mapping branch from 90082ab to 9068ce3 Compare August 17, 2026 19:16
@leszko
leszko force-pushed the ryanontheinside/fix/sa3-monotonic-a2a-schedule branch from edbd8e6 to ca16f4a Compare August 18, 2026 09:54
@leszko
leszko marked this pull request as ready for review August 18, 2026 09:55
@leszko
leszko merged commit 384ebc8 into ryanontheinside/fix/sa3-monotonic-a2a-schedule Aug 18, 2026
@leszko
leszko deleted the ryanontheinside/feat/sa3-denoise-product-mapping branch August 18, 2026 09:55
@leszko
leszko restored the ryanontheinside/feat/sa3-denoise-product-mapping branch August 18, 2026 09:55
leszko pushed a commit that referenced this pull request Aug 18, 2026
* fix(sa3): pin the vendored SA3 to the monotonic audio-to-audio schedule

Move SA3_VENDOR_SHA to the combined fork pin (current Stability main +
the TRT integer-attribute fix + the normalized-then-scaled schedule
ordering). The schedule change is host-side Python only; the SAME-L
plugin source is unchanged between the previous pin and this one, so
SA3_SAME_L_PLUGIN_REVISION stays put and the existing versioned decoder
engine is reused.

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

* Pin SA3 to current upstream and version SAME-L plugins

Move the managed SA3 source from the old FP8 development lineage to
current upstream plus the rebased TensorRT integer-attribute fix.

The current upstream SAME-L plugin bakes its AOT/JIT implementation into
the serialized engine. Include the plugin revision and implementation
choice in the engine name and metadata so stale decoders are ignored
instead of being paired with incompatible plugin code. Keep the plugin
revision stable across unrelated vendor bumps so they do not force a
1.2 GB decoder rebuild. Existing engines remain beside the new artifact
for rollback.

Also accept git worktrees as DEMON_SA3_SRC overrides.

* fix(sa3): pin the vendored SA3 to the monotonic audio-to-audio schedule

Move SA3_VENDOR_SHA to the combined fork pin (current Stability main +
the TRT integer-attribute fix + the normalized-then-scaled schedule
ordering). The schedule change is host-side Python only; the SAME-L
plugin source is unchanged between the previous pin and this one, so
SA3_SAME_L_PLUGIN_REVISION stays put and the existing versioned decoder
engine is reused.

* Map the SA3 denoise knob onto measured audio change

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.

2 participants