Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data_path in initialize.py #2

Open
applepingping opened this issue Nov 10, 2023 · 2 comments
Open

data_path in initialize.py #2

applepingping opened this issue Nov 10, 2023 · 2 comments

Comments

@applepingping
Copy link

applepingping commented Nov 10, 2023

Is data_path in initialize.py the same as lmdb_path in img2lmdb.py? I use lmdb_path in img2lmdb.py as data_path in initialize.py. The error message is as follows. After a long time of debugging, the error still occurs.Could you please help me answer my question? Thank you!

PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7f642ed3a5e0>

@zh-ding
Copy link
Contributor

zh-ding commented Nov 21, 2023

It seems an error with lmdb file, can you try to check that the keys and files in the lmdb are correct?

@Meaoxixi
Copy link

Meaoxixi commented Jul 15, 2024

Is data_path in initialize.py the same as lmdb_path in img2lmdb.py? I use lmdb_path in img2lmdb.py as data_path in initialize.py. The error message is as follows. After a long time of debugging, the error still occurs.Could you please help me answer my question? Thank you!

PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7f642ed3a5e0>

Hi friend, I also encountered the same problem as yours when I used the ready-made ffhq256 data file provided in Guided-diffusion, but I solved it later.

The solution was to recompile the ffhq256 nearly 1TB png image dataset into an lmdb file (compiled using the author's img2Imdb.py after 2h30min), and then use initialize.py to get the semantic file. “data_path” in initialize.py is the same as “lmdb_path” in img2lmdb.py. Thanks again for the author's excellent work and open source sharing😀!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants