How to Install DragGAN on Windows, Mac & Linux (2026)

Quick answer: DragGAN is SIGGRAPH 2023 research code. The official repository provides Conda setup, model downloads, a Windows launcher (.\scripts\gui.bat) and a cross-platform Gradio launcher (python visualizer_drag_gradio.py). It edits GAN-generated images; real images first require GAN inversion such as PTI.

Tested during editorial review: Updated 16 August 2026 against the official DragGAN repository. GPU and operating-system compatibility varies, so use an isolated environment and confirm the listed dependency versions.

DragGAN AI Image Editing

DragGAN Prerequisites

Before we dive into the installation process, it’s important to note that DragGAN requires a specific system setup. This includes a compatible operating system (Windows, Mac, or Linux), Python 3.7, and a GPU with at least 8GB of memory for 1024 models or 6GB for 512 models.

If you’re using an NVIDIA GPU, you’ll also need to install the CUDA toolkit. For Mac users, note that the CUDA toolkit is only for NVIDIA graphics cards.

If you’re running this on Windows, it’s recommended to install the CUDA toolkit 11.1. However, if you can’t find that version, you can use version 11.3.1.

Install DragGAN

Step 1: Setting Up a New Conda Environment

The first step to install DragGAN is to set up a new conda environment. To do this, you’ll need to install the Anaconda distribution if you haven’t already. Once Anaconda is installed, you can create a new environment by running the following command in your terminal:

conda create -n draggan python=3.7

This command creates a new conda environment named “draggan” with Python 3.7.

Step 2: Activating the Environment

After creating the new environment, you’ll need to activate it. You can do this by running the following command:

conda activate draggan

You’ll know the environment is activated because it will be displayed in your terminal.

Step 3: Installing the Necessary Requirements

Next, you’ll need to install the necessary requirements for DragGAN. To do this, navigate to the DragGAN directory and run the following command:

pip install -r requirements.txt

This command installs all the necessary packages listed in the requirements.txt file.

Step 4: Enabling Fallbacks for MPS

MPS is Apple’s version of CUDA. It allows you to use the GPU to power a lot of this, but it doesn’t work right now, so you have to make sure you’re able to fall back and use the CPU. To do this, you’ll need to export the following variable:

export PYTORCH_ENABLE_MPS_FALLBACK=1

Step 5: Downloading the Pre-trained Models

Next, you’ll need to download the pre-trained models for DragGAN. You can do this by running the following command:

python scripts/download_model.py

This command downloads the pre-trained models, which may take some time as these models are quite large.

Step 6: Running the GUI

On macOS or Linux, start the original GUI with:

sh scripts/gui.sh

On Windows PowerShell, use the launcher included in the official repository:

.\scripts\gui.bat

For a cross-platform Gradio interface on Windows or Linux, run:

python visualizer_drag_gradio.py

DragGAN edits GAN-generated images. To edit a real image, first perform GAN inversion with a tool such as PTI, then load the resulting latent code and model weights into the GUI.

Conclusion

Congratulations on successfully integrating DragGAN into your system. With this cutting-edge AI image manipulation tool at your disposal, the possibilities for creativity are endless. Dive in and explore the full potential of DragGAN, and let your imagination run wild as you experiment with its powerful features.

The more you use it, the more you’ll unlock its true potential. Enjoy the journey and watch as your creations come to life!

If you found this guide helpful, please consider checking out our SuperAGi Guide or our GTP-Engineer Guide. And as always, if you have any questions or run into any issues during the installation process, don’t hesitate to reach out. Happy editing!

Frequently Asked Questions (FAQ)

What is DragGAN?

DragGAN stands for “Drag-based Generative Adversarial Network.” It is a type of AI model that can generate realistic images based on your input. Unlike traditional image editing tools that only distort or crop existing pixels, DragGAN can create new content that matches your intention.

How does DragGAN work?

DragGAN introduces interactive point-based manipulation on the generative image manifold. This means that users have the power to deform images and precisely control the position, pose, shape, expression, and layout of the generated objects.

Is DragGAN easy to use?

Yes, DragGAN is designed to be user-friendly. It enables you to easily adjust photos and art by dragging across the image. It’s as simple as that!

Is the official code for DragGAN released?

Yes, DragGAN code has officially been released. You can find it on GitHub or follow our guide to install it.

Can I use DragGAN for professional purposes?

Do not assume commercial use is permitted. The project says DragGAN algorithm code is CC BY-NC, StyleGAN-derived code has separate NVIDIA licence terms, and derivatives must preserve the “AI Generated” watermark. Review the applicable files and licences before professional use.

Are there any system requirements for installing DragGAN?

Yes, DragGAN requires a compatible operating system (Windows, Mac, or Linux), Python 3.7, and a GPU with at least 8GB of memory for 1024 models or 6GB for 512 models. If you’re using an NVIDIA GPU, you’ll also need to install the CUDA toolkit.

Where can I get help if I encounter issues during the installation process?

You can refer to the step-by-step guide provided in this blog post. If you still encounter issues, you can reach out to the DragGAN community or check out the official DragGAN GitHub page for more information and assistance.

Can I run DragGAN on my CPU?

While it’s possible to run DragGAN on a CPU, it’s not recommended due to the high computational requirements of the tool. For optimal performance, it’s recommended to use a GPU.

How can I stay updated with DragGAN developments?

You can follow the official DragGAN GitHub page or join relevant online communities to stay updated with the latest developments and releases related to DragGAN.

Leave a Comment

Scroll to Top