The installation of DragGAN AI on a Windows operating system may initially appear to be a challenging endeavor. However, with the proper guidance, one can swiftly and efficiently complete the process. Within the confines of this article, we shall provide you with a comprehensive walkthrough of the installation process, encompassing the necessary software and the sequential actions you need to take to download and install DragGAN AI. Without further ado, let us commence our examination.
- Windows 10 + Visual Studio Community Edition.
- Advanced GPU-RTX 3060 Ti GPU Server from GPUMart.
- NVIDIA GPUs with 8GB+ RAM. Recommend Nvidia A40、Tesla V100 and GeForce RTX 4090 GPUs.
- CUDA toolkit 11.8.
- Visual Studio Community Edition Download: https://visualstudio.microsoft.com/vs/community/
- Python Download: http://python.org/downloads/
- Git Download: https://github.com/git-for-windows/
- Nvidia CUDA Download: https://developer.nvidia.com/cuda-11-8-0-download-archive?target_os=Windows
- Style GAN Model Download: https://github.com/stylegan-human/StyleGAN-Human
- DragGAN Github Page: https://github.com/XingangPan/DragGAN
- DragGAN Documentation: https://vcai.mpi-inf.mpg.de/projects/DragGAN/
Open the Microsoft VS download link: https://visualstudio.microsoft.com/vs/community/, click the download button, download the installer to the local computer and double-click to install, check Python development, desktop development using C++ and Windows 10SDK on the right, pay attention to your hard disk capacity, click the install button in the lower right corner to install vs.
Before we can proceed with the installation, there are a few software packages we need to have on our system: Conda, Git. Please go to the respective software official website to download and install.
Now, we need to install Nvidia CUDA. Please note that DragGAN is currently compatible with CUDA 11.8. If you have a different version installed, you’ll need to remove it before proceeding.
- Visit the Nvidia developer website and download the CUDA 11.8 toolkit.
- Select the appropriate version for your Windows system (e.g., Windows 10).
- Scroll down the page and download the CUDA toolkit installation program.
- Save the installation program to a location of your choice.
Take installation on disk D as an example, enter cmd in the address bar of disk D, press Enter, start the terminal, enter the following command in the terminal, and press Enter
git clone https://github.com/XingangPan/DragGAN.git
The usual installation steps involve the following commands, they should set up the correct CUDA version and all the python packages
conda env create -f environment.yml conda activate stylegan3
Then install the additional requirements
pip install -r requirements.txt
To download pre-trained weights, simply run:
The program will automatically download 8 models to the checkpoints folder. If there is no checkpoints folder, you can manually create one.
To start the DragGAN GUI, simply run:
If you are using windows, you can run:
This will open the DragGAN user interface for Windows. Please note that the initial loading of the model may take some time. Once the graphics appear, you can start using DragGAN.
The function of the operation interface is relatively simple, as shown in the figure above, click add point, click the area you want to change on the picture, and then click start to start adjusting the picture. Click save image to save the modified picture. Note: This software still has high requirements for the computer graphics card. If your GPU card configuration is low, please do not use the 1024 model, otherwise it will be stuck at the beginning, and you can only use the small size model.
Congratulations! You’ve successfully installed DragGAN AI on your Windows system. Now you can explore the possibilities offered by this powerful AI tool. Have fun generating stunning and imaginative images with DragGAN!
If you do not have a suitable GPU server, you can go to GPUMart dedicated GPU Servers to apply for a trial. We recommend Nvidia A40, Tesla V100 and GeForce RTX 4090 GPUs.