Edit facial expressions by dragging mouth, eyes, or other features to create smiles or different emotions.
Adjust object poses and angles, like rotating a car's wheels or repositioning an animal's limbs.
Create variations of AI-generated images by interactively exploring the model's generative space.
Requires CUDA-capable GPU, PyTorch compilation, StyleGAN model download, and multiple deep learning dependencies.
DragGAN is the official code for a research project published at SIGGRAPH 2023, the premier conference for computer graphics. It implements an interactive technique for editing images generated by a GAN, a Generative Adversarial Network, which is a type of AI model that can generate realistic images. The specific problem DragGAN solves is that traditional ways of editing AI-generated images are imprecise. DragGAN introduces point-based manipulation: you click on a point in the image, drag it to where you want it, and the model smoothly deforms the image so the content moves naturally, staying realistic throughout the transformation. For example, you could drag a person's mouth to a smile, change a car's wheel angle, or reposition a lion's leg. The technique works by operating directly on what the paper calls the "generative image manifold", the internal space of all images the GAN model knows how to produce. Dragging a point navigates through this space rather than crudely warping pixels, which is why the results look coherent rather than distorted. The project provides a graphical desktop interface for experimenting with this technique, as well as a Gradio-based web interface (Gradio is a Python library for building simple interactive ML demos). Pre-trained model weights for several StyleGAN variants are downloadable via a provided script. Running it requires a CUDA-capable GPU, though the README describes a fallback path for Apple Silicon Macs. A researcher, artist, or ML practitioner interested in interactive image editing or generative model manipulation would use this project. It is built in Python using PyTorch, the standard deep learning framework.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.