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

Function tensor2img

tools/frame_interpolation/utils/utils.py:89–90  ·  view source on GitHub ↗
(img_t)

Source from the content-addressed store, hash-verified

87
88
89def tensor2img(img_t):
90 return (img_t * 255.0).detach().squeeze(0).permute(1, 2, 0).cpu().numpy().clip(0, 255).astype(np.uint8)
91
92
93def seed_all(seed):

Callers 1

writeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected