DragGAN logo

DragGAN

Paid

Official Code for DragGAN (SIGGRAPH 2023)

5.0
Type
Saas

About DragGAN

DragGAN is an interactive point-based manipulation tool for generative images, based on StyleGAN. Users can drag points to manipulate the image manifold. This is the official code for the SIGGRAPH 2023 paper 'Drag Your GAN: Interactive Point-based Manipulation on the Generative Image Manifold'. It provides a Gradio demo, a GUI, and Docker support. It works on CUDA, MacOS (M1/M2), and CPU. The code is built on StyleGAN3 and includes pre-trained StyleGAN2 weights. For real images, GAN inversion is required before editing.

Key Features

Interactive point-based manipulation on the generative image manifold
Supports GAN-generated images and real images via GAN inversion
Gradio web demo and native GUI
Docker support (image ~25GB)
Works on CUDA, MacOS (M1/M2), and CPU
Based on StyleGAN2 and StyleGAN3

Pros & Cons

Pros
  • Open-source with clear documentation
  • Interactive and intuitive point-based editing
  • Supports multiple platforms (CUDA, MacOS, CPU)
  • Published as SIGGRAPH 2023 paper
Cons
  • Large Docker image (~25 GB)
  • Requires CUDA for optimal performance; CPU-only is slow
  • Editing real images requires separate GAN inversion step
  • CC-BY-NC license may limit commercial use (algorithm part)

Best For

Image editing and manipulationResearch in generative adversarial networksInteractive content creation

Alternatives to DragGAN

FAQ

What hardware is required to run DragGAN?
A CUDA-capable GPU is recommended. It also works on MacOS with Silicon M1/M2 and on CPU with reduced performance.
How can I run DragGAN?
You can run the Gradio demo with `python visualizer_drag_gradio.py --listen` or the GUI by running `sh scripts/gui.sh`. Docker build instructions are also provided.
Can I edit real photos with DragGAN?
Yes, but you need to first perform GAN inversion using tools like PTI to get a latent code, then load that code and model weights into the GUI.