We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d4043c commit d5a4526Copy full SHA for d5a4526
1 file changed
docling_ibm_models/code_formula_model/models/sam.py
@@ -508,7 +508,7 @@ def _build_sam(
508
509
if checkpoint is not None:
510
# with open(checkpoint, "rb") as f:
511
- state_dict = torch.load(checkpoint)
+ state_dict = torch.load(checkpoint, weights_only=True)
512
513
image_encoder.load_state_dict(state_dict, strict=True)
514
return image_encoder
0 commit comments