(cfg, ckpt, strict=True)
| 39 | |
| 40 | # Load Syncdreamer Model |
| 41 | def load_model(cfg, ckpt, strict=True): |
| 42 | config = OmegaConf.load(cfg) |
| 43 | model = instantiate_from_config(config.model) |
| 44 | print(f'loading model from {ckpt} ...') |
| 45 | ckpt = torch.load(ckpt, map_location='cpu', weights_only=True) |
| 46 | model.load_state_dict(ckpt['state_dict'], strict=strict) |
| 47 | model = model.cuda().eval() |
| 48 | return model |
| 49 | |
| 50 | |
| 51 | # Prepare Syncdreamer Input |
no test coverage detected
searching dependent graphs…