INNER CODE UNIT · Python
_resolved_strength_for_display
wiltodelta/remove-ai-watermarks · src/remove_ai_watermarks/cli.py:128
def _resolved_strength_for_display(
source: Path,
strength: float | None,
vendor: str | None,
pipeline: str,
) -> float:
"""Resolve the same profile-specific strength the engine will execute.
One call for every profile, so the printed value cannot drift from the executed
one; the size is what qwen-zimage derives its strength from.
"""
from PIL import Image
with Image.open(source) as image:
return resolve_strength(strength, vendor, pipeline, size=image.size)
# -o/--output is the most-repeated option in this module. The image commands and the