MCPcopy Index your code
hub / github.com/hpcaitech/Open-Sora / writeFlow

Function writeFlow

tools/frame_interpolation/utils/utils.py:240–245  ·  view source on GitHub ↗
(name, flow)

Source from the content-addressed store, hash-verified

238
239
240def writeFlow(name, flow):
241 f = open(name, "wb")
242 f.write("PIEH".encode("utf-8"))
243 np.array([flow.shape[1], flow.shape[0]], dtype=np.int32).tofile(f)
244 flow = flow.astype(np.float32)
245 flow.tofile(f)
246
247
248def readFloat(name):

Callers 1

writeFunction · 0.85

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected