fix: load code formula model with weights_only=True (#158)

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
This commit is contained in:
Panos Vagenas
2026-04-23 09:33:03 +02:00
committed by GitHub
parent 6d4043c67c
commit 2ebbcad084
@@ -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