Skip to content

Commit 8ee1da8

Browse files
authored
Merge pull request #853 from CiaranYoung/master
Update pdf_extract_kit.py
2 parents db01bcd + fb6cb8b commit 8ee1da8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

magic_pdf/model/pdf_extract_kit.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ def __call__(self, image):
393393
elif int(res['category_id']) in [5]:
394394
table_res_list.append(res)
395395

396-
if torch.cuda.is_available():
396+
if torch.cuda.is_available() and self.device != 'cpu':
397397
properties = torch.cuda.get_device_properties(self.device)
398398
total_memory = properties.total_memory / (1024 ** 3) # 将字节转换为 GB
399399
if total_memory <= 10:

0 commit comments

Comments
 (0)