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

Bug - Setting "offload_to_cpu" to True causes Error #105

Open
Angel996 opened this issue Jan 18, 2025 · 1 comment
Open

Bug - Setting "offload_to_cpu" to True causes Error #105

Angel996 opened this issue Jan 18, 2025 · 1 comment
Assignees

Comments

@Angel996
Copy link

Angel996 commented Jan 18, 2025

If offload_to_cpu parameter is TRUE and torch.cuda.is_available()==false, the script throws an error msg:

"TypeError '<' not supported between instances of 'NoneType' and 'int'

The error is caused by line 282 in inference.py:

offload_to_cpu = False if not args.offload_to_cpu else get_total_gpu_memory() < 30

To fix this, get_total_gpu_memory() should probably return 0 instead of None if CUDA is not available.

@yoavhacohen
Copy link
Collaborator

Thanks for reporting this issue. We will fix this.

@yoavhacohen yoavhacohen self-assigned this Jan 21, 2025
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

2 participants