Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified examples/gemini-after.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 10 additions & 7 deletions unmark/presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@


def gemini(img: np.ndarray) -> np.ndarray:
"""Google Gemini puts a small light sparkle in the bottom-right corner on the
generated image's background. Mirror-patch from bottom-left works cleanly when
the background is near-uniform (typical for portrait avatars)."""
"""Google Gemini stamps a bright diamond/sparkle in the bottom-right corner on every
generated image. Inpaint detects the bright pixels and fills from immediate
neighbors, so whatever content sits behind the sparkle (fog, gradient, sky,
vignette) is preserved instead of being replaced with content from the opposite
corner. Works on both uniform and non-uniform backgrounds."""
return remove_watermark(
img,
strategy="mirror",
strategy="inpaint",
corner="bottom-right",
patch_ratio=0.22,
full_radius_ratio=0.42,
fade_radius_ratio=0.78,
region_ratio=0.20,
brightness_threshold=200,
dilate_iters=4,
inpaint_radius=12,
)


Expand Down
Loading