Skip to content

feat([issue-912]): minimal-mutation regen (empty prompt) + large-image handling#970

Merged
atomantic merged 2 commits into
mainfrom
regen/minimal-mutation-large-images
Jun 5, 2026
Merged

feat([issue-912]): minimal-mutation regen (empty prompt) + large-image handling#970
atomantic merged 2 commits into
mainfrom
regen/minimal-mutation-large-images

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

Follow-up tuning to the SynthID-defeat Regenerate action (#958), driven by interactive testing on the 128 GB machine.

  • Minimal-mutation default — regen now runs with no prompt and no negative prompt: a near-pure VAE round-trip + a low denoise pass. This overwrites the per-pixel watermark with the least visible change to the image, instead of re-steering it toward the source's text description. (generateImage waives the prompt-required guard when regenOf is set; both the mflux and FLUX.2 runners accept an empty --prompt. An explicit promptOverride still allows a creative re-roll.)
  • Lower denoise — default strength 0.4 → 0.25 (provisional) and the validation floor 0.2 → 0.1, so the minimum strength that defeats SynthID can be swept live via the API strength param and locked once known.
  • Large-image handlingclampRegenDimensions caps 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. generateImage then 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.jsclampRegenDimensions (under-budget passthrough, 12.6 MP downscale to ≤2 MP /16 aspect-preserved, non-/16 rounding, custom budget, garbage-dim fallback); buildRegenParams empty-prompt default, promptOverride, clamp + upscaleTo to exact source dims.
  • Existing regen/local/route suites updated for the new defaults; 118 tests green in the three affected files.
  • Verified both runners accept an empty --prompt (mflux is None check; FLUX.2 argparse required=True is satisfied by an empty value).
  • Manual: confirmed live on this machine that a codex source regenerates through schnell img2img 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.

atomantic added 2 commits June 5, 2026 10:45
…) + 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
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