MCPcopy Create free account
hub / github.com/OpenImagingLab/4DSloMo / tensor2video

Method tensor2video

FixModel.py:195–199  ·  view source on GitHub ↗
(self, frames)

Source from the content-addressed store, hash-verified

193 return {"clip_feature": clip_context, "y": y}
194
195 def tensor2video(self, frames):
196 frames = rearrange(frames, "C T H W -> T H W C")
197 frames = ((frames.float() + 1) * 127.5).clip(0, 255).cpu().numpy().astype(np.uint8)
198 frames = [Image.fromarray(frame) for frame in frames]
199 return frames
200
201
202 def prepare_extra_input(self, latents=None):

Callers 1

__call__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected