MCPcopy Create free account
hub / github.com/bbaaii/DreamDiffusion / load_model

Function load_model

code/sc_mbm/utils.py:98–101  ·  view source on GitHub ↗
(config, model, checkpoint_path )

Source from the content-addressed store, hash-verified

96
97
98def load_model(config, model, checkpoint_path ):
99 checkpoint = torch.load(checkpoint_path, map_location='cpu')
100 model.load_state_dict(checkpoint['model'])
101 print(f'Model loaded with {checkpoint_path}')
102
103def patchify(imgs, patch_size):
104 """

Callers

nothing calls this directly

Calls 1

load_state_dictMethod · 0.80

Tested by

no test coverage detected