OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Security & Safety

Photoguard

Photoguard is open-source research code and a Gradio demo that applies adversarial perturbations to images to make Stable Diffusion-based editing produce unrealistic or unrelated results.

Independent OpenViST project profile, based on linked sources.

Photoguard — OpenViST project profile in AI Security & Safety.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Photoguard to explore the repository’s Stable Diffusion-focused safeguarding methods and demonstrations, or to run its Gradio demo locally.

Who it is for

  • Researchers studying adversarial image perturbations and diffusion-model robustness.
  • Developers exploring safeguards for Stable Diffusion image-to-image and inpainting workflows.

Documented uses

  • Explore how image perturbations affect prompt-guided image-to-image edits.
  • Demonstrate perturbation-based disruption of inpainting workflows.
  • Compare encoder-level and end-to-end diffusion attack approaches through the included notebooks.
Before you choose

Requirements & limits

The repository is public and released under the MIT license. Its README documents a hosted Hugging Face Space and local demo setup.

  • The project relies on Stable Diffusion code through Hugging Face Diffusers.
  • The README documents Python 3.10, Conda, dependency installation, and Hugging Face CLI login for setup.
  • The end-to-end diffusion attack is presented as a more involved approach, particularly for inpainting.
  • Adapting the workflow to another image-editing model is experimental; the documentation focuses on Stable Diffusion.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up and start the local Gradio demo

Prepare the documented environment and launch Photoguard’s local demo.

Before you start

  • Clone the Photoguard repository.
  • Conda and Python 3.10.
  • Install the repository requirements and authenticate with huggingface-cli login.

Steps

  1. Create and activate a Conda environment named photoguard with Python 3.10.

  2. Install dependencies with pip install -r requirements.txt and run huggingface-cli login.

  3. From the repository, activate the photoguard environment, change into demo, and run python app.py.

Expected outcome

The README describes the Gradio demo running locally; it notes local use for faster inference.

Guide limitations

  • The documented methods focus on Stable Diffusion; the README does not demonstrate compatibility with other image-editing models.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
16 October 2026
Original website title
MadryLab/photoguard · Official homepage title · retained in its source language