We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents db01bcd + fb6cb8b commit 8ee1da8Copy full SHA for 8ee1da8
magic_pdf/model/pdf_extract_kit.py
@@ -393,7 +393,7 @@ def __call__(self, image):
393
elif int(res['category_id']) in [5]:
394
table_res_list.append(res)
395
396
- if torch.cuda.is_available():
+ if torch.cuda.is_available() and self.device != 'cpu':
397
properties = torch.cuda.get_device_properties(self.device)
398
total_memory = properties.total_memory / (1024 ** 3) # 将字节转换为 GB
399
if total_memory <= 10:
0 commit comments