feat([issue-912]): minimal-mutation regen (empty prompt) + large-image handling#970
Merged
Merged
Conversation
…) + large-image handling Tune the SynthID-defeat regen toward minimal change and make it work on big codex renders: - Empty-prompt default: regen now runs with NO prompt/negative (a near-pure VAE round-trip + light resample) so the watermark is overwritten with the least visible change, rather than re-steering the image toward the source's description. generateImage waives its prompt-required guard when regenOf is set; both mflux and the FLUX.2 runner accept an empty --prompt. An explicit promptOverride still allows a creative re-roll. - Lower the denoise: default strength 0.4 -> 0.25 (provisional) and the validation floor 0.2 -> 0.1, so the minimum that defeats SynthID can be swept live via the API strength param. - Large images: clampRegenDimensions caps the render to a ~2MP FLUX budget (PORTOS_REGEN_MAX_MP, /16-rounded, aspect-preserved) — a 12.6MP render would otherwise stall/OOM the O(tokens^2) attention pass — and generateImage upscales the result back to the source's exact dimensions (Lanczos), so a 4K source returns a watermark-free copy at 4K.
…n-large-images # Conflicts: # .changelog/NEXT.md
This was referenced Jun 5, 2026
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
Follow-up tuning to the SynthID-defeat Regenerate action (#958), driven by interactive testing on the 128 GB machine.
generateImagewaives the prompt-required guard whenregenOfis set; both the mflux and FLUX.2 runners accept an empty--prompt. An explicitpromptOverridestill allows a creative re-roll.)0.4 → 0.25(provisional) and the validation floor0.2 → 0.1, so the minimum strength that defeats SynthID can be swept live via the APIstrengthparam and locked once known.clampRegenDimensionscaps the render to a ~2 MP FLUX budget (PORTOS_REGEN_MAX_MP, /16-rounded, aspect-preserved); a 12.6 MP (4096×3072) render would otherwise stall/OOM the O(tokens²) attention pass.generateImagethen upscales the result back to the source's exact dimensions (Lanczos), so a 4K source returns a watermark-free copy at 4K. The sidecar records both delivered and render dimensions.Refs #912
Test plan
regen.test.js—clampRegenDimensions(under-budget passthrough, 12.6 MP downscale to ≤2 MP /16 aspect-preserved, non-/16 rounding, custom budget, garbage-dim fallback);buildRegenParamsempty-prompt default,promptOverride, clamp +upscaleToto exact source dims.--prompt(mfluxis Nonecheck; FLUX.2 argparserequired=Trueis satisfied by an empty value).schnellimg2img end-to-end (feat([issue-912]): regenerate gallery images to defeat SynthID watermarks #958); this PR's behavior change is exercised post-merge by tuning strength via the API against a SynthID detector.