feat([issue-912]): in-lightbox regen controls (strength + optional prompt)#971
Merged
Conversation
…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.
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
Makes the SynthID-defeat Regenerate action tunable from the lightbox UI (follow-up to #958/#970), plus an empirically-driven floor change.
GET /regen/availabilitynow returnsstrengthMin/Max/Default) so the UI stays in lock-step with route validation.prompt(threaded tobuildRegenParamsaspromptOverride; empty = the minimal-mutation default), so the same control supports a creative re-roll.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 forbuildRegenParams/clamp; 80 server tests across the two affected files pass.variants/normalizetests pass (30); client lint clean (0 errors);npm run buildsucceeds.