OpenViSTAI · Agents · Blockchain · Crypto
Menu
Image & Video AI

Draggan

DragGAN is Python research code with GUI and Gradio visualizers for interactively manipulating GAN-generated images by selecting and dragging points. The project links hosted demos and documents local setup with pretrained StyleGAN weights.

Independent OpenViST project profile, based on linked sources.

Draggan — OpenViST project profile in Image & Video AI.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use DragGAN to experiment with interactive point-based changes to GAN-generated images, or as a research-code starting point for a visual image-editing prototype.

Who it is for

  • Researchers exploring interactive manipulation of generative models.
  • Developers who want to run or adapt point-based GAN image-editing research code.
  • Users who want to experiment with dragging points in GAN-generated images through a visualizer.

Documented uses

  • Explore point-based edits to images generated by GANs.
  • Run a local GUI or Gradio visualizer with pretrained StyleGAN weights.
  • Edit a real image after performing GAN inversion with a separate tool and loading its latent code and model weights.
Before you choose

Requirements & limits

The repository links hosted demos on OpenXLab and Hugging Face, plus a Google Colab notebook. It also documents local installation for CUDA-capable graphics cards, Apple Silicon Macs, or CPU use.

  • Real-image editing requires a separate GAN inversion step, such as PTI.
  • The local setup requires pretrained model weights and a Python environment.
  • The Docker visualizer image is approximately 25 GB.
  • Licensing differs between the DragGAN algorithm code and much of the StyleGAN3-derived code; derivative use must preserve the “AI Generated” watermark.

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

Start the local DragGAN GUI

Prepare the documented environment and model weights before launching the GUI.

Before you start

  • A cloned DragGAN repository.
  • A CUDA-capable graphics card, Apple Silicon Mac, or CPU environment; CUDA users should follow the StyleGAN3 requirements.
  • Conda and the Python packages listed in the repository.

Steps

  1. Create and activate the Conda environment using the repository's CUDA or non-NVIDIA instructions.

  2. Install additional packages with the command below.

    Documented command
    pip install -r requirements.txt
  3. Download pretrained StyleGAN2 weights with the command below.

    Documented command
    python scripts/download_model.py
  4. Launch the GUI with the command below; on Windows, use scripts/gui.bat.

    Documented command
    sh scripts/gui.sh

Expected outcome

The DragGAN GUI is started for editing GAN-generated images.

Guide limitations

  • Editing a real image requires GAN inversion with a separate tool such as PTI, followed by loading the latent code and model weights.
  • The README's Docker route notes an image size of about 25 GB.
  • The project has distinct licensing terms for DragGAN algorithm code and StyleGAN3-derived code, and derivatives must preserve the “AI Generated” watermark.
Source-based practical guide

Launch the Gradio visualizer in Docker

Build and start the repository's Docker-based Gradio visualizer.

Before you start

  • A cloned DragGAN repository.
  • Pretrained model weights downloaded with python scripts/download_model.py.
  • Docker; add --gpus all to the documented run command when using an NVIDIA GPU.

Steps

  1. Build the image with the command below.

    Documented command
    docker build . -t draggan:latest
  2. Start the container with the documented port and workspace mapping.

  3. Inside the container, run cd src && python visualizer_drag_gradio.py --listen.

  4. Open the Gradio shared link printed in the terminal.

Expected outcome

A Gradio visualizer is started and provides a shared link in the terminal.

Guide limitations

  • The Docker image takes about 25 GB of disk space.
  • The documented command starts the visualizer; it does not specify additional deployment or access-control configuration.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
17 October 2026
Original website title
XingangPan/DragGAN · Official homepage title · retained in its source language