Spaces:
Runtime error
Runtime error
envs
Browse files228 unmodified lines229230231232232233234235228 unmodified linesdef load_model(model, model_path): if model_path != "": print(f"init model from checkpoint: {model_path}") model_ckpt = torch.load(model_path, map_location="cuda") model_ckpt = torch.load(model_path, map_location="cpu") if "global_step" in model_ckpt: print(f"global_step: {model_ckpt['global_step']}") state_dict = model_ckpt["state_dict"] if "state_dict" in model_ckpt else model_ckpt m, u = model.load_state_dict(state_dict, strict=False)utils/utils.py+1-1