mirror of
https://github.com/wiltodelta/remove-ai-watermarks.git
synced 2026-08-09 23:50:40 +02:00
The parameter names invite a misreading. _run_faces regenerates the ENTIRE expanded crop with Z-Image and only then cross-fades on a blurred SAM mask, so the generation is conditioned on a fully noised neighbourhood and the pixels the mask later discards were regenerated too. Records the alternative that has never been tried here - passing the mask into the sampler as a latent noise mask, so only masked pixels are denoised and the edge transition happens inside the generation - because the face stage is the largest measured quality contributor, worth 3.5 dB and 6.1 dB inside the face boxes on the two fixtures that have one. Also records that FACE_DENOISE_SCALE = 0.5 is coupled to this compositing choice rather than independently calibrated: regenerating a whole crop and blending is stronger than masked denoising, so changing the compositing without revisiting the scale would move output strength by about a factor of two. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>