explosion / explosion/spacy-layout

layout() does not seem to respect spacy.require_cpu()

Open
#37 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
911
Forks
64
PR merge metrics
No merged PRs in 30d

Description

I am trying to use spacy-layout (0.0.12) and spacy (3.8.4) on CPU for testing on an older machine. I am getting an OOM memory "CUDA out of memory (...)" when running (with a small test set of 14 files):

```
import spacy
from spacy_layout import spaCyLayout

spacy.require_cpu()
nlp = spacy.blank("en")

filepaths =

docs = layout.pipe(filepaths)
for doc in docs:
print(doc.text)
```

returns: "torch.OutOfMemoryError: CUDA out of memory. Tried to allocate (...)"

Does spacy-layout always require a GPU? talks about how "Docling runs at 1-3 pages per second on CPU (...)", which is why I thought this might work on CPU.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.