INNER CODE UNIT · Python
_no_invisible_signal_exit
wiltodelta/remove-ai-watermarks · src/remove_ai_watermarks/cli.py:514
def _no_invisible_signal_exit(source: Path) -> NoReturn:
"""Explain why the diffusion scrub was skipped, then exit non-zero.
The ``invisible`` command regenerates pixels to remove SynthID / open
watermarks; that regeneration also degrades a real photo. When
:func:`identify` finds no locally-detectable invisible AI signal, running it
anyway would damage a clean image for nothing -- the dominant paid score-0
cause on no-watermark uploads. So skip it, but do NOT imply the image is
clean: Google does not publish the SynthID payload decoder, and this package
does not ship one, so a mark can still be present after its metadata proxy
is gone. Write no output and exit :data:`EXIT_NO_INVISIBLE_SIGNAL`;
``--force`` runs the scrub regardless.
"""
console.print(
" No supported invisible AI watermark detected (no provenance or open\n"
" watermark). Skipped the diffusion scrub -- regenerating the pixels would\n"
" only degrade the image with nothing to remove, so no output was written.\n"
" This does NOT prove the image is clean: this package has no local SynthID\n"