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.
claude-mem: Persistent Context Across Sessions for AI Agents
May 20, 2026
claude-mem is an innovative GitHub repository designed to provide persistent context across sessions for various AI agents. It intelligently captures agent activities, compresses them using AI, and injects relevant information into future interactions. This powerful tool supports a wide range of AI platforms, including Claude Code, OpenClaw, Gemini, and Copilot.

AutoGen: A Programming Framework for Agentic AI
March 30, 2026
AutoGen is a versatile programming framework from Microsoft designed for building multi-agent AI applications. It empowers AI agents to operate autonomously or collaborate seamlessly with human users, streamlining the execution of complex tasks. The framework offers a layered, extensible design, providing both high-level APIs for rapid prototyping and low-level components for fine-grained control.
EasyEdit: An Easy-to-Use Knowledge Editing Framework for LLMs
January 26, 2026
EasyEdit is an open-source framework designed for efficient knowledge editing in Large Language Models (LLMs). It provides a unified, easy-to-use platform to modify, insert, or erase specific knowledge within LLMs without negatively impacting overall performance. This tool is crucial for aligning LLMs with evolving user needs and correcting factual inaccuracies.

FastRTC: Real-Time Communication Library for Python Functions
January 15, 2026
FastRTC is a powerful Python library designed for real-time communication, enabling developers to transform any Python function into an audio and video stream over WebRTC or WebSockets. It simplifies the creation of interactive, real-time applications, particularly in the AI domain, by handling complex streaming logistics. This library offers robust features for building conversational AI, live video analysis, and more.
Source repository
Open the original repository on GitHub.