Running PyMuPDFLoader with GPU Acceleration for OCR #26808
Replies: 1 comment
-
The However, the class does have dependencies or imports that could potentially be modified to support GPU acceleration. Specifically, it imports the try:
import fitz # noqa:F401
except ImportError:
raise ImportError(
"`PyMuPDF` package not found, please install it with "
"`pip install pymupdf`"
) To support GPU acceleration, you would need to look into whether For GPU acceleration, you might also want to explore other libraries or frameworks that support GPU-accelerated OCR and integrate them with If you have any further questions or need additional assistance, feel free to ask! |
Beta Was this translation helpful? Give feedback.
-
Checked other resources
Commit to Help
Example Code
Description
I’m using PyMuPDFLoader from LangChain, which relies on RapidOCR for text extraction when OCR is enabled. I noticed that it currently uses the CPU for processing by default. I wanted to check if there’s a way to enable GPU acceleration for this process in PyMuPDFLoader.
I’ve already opened a discussion in the RapidOCR repository regarding GPU support. However, since PyMuPDFLoader integrates RapidOCR for OCR functionality, I wanted to ask here as well.
Is there any way to run this with GPU acceleration when OCR is enabled in PyMuPDFLoader? Any guidance would be greatly appreciated!
Thanks in advance!
System Info
langchain==0.2.15
langchain-chroma==0.1.2
langchain-community==0.2.12
langchain-core==0.2.40
langchain-text-splitters==0.2.4
Beta Was this translation helpful? Give feedback.
All reactions