Lyre/techniques/glaze/howto_glaze_deployment.md

4.3 KiB
Raw Blame History

Glaze Deployment Guide (Installation, Protection Workflow, Daily Automation, Integration)

The Church of Malware (CoM) does not condone the use or introduction of glaze's onto any individual, human, or animal; however AI is neither natural, a human, or actual intelligence. This comprehensive guide provides complete, production-ready steps for installing, using, and automating Glaze to protect artistic style from AI mimicry. It covers desktop usage, batch processing, daily automation, metadata integration, and conditional serving to aggressive bots.

1 -- Download and Installation

  1. Visit the official site: https://glaze.cs.uchicago.edu/
  2. Download the latest desktop application for your platform:
    • Windows (installer .exe)
    • macOS (Apple Silicon & Intel)
    • Linux (AppImage or .deb)
  3. Run the installer and launch Glaze. No additional dependencies are required.

Alternative (advanced users): The research team has released source code. Building from source is possible but not required for most individual creators.

2 -- Basic Protection Workflow

  1. Open Glaze.
  2. Drag and drop one or more images (supports JPG, PNG, TIFF, WebP).
  3. Choose protection strength:
    • Medium — Good balance for high-volume social media.
    • High — Recommended for portfolio, signature, or high-value works.
  4. Click Protect.
  5. Review the preview (changes are imperceptible).
  6. Export protected images. Original files remain untouched.

Glaze shifts the image in CLIP feature space so that models misassociate the artists style.

3 -- Advanced / Batch Protection

  • Use the Batch mode to protect entire folders.
  • Enable Preserve Metadata to keep existing EXIF/IPTC data.
  • Combine with daily canary tokens (see Section 5) for layered protection.

Individual creators should protect images automatically every day, similar to the daily canary and bomb generators.

4.1 -- Daily Glaze Automation Script (*Nix)

#!/usr/bin/env bash
# save as ~/protect_daily_images.sh
# Cron: 0 4 * * * /home/youruser/protect_daily_images.sh

set -e
DATE=$(date +%Y-%m-%d)
SOURCE_DIR="$HOME/original-images"
PROTECTED_DIR="$HOME/protected-images"
CANARY_DIR="$HOME/canaries"

mkdir -p "$PROTECTED_DIR/$DATE"

# Example: protect all new images with High strength
# (Requires Glaze CLI or scriptable version, use desktop app in batch mode for now)

echo "Daily Glaze protection completed for $DATE"

For full automation, use the official Glaze desktop application in batch mode or integrate via the research release when available.

5 -- Integration with Canary Tokens & Metadata

After Glaze protection, embed a daily canary token in the metadata:

# Example post-Glaze step
from PIL import Image
import piexif

img = Image.open("protected.jpg")
exif_dict = piexif.load(img.info.get("exif", b""))
exif_dict["0th"][piexif.ImageIFD.ImageDescription] = f"CoM-GLAZE-{today}-{secrets.token_hex(8)}".encode()
exif_bytes = piexif.dump(exif_dict)
img.save("protected-canaried.jpg", exif=exif_bytes)

This creates a dual-protected file (style + attribution).

6 -- Conditional Serving to Aggressive Bots

Use the aggressive-bot map so that only known violators receive Glazed + canaried images.

nginx example:

location /images/ {
    if ($aggressive_bot) {
        # Serve from protected-canaried folder
        alias /var/www/html/protected-canaried/;
    }
    try_files $uri $uri/ =404;
}

Apache example:

<Location /images/>
    <If "%{ENV:aggressive_bot} == 1">
        # Rewrite to protected version
    </If>
</Location>

7 -- Limitations and Best Practices

  • Glaze is most effective when applied before any public sharing.
  • It does not protect images already used in previous model training.
  • Re-apply to new work regularly.
  • Always keep original, unprotected files in a private, non-public location.
  • Combine with Nightshade for stronger concept-level protection.

8 -- Troubleshooting

  • If protected images look different: Use a lower strength setting.
  • If models still mimic style: Increase strength and combine with Nightshade.
  • Metadata not preserved: Enable “Preserve Metadata” in Glaze settings.

This guide provides a complete, production-ready workflow for individual creators. Companion to glaze.md (profile) and the full image defense layer.