Fabrice-TIERCELIN commited on
Commit
a35f176
·
verified ·
1 Parent(s): 6df7fee

, weights_only=True

Browse files
Files changed (1) hide show
  1. hyvideo/inference.py +1 -1
hyvideo/inference.py CHANGED
@@ -338,7 +338,7 @@ class Inference(object):
338
  if not model_path.exists():
339
  raise ValueError(f"model_path not exists: {model_path}")
340
  logger.info(f"Loading torch model {model_path}...")
341
- state_dict = torch.load(model_path, map_location=lambda storage, loc: storage)
342
 
343
  if bare_model == "unknown" and ("ema" in state_dict or "module" in state_dict):
344
  bare_model = False
 
338
  if not model_path.exists():
339
  raise ValueError(f"model_path not exists: {model_path}")
340
  logger.info(f"Loading torch model {model_path}...")
341
+ state_dict = torch.load(model_path, weights_only=True, map_location=lambda storage, loc: storage)
342
 
343
  if bare_model == "unknown" and ("ema" in state_dict or "module" in state_dict):
344
  bare_model = False