eladrich / pixel2style2pixel

Official Implementation for "Encoding in Style: a StyleGAN Encoder for Image-to-Image Translation" (CVPR 2021) presenting the pixel2style2pixel (pSp) framework
https://eladrich.github.io/pixel2style2pixel/
MIT License
3.19k stars 570 forks source link

the output image become brown #312

Closed nanamaru0203 closed 1 year ago

nanamaru0203 commented 1 year ago

When I run "ffhq_encode" in inference_playground.ipynb, I got incorrect output like this png file. 6b8943ae-933d-4c99-9bd4-4c1cb6b0e9ce_480 Do you know why I can get this result? When I run the same code in Google colab, I could get the correct image. So, maybe it's the problem about my environment.

My environment is here WSL2 (Ubuntu 22.04.2 LTS) # Name Version Build Channel _libgcc_mutex 0.1 main conda-forge absl-py 1.4.0 pypi_0 pypi blas 1.0 mkl bzip2 1.0.8 h7b6447c_0 ca-certificates 2020.4.5.1 hecc5488_0 conda-forge cachetools 4.2.4 pypi_0 pypi certifi 2020.4.5.1 py36h9f0ad1d_0 conda-forge charset-normalizer 2.0.12 pypi_0 pypi cuda-cudart 11.8.89 0 nvidia cuda-cupti 11.8.87 0 nvidia cuda-libraries 11.8.0 0 nvidia cuda-nvrtc 11.8.89 0 nvidia cuda-nvtx 11.8.86 0 nvidia cuda-runtime 11.8.0 0 nvidia cudatoolkit 11.1.74 h6bb024c_0 nvidia cycler 0.11.0 pypi_0 pypi dataclasses 0.8 pyh4f3eec9_6 ffmpeg 4.3 hf484d3e_0 pytorch freetype 2.11.0 h70c0345_0 future 0.18.3 pypi_0 pypi gmp 6.2.1 h295c915_3 gnutls 3.6.15 he1e5248_0 google-auth 1.35.0 pypi_0 pypi google-auth-oauthlib 0.4.6 pypi_0 pypi grpcio 1.48.2 pypi_0 pypi idna 3.4 pypi_0 pypi importlib-metadata 4.8.3 pypi_0 pypi intel-openmp 2022.0.1 h06a4308_3633 jpeg 9e h7f8727e_0 kiwisolver 1.3.1 pypi_0 pypi lame 3.100 h7b6447c_0 lcms2 2.12 h3be6417_0 libcublas 11.11.3.6 0 nvidia libcufft 10.9.0.58 0 nvidia libcufile 1.6.0.25 0 nvidia libcurand 10.3.2.56 0 nvidia libcusolver 11.4.1.48 0 nvidia libcusparse 11.7.5.86 0 nvidia libedit 3.1.20181209 hc058e9b_0 libffi 3.2.1 hd88cf55_4 libgcc-ng 9.1.0 hdf63c60_0 libiconv 1.16 h7f8727e_2 libidn2 2.3.2 h7f8727e_0 libnpp 11.8.0.86 0 nvidia libnvjpeg 11.9.0.86 0 nvidia libpng 1.6.37 hbc83047_0 libstdcxx-ng 9.1.0 hdf63c60_0 libtasn1 4.16.0 h27cfd23_0 libtiff 4.1.0 h2733197_1 libunistring 0.9.10 h27cfd23_0 libuv 1.40.0 h7b6447c_0 lz4-c 1.9.3 h295c915_1 markdown 3.3.7 pypi_0 pypi matplotlib 3.2.1 pypi_0 pypi mkl 2020.2 256 mkl-service 2.3.0 py36he8ac12f_0 mkl_fft 1.3.0 py36h54f3939_0 mkl_random 1.1.1 py36h0573a6f_0 ncurses 6.2 he6710b0_1 nettle 3.7.3 hbbd107a_1 ninja 1.10.0 hc9558a2_0 conda-forge numpy 1.18.4 pypi_0 pypi numpy-base 1.19.2 py36hfa32c7d_0 oauthlib 3.2.2 pypi_0 pypi olefile 0.46 py36_0 opencv-python 4.2.0.34 pypi_0 pypi openh264 2.1.1 h4ff587b_0 openjpeg 2.4.0 h3ad879b_0 openssl 1.1.1g h516909a_0 conda-forge pillow 7.1.2 pypi_0 pypi pip 20.0.2 py36_3 protobuf 3.19.6 pypi_0 pypi pyasn1 0.4.8 pypi_0 pypi pyasn1-modules 0.2.8 pypi_0 pypi pyparsing 3.0.7 pypi_0 pypi python 3.6.7 h0371630_0 python-dateutil 2.8.2 pypi_0 pypi python_abi 3.6 1_cp36m conda-forge pytorch 1.10.2 py3.6_cuda11.1_cudnn8.0.5_0 pytorch pytorch-cuda 11.8 h7e8668a_3 pytorch pytorch-mutex 1.0 cuda pytorch readline 7.0 h7b6447c_5 requests 2.27.1 pypi_0 pypi requests-oauthlib 1.3.1 pypi_0 pypi rsa 4.9 pypi_0 pypi scipy 1.4.1 pypi_0 pypi setuptools 46.4.0 py36_0 six 1.16.0 pyhd3eb1b0_1 sqlite 3.31.1 h62c20be_1 tensorboard 2.2.1 pypi_0 pypi tensorboard-plugin-wit 1.8.1 pypi_0 pypi tk 8.6.8 hbc83047_0 torch 1.6.0 pypi_0 pypi torchaudio 0.10.2 py36_cu111 pytorch torchvision 0.4.2 pypi_0 pypi tqdm 4.46.0 pypi_0 pypi typing_extensions 4.1.1 pyh06a4308_0 urllib3 1.26.15 pypi_0 pypi werkzeug 2.0.3 pypi_0 pypi wheel 0.34.2 py36_0 conda-forge xz 5.2.5 h7b6447c_0 zipp 3.6.0 pypi_0 pypi zlib 1.2.11 h7b6447c_3 zstd 1.4.9 haebb681_0

LightingMc commented 1 year ago

It could be a mod collapse or NaN values.

nanamaru0203 commented 1 year ago

I didn't modify any code in inference_playground.ipynb but this problem happened. Do you know what cause this problem?

yuval-alaluf commented 1 year ago

Are you running in the conda environment provided in this repo? If not please give that a try to see if it solves your issue.