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

How to limit VRam GPU usage #1326

Open
Pabloferex opened this issue Oct 22, 2024 · 2 comments
Open

How to limit VRam GPU usage #1326

Pabloferex opened this issue Oct 22, 2024 · 2 comments

Comments

@Pabloferex
Copy link

Is there anyway to limit the GPU VRam usage?

@romanvelichkin
Copy link

EasyOCR is based on PyTorch framework. If PyTorch has such an option, then it is possible. You can read PyTorch documentation and search for such an option.

@howff
Copy link

howff commented Dec 9, 2024

    import torch
    torch.cuda.set_per_process_memory_fraction(0.4, 0)

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