Fix exposure encoding checkpoint loading
This commit is contained in:
@@ -67,6 +67,11 @@ def main() -> None:
|
||||
if output_path.exists() and not args.overwrite:
|
||||
raise FileExistsError(f"{output_path} exists; pass --overwrite")
|
||||
|
||||
try:
|
||||
checkpoint_data = torch.load(
|
||||
args.checkpoint, map_location="cpu", weights_only=False
|
||||
)
|
||||
except TypeError:
|
||||
checkpoint_data = torch.load(args.checkpoint, map_location="cpu")
|
||||
model_cfg = checkpoint_data["model_config"]
|
||||
normalization = checkpoint_data["normalization"]
|
||||
|
||||
Reference in New Issue
Block a user