Nvidia Only ?
I am trying to use but I get this error:
python gradio_app.py
C:\Program Files\Python39\lib\site-packages\torch\utils\cpp_extension.py:358: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
Traceback (most recent call last):
File "E:\000000000\DragGAN-main\gradio_app.py", line 9, in <module>
from drag_gan import drag_gan, stylegan2
File "E:\000000000\DragGAN-main\drag_gan.py", line 12, in <module>
from stylegan2.model import Generator
File "E:\000000000\DragGAN-main\stylegan2\model.py", line 8, in <module>
from .op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d, conv2d_gradfix
File "E:\000000000\DragGAN-main\stylegan2\op\__init__.py", line 1, in <module>
from .fused_act import FusedLeakyReLU, fused_leaky_relu
File "E:\000000000\DragGAN-main\stylegan2\op\fused_act.py", line 11, in <module>
fused = load(
File "C:\Program Files\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 1284, in load
return _jit_compile(
File "C:\Program Files\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 1508, in _jit_compile
_write_ninja_file_and_build_library(
File "C:\Program Files\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 1600, in _write_ninja_file_and_build_library
extra_ldflags = _prepare_ldflags(
File "C:\Program Files\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 1703, in _prepare_ldflags
extra_ldflags.append(f'/LIBPATH:{_join_cuda_home("lib", "x64")}')
File "C:\Program Files\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 2230, in _join_cuda_home
raise EnvironmentError('CUDA_HOME environment variable is not set. '
OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
Can you tell us if is a NVIDIA GPU is necessary to use DragGan ?
Yes, you need GPU. It might be possible to run it with CPU, but it would be extremely slow and I didn't try it.
I get this error aswell.
I have an NVIDIA gpu.
Stable diffusion runs fine on it on this install.
torch.cuda.is_available() returns true
i am using ubuntu
I get this error aswell. I have an NVIDIA gpu. Stable diffusion runs fine on it on this install.
torch.cuda.is_available()returns truei am using ubuntu
You need CUDA installed to compile the custom ops of stylegan2.
Please refer to https://developer.nvidia.com/cuda-downloads
@Zeqiang-Lai I currently do not have a Nvidia GPU but was thinking about buying one. Do you have any recommendations for GPUs that work very well with your DragGAN implementation?
@Zeqiang-Lai I currently do not have a Nvidia GPU but was thinking about buying one. Do you have any recommendations for GPUs that work very well with your DragGAN implementation?
I would recommend Nvidia 3090/4090 with 24GB video memory. They works perfect for me.
This implementation need a lot video memory, 9 GB at least for 1024x1024 pictures btw.