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

Prevent image files to be kept open #309

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jkulhanek
Copy link

The datasets opens image files and keeps them open. This causes "Too many open files" errors with large datasets. This PR copies the PIL images and closes the file handles.

@awilliamson
Copy link

Confirmed. I had an immediate issue trying to train a dataset with 1500 images. Python error for too many files open. I've checked out the PR and confirmed it proceeds beyond image loading. People may still have issues with large datasets due to VRAM limitations (Even on 24GB I had OOM).

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

Successfully merging this pull request may close these issues.

2 participants