Skip to content

Commit

Permalink
Merge pull request #853 from CiaranYoung/master
Browse files Browse the repository at this point in the history
Update pdf_extract_kit.py
  • Loading branch information
myhloli authored Nov 4, 2024
2 parents db01bcd + fb6cb8b commit 8ee1da8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion magic_pdf/model/pdf_extract_kit.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def __call__(self, image):
elif int(res['category_id']) in [5]:
table_res_list.append(res)

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

0 comments on commit 8ee1da8

Please sign in to comment.