Repository: DS4SD/docling
Issue category: Bug Report

Unable to run.
### Bug
<!-- Describe the buggy behavior you have observed. -->
PS C:\Users\genco> & C:/ProgramData/anaconda3/envs/docling/python.exe c:/Users/genco/OneDrive/Documents/marker_new/docling_convertor_testing.py
Fetching 9 files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 9/9 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "c:\Users\genco\OneDrive\Documents\marker_new\docling_convertor_testing.py", line 5, in <module>
    result = converter.convert(source)
  File "C:\ProgramData\anaconda3\envs\docling\lib\site-packages\pydantic\validate_call_decorator.py", line 60, in wrapper_function
    return validate_call_wrapper(*args, **kwargs)
  File "C:\ProgramData\anaconda3\envs\docling\lib\site-packages\pydantic\_internal\_validate_call.py", line 96, in __call__
    res = self.__pydantic_validator__.validate_python(pydantic_core.ArgsKwargs(args, kwargs))
  File "C:\ProgramData\anaconda3\envs\docling\lib\site-packages\docling\document_converter.py", line 161, in convert
    return next(all_res)
  File "C:\ProgramData\anaconda3\envs\docling\lib\site-packages\docling\document_converter.py", line 180, in convert_all
    for conv_res in conv_res_iter:
  File "C:\ProgramData\anaconda3\envs\docling\lib\site-packages\docling\document_converter.py", line 211, in _convert
    for item in map(
  File "C:\ProgramData\anaconda3\envs\docling\lib\site-packages\docling\document_converter.py", line 255, in _process_document
    conv_res = self._execute_pipeline(in_doc, raises_on_error=raises_on_error)
  File "C:\ProgramData\anaconda3\envs\docling\lib\site-packages\docling\document_converter.py", line 263, in _execute_pipeline
    pipeline = self._get_pipeline(in_doc.format)
  File "C:\ProgramData\anaconda3\envs\docling\lib\site-packages\docling\document_converter.py", line 244, in _get_pipeline
    self.initialized_pipelines[pipeline_class] = pipeline_class(
  File "C:\ProgramData\anaconda3\envs\docling\lib\site-packages\docling\pipeline\standard_pdf_pipeline.py", line 54, in __init__
    self.glm_model = GlmModel(options=GlmOptions())
  File "C:\ProgramData\anaconda3\envs\docling\lib\site-packages\docling\models\ds_glm_model.py", line 46, in __init__
    load_pretrained_nlp_models()
  File "C:\ProgramData\anaconda3\envs\docling\lib\site-packages\deepsearch_glm\utils\load_pretrained_models.py", line 120, in load_pretrained_nlp_models
    done, data = download_items(downloads)
  File "C:\ProgramData\anaconda3\envs\docling\lib\site-packages\deepsearch_glm\utils\load_pretrained_models.py", line 50, in download_items
    with target.open("wb") as fw:
  File "C:\ProgramData\anaconda3\envs\docling\lib\pathlib.py", line 1119, in open
    return self._accessor.open(self, mode, buffering, encoding, errors,
PermissionError: [Errno 13] Permission denied: 'C:\\ProgramData\\anaconda3\\envs\\docling\\lib\\site-packages\\deepsearch_glm\\resources\\models\\crf\\part-of-speech\\crf_pos_model_en.bin'
### Steps to reproduce
<!-- Describe the sequence of steps for reproducing the bug. -->
run code: 
from docling.document_converter import DocumentConverter

source = "https://arxiv.org/pdf/2408.09869"  # PDF path or URL
converter = DocumentConverter()
result = converter.convert(source)
print(result.document.export_to_markdown())  # output: "### Docling Technical Report[...]"

### Docling version
<!-- Copy the output of `docling --version`. -->
latest version.

### Python version
<!-- Copy the output of `python --version`. -->
3.10.15

<!-- ⚠️ ATTENTION: When sharing screenshots, attachments, or other data make sure not to include any sensitive information. -->



Functions to edit:
docling/models/ds_glm_model.py:GlmModel.__init__

Patch:
diff --git a/docling/models/ds_glm_model.py b/docling/models/ds_glm_model.py
index e63bad3a..0a066bfa 100644
--- a/docling/models/ds_glm_model.py
+++ b/docling/models/ds_glm_model.py
@@ -43,7 +43,8 @@ class GlmModel:
     def __init__(self, options: GlmOptions):
         self.options = options
 
-        load_pretrained_nlp_models()
+        if self.options.model_names != "":
+            load_pretrained_nlp_models()
         self.model = init_nlp_model(model_names=self.options.model_names)
 
     def _to_legacy_document(self, conv_res) -> DsDocument: