yuval-alaluf / hyperstyle

Official Implementation for "HyperStyle: StyleGAN Inversion with HyperNetworks for Real Image Editing" (CVPR 2022) https://arxiv.org/abs/2111.15666
https://yuval-alaluf.github.io/hyperstyle/
MIT License
1.01k stars 115 forks source link

hang forever!!! #36

Closed shenhaiyoulan closed 2 years ago

shenhaiyoulan commented 2 years ago

This is my environment:

_libgcc_mutex | 0.1 | 0.1 -- | -- | -- absl-py | 1.0.0 | 0.15.0 ca-certificates | 2020.4.5.1 | 2022.4.26 cachetools | 4.2.4 | 4.2.2 certifi | 2020.4.5.1 | 2021.10.8 charset-normalizer | 2.0.12 | 2.0.4 clip | 1.0 |   cycler | 0.11.0 | 0.11.0 dataclasses | 0.8 | 0.8 ftfy | 6.0.3 | 5.8 google-auth | 1.35.0 | 2.6.0 google-auth-oauthlib | 0.4.6 | 0.4.4 grpcio | 1.46.1 | 1.42.0 idna | 3.3 | 3.3 importlib-metadata | 4.8.3 | 4.11.3 kiwisolver | 1.3.1 | 1.3.2 libedit | 3.1.20181209 | 3.1.20210910 libffi | 3.2.1 | 3.4.2 libgcc-ng | 9.1.0 | 11.2.0 libstdcxx-ng | 9.1.0 | 11.2.0 markdown | 3.3.7 | 3.3.4 matplotlib | 3.2.1 | 3.5.1 ncurses | 6.2 | 6.3 ninja | 1.10.0 | 1.10.2 numpy | 1.18.4 | 1.22.3 oauthlib | 3.2.0 | 3.2.0 opencv-python | 4.5.5.64 |   openssl | 1.1.1g | 1.1.1o pillow | 7.1.2 | 9.0.1 pip | 20.0.2 | 21.2.4 protobuf | 3.19.4 | 3.20.1 pyasn1 | 0.4.8 | 0.4.8 pyasn1-modules | 0.2.8 | 0.2.8 pyparsing | 3.0.7 | 3.0.4 python | 3.6.7 | 3.10.4 python-dateutil | 2.8.2 | 2.8.2 python_abi | 3.6 |   readline | 7.0 | 8.1.2 regex | 2022.4.24 | 2022.3.15 requests | 2.27.1 | 2.27.1 requests-oauthlib | 1.3.1 | 1.3.0 rsa | 4.8 | 4.7.2 scipy | 1.4.1 | 1.7.3 setuptools | 46.4.0 | 61.2.0 six | 1.16.0 | 1.16.0 sqlite | 3.31.1 | 3.38.3 tensorboard | 2.2.1 | 2.6.0 tensorboard-plugin-wit | 1.8.1 | 1.6.0 tk | 8.6.8 | 8.6.11 torch | 1.10.0+cu102 |   torchvision | 0.11.0+cu102 | 0.8.2 tqdm | 4.46.0 | 4.64.0 typing-extensions | 4.1.1 | 4.1.1 urllib3 | 1.26.9 | 1.26.9 wcwidth | 0.2.5 | 0.2.5 werkzeug | 2.0.3 | 2.0.3 wheel | 0.34.2 | 0.37.1 xz | 5.2.5 | 5.2.5 zipp | 3.6.0 | 3.8.0 zlib | 1.2.11 | 1.2.12

when i try on my dataset,it hang forever! I notice the bug is in models/stylegan2/op/upfirdn2d.py This is my code:

python scripts/train.py \ --dataset_type=test \ --encoder_type=SharedWeightsHyperNetResNet \ --exp_dir=experiments/test \ --workers=1 \ --batch_size=1 \ --test_batch_size=1 \ --test_workers=1 \ --val_interval=5000 \ --save_interval=10000 \ --lpips_lambda=0.8 \ --l2_lambda=1 \ --moco_lambda=1 \ --n_iters_per_batch=1 \ --max_val_batches=150 \ --output_size=1024 \ --load_w_encoder \ --w_encoder_checkpoint_path=/home/sd01/hyperstyle-main/pretrained_models/faces_w_encoder.pt \ --layers_to_tune=0,2,3,5,6,8,9,11,12,14,15,17,18,20,21,23,24

More specifically, it is caused by the following code, can you help me solve this problem, it has been bothering me for a long time image

shenhaiyoulan commented 2 years ago

@yuval-alaluf

yuval-alaluf commented 2 years ago

Hi, this could be caused due to the CUDA kernel compilation being locked. Check out my comment here to see if this helps solve your issue: https://github.com/eladrich/pixel2style2pixel/issues/80#issuecomment-778637066

shenhaiyoulan commented 2 years ago

Thank you for your reply, it really helped me a lot!!!