Skip to content

feat([issue-912]): in-lightbox regen controls (strength + optional prompt)#971

Merged
atomantic merged 1 commit into
mainfrom
regen/ui-controls
Jun 5, 2026
Merged

feat([issue-912]): in-lightbox regen controls (strength + optional prompt)#971
atomantic merged 1 commit into
mainfrom
regen/ui-controls

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

Makes the SynthID-defeat Regenerate action tunable from the lightbox UI (follow-up to #958/#970), plus an empirically-driven floor change.

  • In-lightbox controls — the Regenerate button now opens an inline panel with a strength slider (lower = more faithful) and an optional prompt field, so a pass can be dialed in without curl. Slider bounds come from the server (GET /regen/availability now returns strengthMin/Max/Default) so the UI stays in lock-step with route validation.
  • Optional prompt — the route accepts an optional prompt (threaded to buildRegenParams as promptOverride; empty = the minimal-mutation default), so the same control supports a creative re-roll.
  • Lower floor 0.1 → 0.02 — empirical sweep on this machine: across strength 0.02–0.25 the change is a flat ~8% (the VAE round-trip's own reconstruction error — the irreducible minimum for this approach), so minimal processing is already reached at the low end. Strength 0.0 is excluded: mflux special-cases it as "ignore the init image" and produces a near-random ~49%-changed image, which defeats the purpose.

Refs #912

Test plan

  • routes/imageGen.test.js — availability endpoint now also asserts the strength bounds (strengthMin > 0, default within bounds); existing regenerate route tests still green.
  • regen.test.js — unchanged behavior for buildRegenParams/clamp; 80 server tests across the two affected files pass.
  • Client variants/normalize tests pass (30); client lint clean (0 errors); npm run build succeeds.
  • Manual: empirical strength sweep (0.0/0.02/0.05/0.10/0.15/0.20/0.25) confirmed the flat ~8% floor and the degenerate 0.0 case; user's SynthID detector confirmed 0.25 and 0.4 defeat the watermark (lower values pending live testing via the new slider).

…onal prompt) + lower floor

Make the SynthID-defeat regen tunable from the UI:
- The Regenerate button now opens an inline panel with a strength slider and an
  optional prompt field, so a pass can be dialed in without curl. Slider bounds
  come from the server (GET /regen/availability now returns
  strengthMin/Max/Default) so the UI stays in lock-step with route validation.
- Route accepts an optional "prompt" (threaded to buildRegenParams as
  promptOverride; empty = the minimal-mutation default).
- Lower the strength floor 0.1 -> 0.02. Empirically, in the 0.02-0.25 range the
  change is a flat ~8% (the VAE round-trip's own reconstruction error — the
  irreducible minimum), so minimal processing is reached at the low end. Strength
  0.0 is excluded: mflux special-cases it as ignore-the-init-image and produces a
  near-random ~49%-changed image, defeating the purpose.
@atomantic atomantic merged commit f6e3c2a into main Jun 5, 2026
2 checks passed
@atomantic atomantic deleted the regen/ui-controls branch June 5, 2026 18:28
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