diff --git a/docling/pipeline/standard_pdf_pipeline.py b/docling/pipeline/standard_pdf_pipeline.py index 11466ec2..1c71bf7c 100644 --- a/docling/pipeline/standard_pdf_pipeline.py +++ b/docling/pipeline/standard_pdf_pipeline.py @@ -64,6 +64,12 @@ class StandardPdfPipeline(PaginatedPipeline): elif settings.artifacts_path is not None: artifacts_path = Path(settings.artifacts_path).expanduser() + if artifacts_path is not None and not artifacts_path.is_dir(): + raise RuntimeError( + f"The value of {artifacts_path=} is not valid. " + "When defined, it must point to a folder containing all models required by the pipeline." + ) + self.keep_images = ( self.pipeline_options.generate_page_images or self.pipeline_options.generate_picture_images