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

CUDA out of memory, for processing images one after the other. #304

Open
mw-sturai opened this issue Feb 5, 2025 · 0 comments
Open

CUDA out of memory, for processing images one after the other. #304

mw-sturai opened this issue Feb 5, 2025 · 0 comments

Comments

@mw-sturai
Copy link

mw-sturai commented Feb 5, 2025

Works in v0.6.13 very well with this technique:

batch_copy = deepcopy(image_batch)
predictions: list[OCRResult] = run_ocr(
                    batch_copy,
                    allowed_langs,
                    cls.det_model,
                    cls.det_processor,
                    cls.rec_model,
                    cls.rec_processor,
                    batch_size=len(image_batch),
                )

where as in v0.10.2 using the latest:

batch_copy = deepcopy(image_batch)
predictions: list[OCRResult] = recognition_predictor(
                    batch_copy,
                    allowed_langs,
                    cls.detection_predictor,
                )

It creates a memory stacking in the GPU, and doesn't release it.

Image
Image

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

1 participant