|
Download README.md from bivri/dazzle-generator: direct link, hf CLI and curl.
- Browser
- Download file 2.34 kB
-
https://huggingface.co/bivri/dazzle-generator/resolve/main/README.md
- Command line
-
hf download hf://bivri/dazzle-generator/README.md
-
curl -L -o README.md https://huggingface.co/bivri/dazzle-generator/resolve/main/README.md
2.34 kB
| license: apache-2.0 | |
| library_name: dazzle | |
| tags: | |
| - image-protection | |
| - style-mimicry | |
| - protective-pattern | |
| # Dazzle generator v0.1.0 | |
| A 3,667,619-parameter fully convolutional U-Net that adds a bounded protective pattern to an | |
| illustration. The pattern is meant to reduce how much of the artist's style an SDXL LoRA learns | |
| when the image is used for unauthorized style-mimicry fine-tuning. One forward pass, any resolution | |
| whose sides are multiples of 8 (the library pads and crops other sizes). | |
| Dazzle is developed by [Bivri (비브리)](https://bivri.app), an illustration community built on the | |
| AT Protocol where artists share artwork and exchange commissions. | |
| - Code: https://github.com/bivri/dazzle (tag `v0.1.0`, built from `0.1.0+73cb8a73537efaf4e9e1893967d9834713809501`) | |
| - Output: `delta = epsilon * tanh(G(x))`, default bound 20.0 of 255 levels per channel | |
| ## Use | |
| ```python | |
| from PIL import Image | |
| from dazzle import DazzleGenerator, protect_image | |
| gen = DazzleGenerator.from_pretrained("bivri/dazzle-generator", revision="v0.1.0") | |
| protect_image(Image.open("art.png"), gen).save("art.protected.png") | |
| ``` | |
| ## Evaluation | |
| Evaluation run `generator-target-texture`: for each of four synthetic illustration styles, one rank-16 SDXL LoRA | |
| (Illustrious-XL v2.0, 1,500 steps, kohya-ss/sd-scripts) was trained on the protected set, optionally | |
| after a transformation filter, and 40 renders were compared with an unprotected LoRA's renders in | |
| CSD style space. E/F is the fraction of the unprotected LoRA's style-specific gain that the | |
| protected set removed: 1 removes all of it, 0 none. LPIPS is measured at native resolution against | |
| the original images. | |
| | Training set given to the mimicry LoRA | LPIPS | E/F mean [95% CI] | | |
| | --- | --- | --- | | |
| | protected (s1) | 0.066 | +0.110 [+0.039, +0.175] | | |
| | protected (s4) | 0.066 | -0.214 [-0.316, -0.127] | | |
| | protected+vae (s1) | 0.081 | +0.142 [+0.063, +0.210] | | |
| | protected+vae (s4) | 0.081 | -0.268 [-0.371, -0.177] | | |
| ## Limitations | |
| - Results are from four synthetic styles, one LoRA recipe and one training seed per condition. CSD | |
| similarity is not a human judgment. | |
| - A transformation filter or a differently configured trainer can reduce the effect. The pattern | |
| does not make mimicry impossible. | |
| - The pattern is visible on close inspection of flat regions at the default bound. | |