(self, frames)
| 67 | |
| 68 | |
| 69 | def tensor2video(self, frames): |
| 70 | frames = rearrange(frames, "C T H W -> T H W C") |
| 71 | frames = ((frames.float() + 1) * 127.5).clip(0, 255).cpu().numpy().astype(np.uint8) |
| 72 | frames = [Image.fromarray(frame) for frame in frames] |
| 73 | return frames |
| 74 | |
| 75 | |
| 76 | def calculate_noise_pred( |