From 4d92052be0d45f66426757bf0fc47cecc9c3a9b6 Mon Sep 17 00:00:00 2001 From: AGI <33508327+agipro@users.noreply.github.com> Date: Sat, 23 Aug 2025 22:23:31 +0800 Subject: [PATCH] fix: model loading pytorch >= 2.6 --- dust3r/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dust3r/model.py b/dust3r/model.py index a245d4e..0eb8884 100644 --- a/dust3r/model.py +++ b/dust3r/model.py @@ -27,7 +27,7 @@ def load_model(model_path, device, verbose=True): if verbose: print('... loading model from', model_path) - ckpt = torch.load(model_path, map_location='cpu') + ckpt = torch.load(model_path, map_location='cpu', weights_only=False) args = ckpt['args'].model.replace("ManyAR_PatchEmbed", "PatchEmbedDust3R") if 'landscape_only' not in args: args = args[:-1] + ', landscape_only=False)'