NVlabs / denoising-diffusion-gan

Tackling the Generative Learning Trilemma with Denoising Diffusion GANs https://arxiv.org/abs/2112.07804
Other
697 stars 77 forks source link

No module named 'fused' #39

Open cakiray opened 1 year ago

cakiray commented 1 year ago

Hello, I try to run this repository. But I had the following error when I train the model.

Traceback (most recent call last): File "train_ddgan.py", line 609, in <module> init_processes(0, size, train, args) File "train_ddgan.py", line 478, in init_processes fn(rank, gpu, args) File "train_ddgan.py", line 192, in train from score_sde.models.discriminator import Discriminator_small, Discriminator_large File "/home/ibakkaya/Desktop/denoising-diffusion-gan/score_sde/models/discriminator.py", line 11, in <module> from . import up_or_down_sampling File "/home/ibakkaya/Desktop/denoising-diffusion-gan/score_sde/models/up_or_down_sampling.py", line 15, in <module> from score_sde.op import upfirdn2d File "/home/ibakkaya/Desktop/denoising-diffusion-gan/score_sde/op/__init__.py", line 1, in <module> from .fused_act import FusedLeakyReLU, fused_leaky_relu File "/home/ibakkaya/Desktop/denoising-diffusion-gan/score_sde/op/fused_act.py", line 23, in <module> os.path.join(module_path, "fused_bias_act_kernel.cu"), File "/home/ibakkaya/Desktop/denoising-diffusion-gan/env/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1091, in load keep_intermediates=keep_intermediates) File "/home/ibakkaya/Desktop/denoising-diffusion-gan/env/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1317, in _jit_compile return _import_module_from_library(name, build_directory, is_python_module) File "/home/ibakkaya/Desktop/denoising-diffusion-gan/env/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1699, in _import_module_from_library file, path, description = imp.find_module(module_name, [path]) File "/home/ibakkaya/miniconda3/lib/python3.7/imp.py", line 296, in find_module raise ImportError(_ERR_MSG.format(name), name=name) ImportError: No module named 'fused'

Could you help me to solve this problem?

Thanks.

nitec427 commented 11 months ago

Hi cakiray, the problem you're facing is because of your environment probably. I had faced similar issue during the setup for my training as well. Check your environment information, and torch version and may be upgrade it if your torch <= 1.8 to 1.12 or 1.13 they are more stable.