mirror of
https://github.com/docling-project/docling-ibm-models.git
synced 2026-05-17 13:10:52 +00:00
fix: load code formula model with weights_only=True (#158)
Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
This commit is contained in:
@@ -508,7 +508,7 @@ def _build_sam(
|
||||
|
||||
if checkpoint is not None:
|
||||
# with open(checkpoint, "rb") as f:
|
||||
state_dict = torch.load(checkpoint)
|
||||
state_dict = torch.load(checkpoint, weights_only=True)
|
||||
|
||||
image_encoder.load_state_dict(state_dict, strict=True)
|
||||
return image_encoder
|
||||
|
||||
Reference in New Issue
Block a user