Open kyleliang919 opened 2 years ago
I have the same error. Have you fix this error? please tell me. Thank you very much.
This error occurs because instead of sending the file right away, the Google server responds with a message that it can't scan the file for viruses and then waits for a response.
I had to change the url for the json-File from:
json_spec = dict(file_url='https://drive.google.com/uc?id=16N0RV4fHI6joBuKbQAoG34V_cQk7vxSA', file_path='ffhq-dataset-v2.json', file_size=267793842, file_md5='425ae20f06a4da1d4dc0f46d40ba5fd6')
to:
json_spec = dict(file_url='https://drive.google.com/uc?export=download&id=16N0RV4fHI6joBuKbQAoG34V_cQk7vxSA', file_path='ffhq-dataset-v2.json', file_size=267793842, file_md5='425ae20f06a4da1d4dc0f46d40ba5fd6')
So basically just added export=download&
.
Then the file downloaded properly for me.
Using @nikolaireinke's fix is still giving me the same error.
python download_ffhq.py --json --images
Downloading JSON metadata...
- 0.00% done 1/2 files 0.00/0.25 GB 0.00 B/s ETA: ... Traceback (most recent call last):
File "download_ffhq.py", line 445, in <module>
run_cmdline(sys.argv)
File "download_ffhq.py", line 440, in run_cmdline
run(**vars(args))
File "download_ffhq.py", line 387, in run
download_files([json_spec, license_specs['json']], **download_kwargs)
File "download_ffhq.py", line 205, in download_files
raise exc_info[1].with_traceback(exc_info[2])
File "download_ffhq.py", line 214, in _download_thread
download_file(session, spec, stats, **download_kwargs)
File "download_ffhq.py", line 84, in download_file
raise IOError('Incorrect file size', file_path)
OSError: [Errno Incorrect file size] ffhq-dataset-v2.json
@Sid-XXD hi were you able to train the model with ffhq dataset or any other dataset? please can you help me thank you
@Sid-XXD hi were you able to train the model with ffhq dataset or any other dataset? please can you help me thank you
Hi jasurity, I'm sorry that I haven't worked in face images for a long time. I remember the CelebaA-HQ dataset that I may have used before, which may be helpful to you.
In the repo you'll find a file called download_ffhq.py
which has a json_spec
line at the top with a file url, if you go to that url in your browser and download the json, then put the downloaded json file in the same folder from which you're calling download_ffhq.py
, it will work as expected.
The issue is that google drive now shows a prompt that the file is to big to scan for viruses, if you look at the json file the script downloads, it's just the html for that virus-scanning prompt.