How to install DragGAN AI Tool: Full Guide

Photo editing is probably one of the key beneficiaries of the upheaval that artificial intelligence has brought about across many industries. The innovative DragGAN AI tool, developed by the esteemed research team at the Max Planck Institute, is a monument to the advancements made recently in this fascinating field. This guide provides you to install the DragGAN AI Tool

install DragGAN AI Tool

The DragGAN is brilliant because of its unmatched intuitiveness, which is encased in a fluid drag-and-drop interface and represents a significant advancement in the ongoing development of picture editing software. In the discussion that follows, we’ll go on an adventure through the world of AI-powered photo editing, examining the fascinating DragGAN in detail and giving you detailed instructions on how to install and set up this extraordinary application on your computer.

Install DragGAN AI Tool Following these Step-by-step Instructions

Before installing DragGAN, ensure your system has the right setup: compatible OS (Windows, Mac, Linux), Python 3.7, and GPU with 8GB/6GB memory for 1024/512 models. NVIDIA GPU users need a CUDA toolkit, but Mac users must have NVIDIA graphics cards. For Windows, install CUDA toolkit 11.1 or use 11.3.1 if 11.1 is unavailable.

The AI tool DragGAN is in preview and can be accessed through the research team’s publication. Additionally, they have made the code public and launched a live website. To install DragGAN on your Mac or Windows machine, follow the steps below:

Step 1: Install Conda

If you don’t have Conda, find installation instructions online. Follow official documentation. When installed, proceed to the next step.

Step 2: Clone the Repository from GitHub

1. First, visit the DragGAN GitHub repository.

2. Next, click on the  “<> Code” button at the top right corner.

3. Make sure the Local tab > HTTPS tab is selected.

4. Click on the “Copy Link” icon to copy the repository link.

5. Now, open your terminal or command prompt.

6. Go to the location where you want to install DragGAN.

7. Use the command “git clone (repository URL)” to clone the DragGAN repository.

8. Replace “(repository URL)” with the link you copied earlier.

Step 3: Set Up a New Conda Environment

To make a new environment in your terminal, follow these steps:

1. Open your terminal application.

2. Type the command: `conda create -n draggan python=3.7`.

3. Press Enter.

This will create a fresh conda environment called “draggan” using Python 3.7.

Now, activate the environment using this command: “conda activate draggan”.

You’ll see the environment activated in your terminal.

Step 4: Install Requirements

First, go to the DragGAN folder. Then, use the following command in the terminal:

“pip install -r requirements.txt”

This will install all the required packages mentioned in the requirements.txt file.

Step 5: Enable all Fallbacks for MPS

MPS is like Apple’s CUDA. You can use the GPU with MPS, but it’s currently not functional. So, you must be prepared to switch to the CPU.

To do this, export this variable: “PYTORCH_ENABLE_MPS_FALLBACK=1.”

Step 6: Download Pre-trained Models for DragGAN

Get the pre-trained models by using this command in Python:

    python scripts/

It might take a while as the models are large. Ensure a steady internet connection while downloading.

Step 7: Run the DragGAN  GUI

To open the DragGAN GUI, follow these steps:

Run the command: 

“sh scripts/”

If you face any problems with the GUI, try this workaround:

Use the command: 


This will launch the DragGAN visualizer, enabling you to interact with the model.

DragGAN: AI-Powered Image Editing Tool via Drag & Drop

Can I run DragGAN on my CPU?

Using DragGAN on a CPU is possible but not recommended due to its high computational needs. For best results, go for a GPU. But if want to run it then you need a minimum Intel Core i5-4400E CPU.

Are there specific requirements to install DragGAN?

Yes, DragGAN needs the right 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 have an NVIDIA GPU, you must also set up the CUDA toolkit.

Has DragGAN’s official code been released?

The DragGAN code is now out! Get it on GitHub or use our guide for installation.


DragGAN is a thrilling AI tool for image editing via point selection. It’ll revolutionize photo editing and seems extraordinary. Though early, it has huge AI potential. Try DragGAN and share your thoughts below.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top