Release Notes — v1.0.2
🐛 Bug fixes
- Gaussian-Shading on CPU: removed hardcoded
.cuda()/.half()and hardcoded64x64latent shapes frommarkdiffusion/watermark/gs/gs.py,detection/gs/gs_detection.py, andvisualize/gs/gs_visualizer.py. CPU-only machines (e.g. macOS) can now run GS viapip install markdiffusion[optional]. Fixes the regression reported by reviewers in v1.0.1.post1. - Tree-Ring / ROBIN / SFW detectors: separate thresholds for
p_valueandcosine_similaritydetectors (previously they reused thel1_distancethreshold, e.g.50, which madep < 50always true and marked every image as watermarked). - RI dtype alignment: align latent dtype in RI to prevent device/dtype mismatch (thanks @codelformat, PR #41).
- Bundled resource paths: resolve
markdiffusion/config/*.jsonfrom the installed package rather than CWD, so PyPI users no longer need to be in the source repo to load default configs.
✨ New features
- DiffusionPurification regeneration attack: encodes the image to latent space, injects noise at a configurable schedule fraction, and reverse-denoises through the diffusion pipe (Nie et al., DiffPure 2022).
- NeuralCodecCompression regeneration attack: round-trips the image through a pretrained learned image codec (
compressai, defaultcheng2020-anchor) at a target quality level (Cheng et al., CVPR 2020). - CrSc (Crop & Scale) now supports
position="center"(existing default),position="random", or an explicit(x_ratio, y_ratio)offset.
🏗 Internal / Refactor
- Repository restructure: code moved into a proper
markdiffusion/Python package sopip install -e .(editable) andpip install markdiffusion(PyPI) share the same import paths (from markdiffusion.watermark import AutoWatermark). - Dependency pins in
pyproject.toml:torch>=2.4,<2.11so PyPI's CUDA-12.x wheels are selected (avoids cu130 wheels that need driver ≥ 575).setuptools<81sopkg_resourcesremains available foropenai-clip.
📚 Docs & Tests
- Test suite expanded to 672 unit tests with 94.73 % code coverage. Both reports published at:
- READMEs rewritten with three install modes (PyPI / editable / conda-forge) and a single unified usage example. Localized READMEs (
README_zh.md,README_fr.md,README_es.md) synced to match.
Full changelog: v1.0.1...v1.0.2