genforce / idinvert

[ECCV 2020] In-Domain GAN Inversion for Real Image Editing
https://genforce.github.io/idinvert/
MIT License
461 stars 65 forks source link

Error in Inversion Task #52

Closed ckorgial closed 3 years ago

ckorgial commented 3 years ago

Hello !

could anyone help me find a solution for this Error?

InvalidArgumentError (see above for traceback): Default AvgPoolingOp only supports NHWC on device type CPU [[node E_gpu0_1/Downscale2D/AvgPool (defined at :244) = AvgPoolT=DT_FLOAT, data_format="NCHW", ksize=[1, 1, 2, 2], padding="VALID", strides=[1, 1, 2, 2], _device="/job:localhost/replica:0/task:0/device:CPU:0"]]

I have already installed the correct libraries and the correct python version. I also installed the pretrained model face_256x256 from the Google Drive.

I run this command

python invert.py styleganinv_face_256.pkl examples/test.list

zhujiapeng commented 3 years ago

You need to run those scripts on GPU. Make sure you have installed the TensorFlow with GPU.

ckorgial commented 3 years ago

Thank you so much for your response !! I have solved my issue by installing tensorflow-gpu !!