File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def load_state_dict(
4545 checkpoint_path : str ,
4646 use_ema : bool = True ,
4747 device : Union [str , torch .device ] = 'cpu' ,
48- weights_only : bool = False ,
48+ weights_only : bool = True ,
4949) -> Dict [str , Any ]:
5050 """Load state dictionary from checkpoint file.
5151
@@ -95,7 +95,7 @@ def load_checkpoint(
9595 strict : bool = True ,
9696 remap : bool = False ,
9797 filter_fn : Optional [Callable ] = None ,
98- weights_only : bool = False ,
98+ weights_only : bool = True ,
9999) -> Any :
100100 """Load checkpoint into model.
101101
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ def load_model_config_from_path(
213213def load_state_dict_from_hf (
214214 model_id : str ,
215215 filename : str = HF_WEIGHTS_NAME ,
216- weights_only : bool = False ,
216+ weights_only : bool = True ,
217217 cache_dir : Optional [Union [str , Path ]] = None ,
218218):
219219 assert has_hf_hub (True )
@@ -265,7 +265,7 @@ def load_state_dict_from_hf(
265265
266266def load_state_dict_from_path (
267267 path : str ,
268- weights_only : bool = False ,
268+ weights_only : bool = True ,
269269):
270270 found_file = None
271271 for fname in _PREFERRED_FILES :
You can’t perform that action at this time.
0 commit comments