Spaces:
Running
on
Zero
Running
on
Zero
, weights_only=True
Browse files- 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
|