YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Stable Diffusion Extraction Utilities

Research code for controlled, authorized memorization and training-data extraction experiments on publicly released Stable Diffusion checkpoints and datasets.

The repository contains:

  • extract.py: baseline multi-seed prompt extraction and clique filtering.
  • pia_extract.py: rho/PIA-guided DDIM extraction with optional branching.
  • reference_lpips.py: ranking generated images against paired reference images.
  • prepare_naruto_blip.py: converts a Hugging Face image-caption dataset into prompt and reference-image files.
  • sd_pipeline.py, components.py, stable_attack.py: PIA/rho sampler implementation.

No model weights, datasets, generated images, credentials, or caches are included.

Basic extraction

python extract.py \
  --model /path/to/diffusers-model \
  --prompts prompts.json \
  --output output \
  --num_images 500 \
  --batch_size 32 \
  --steps 50

Use --start_prompt and --max_prompts to shard a run across GPUs.

PIA/rho extraction

Run a small diagnostic first and inspect guidance_diagnostics.jsonl before scaling up. Tune pia_scale, shift, and temperature from the observed rho and injection-to-epsilon ratio rather than assuming a universal value.

All experiments should use models and datasets for which the operator has permission to run the evaluation.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support