For some reason, when you use process more than one image, surya/marker stalls permanently with 0% CPU and GPU utilization. This happens randomly, and I've got this stack trace when stopping the process with Ctrl + C:
File "/home/kavin/redacted/.venv/lib/python3.12/site-packages/surya/detection.py", line 136, in batch_text_detection
with ProcessPoolExecutor(max_workers=max_workers) as executor:
File "/home/kavin/.rye/py/cpython@3.12.4/lib/python3.12/concurrent/futures/_base.py", line 647, in exit
self.shutdown(wait=True)
File "/home/kavin/.rye/py/cpython@3.12.4/lib/python3.12/concurrent/futures/process.py", line 873, in shutdown
self._executor_manager_thread.join()
File "/home/kavin/.rye/py/cpython@3.12.4/lib/python3.12/threading.py", line 1147, in join
self._wait_for_tstate_lock()
File "/home/kavin/.rye/py/cpython@3.12.4/lib/python3.12/threading.py", line 1167, in _wait_for_tstate_lock
if lock.acquire(block, timeout):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For some reason, when you use process more than one image, surya/marker stalls permanently with 0% CPU and GPU utilization. This happens randomly, and I've got this stack trace when stopping the process with
Ctrl + C
: