DragGAN: Interactive Point-Based Image Manipulation with Generative AI
This repository profile is provided by osrepos.com, an open source repository discovery platform.
Summary
DragGAN is the official code for the SIGGRAPH 2023 paper, "Drag Your GAN: Interactive Point-based Manipulation on the Generative Image Manifold." This powerful Python-based repository enables users to precisely control and manipulate generated images using interactive dragging points. It offers an intuitive way to edit AI-generated content, making complex image transformations accessible.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
DragGAN presents a groundbreaking approach to interactive image manipulation, as featured in the SIGGRAPH 2023 conference proceedings. This repository provides the official implementation for "Drag Your GAN: Interactive Point-based Manipulation on the Generative Image Manifold," allowing users to precisely control the pose, shape, expression, and layout of objects within AI-generated images. By simply "dragging" points on an image, users can achieve complex and realistic transformations, making it a powerful tool for artists, researchers, and developers working with generative models.
Installation
To get started with DragGAN, follow these installation instructions based on your system configuration.
For CUDA-enabled GPUs:
conda env create -f environment.yml
conda activate stylegan3
pip install -r requirements.txt
For MacOS with Apple Silicon (M1/M2) or CPU-only:
cat environment.yml | \
grep -v -E 'nvidia|cuda' > environment-no-nvidia.yml && \
conda env create -f environment-no-nvidia.yml
conda activate stylegan3
# On MacOS
export PYTORCH_ENABLE_MPS_FALLBACK=1
Running with Docker (for Gradio visualizer):
First, clone the repository and download pre-trained models:
python scripts/download_model.py
Then, build and run the Docker container:
docker build . -t draggan:latest
docker run -p 7860:7860 -v "$PWD":/workspace/src -it draggan:latest bash
# For GPU acceleration:
# docker run --gpus all -p 7860:7860 -v "$PWD":/workspace/src -it draggan:latest bash
cd src && python visualizer_drag_gradio.py --listen
Examples
DragGAN offers several ways to interact with its powerful image manipulation capabilities. After installation and downloading pre-trained StyleGAN2 weights (using python scripts/download_model.py), you can run the graphical user interface (GUI) or a Gradio web demo.
Running the GUI:
sh scripts/gui.sh
# For Windows:
# .\scripts\gui.bat
The GUI allows for direct editing of GAN-generated images. For real image editing, GAN inversion tools like PTI are required first.
Running the Gradio Demo:
python visualizer_drag_gradio.py
This provides a web-based interface accessible from any browser, making it easy to experiment with the dragging functionality. Pre-trained models for StyleGAN-Human and Landscapes HQ (LHQ) are also available for download to expand your creative possibilities.
Why Use DragGAN?
DragGAN stands out for its intuitive and precise control over generative adversarial networks (GANs). Instead of complex parameter adjustments, users can achieve desired image transformations by simply dragging points, mimicking how one might edit an image in a traditional editor. This interactive approach democratizes access to advanced AI image generation and manipulation, enabling rapid prototyping, artistic creation, and detailed research into the latent space of GANs. Its robust implementation, backed by SIGGRAPH 2023, ensures high-quality results and a strong foundation for further development in the field of AI-driven content creation.
Links
- GitHub Repository: XingangPan/DragGAN
- Project Page: DragGAN Project Page
- Paper (PDF): Drag Your GAN: Interactive Point-based Manipulation on the Generative Image Manifold
- Open In Colab: Google Colab
- Hugging Face Demo: Hugging Face Space
- OpenXLab Demo: OpenXLab App
Related repositories
Similar repositories that may be relevant next.

OpenHands: AI-Driven Development with Agent Canvas
August 11, 2026
OpenHands Agent Canvas is a self-hosted developer control center designed for coding agents and automations. It allows users to run various AI agents, including OpenHands, Claude Code, and Codex, across local, remote, and cloud backends. This powerful platform helps automate everyday development tasks, turning coding agents into an always-on engineering team.

goose: Your Native Open Source AI Agent for Code and Workflows
August 9, 2026
goose is an open source, extensible AI agent designed to run natively on your machine, offering capabilities beyond simple code suggestions. It supports installation, execution, editing, and testing with a wide range of Large Language Models. Built in Rust, goose provides a desktop app, CLI, and API, making it a versatile tool for various tasks from coding to data analysis.

Awesome AI Agents 2026: The Ultimate List of AI Tools and Frameworks
August 8, 2026
This repository, `awesome-ai-agents-2026`, is a comprehensive and frequently updated collection of over 340 AI agents, frameworks, and tools across more than 20 categories. It serves as an essential resource for developers and researchers looking to explore the rapidly evolving landscape of artificial intelligence in 2026, covering everything from coding agents to creative AI and governance.
AsterMind-ELM: Modular Extreme Learning Machine for On-Device ML in JS/TS
July 21, 2026
AsterMind-ELM is a JavaScript/TypeScript library that modernizes Extreme Learning Machines (ELMs) for instant, on-device machine learning in web applications. It offers advanced features like Kernel ELMs, Online ELM, and DeepELM, enabling fast, private, and interpretable AI directly in the browser. This framework allows for building decentralized, self-training ML systems without relying on GPUs or servers.
Source repository
Open the original repository on GitHub.
10 counted GitHub visits