MCPcopy
hub / github.com/hpcaitech/Open-Sora / load_model

Function load_model

tools/frame_interpolation/interpolation.py:93–102  ·  view source on GitHub ↗

load the frame interpolation model.

(ckpt)

Source from the content-addressed store, hash-verified

91
92
93def load_model(ckpt):
94 """
95 load the frame interpolation model.
96 """
97 params = network_cfg.get("params", {})
98 model = Model(**params)
99 model.load_state_dict(ckpt["state_dict"])
100 model = model.to(device)
101 model.eval()
102 return model
103
104
105def interpolater(model, inputs, scale, padder, iters=1):

Callers 1

interpolation.pyFile · 0.85

Calls 4

ModelClass · 0.85
getMethod · 0.80
toMethod · 0.80
load_state_dictMethod · 0.45

Tested by

no test coverage detected