(self, frames)
| 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): |