File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -5270,7 +5270,7 @@ def load(
52705270
52715271 assert path .exists () and path .is_file ()
52725272
5273- package = torch .load (str (path ), map_location = map_location )
5273+ package = torch .load (str (path ), map_location = map_location , weights_only = True )
52745274
52755275 model_package = package ['model' ]
52765276 current_version = version ('alphafold3_pytorch' )
@@ -5293,7 +5293,7 @@ def init_and_load(
52935293
52945294 assert path .is_file ()
52955295
5296- package = torch .load (str (path ), map_location = map_location )
5296+ package = torch .load (str (path ), map_location = map_location , weights_only = True )
52975297
52985298 model_package = package ['model' ]
52995299
Original file line number Diff line number Diff line change @@ -584,7 +584,7 @@ def load(
584584
585585 # load optimizer and scheduler states
586586
587- package = torch .load (str (path ))
587+ package = torch .load (str (path ), weights_only = True )
588588
589589 unwrapped_optimizer = _unwrap_objects (self .optimizer )
590590
You can’t perform that action at this time.
0 commit comments