(texts, save_dir, iterations)
| 35 | |
| 36 | |
| 37 | def save_texts(texts, save_dir, iterations): |
| 38 | output_path = os.path.join(save_dir, f"{str(iterations).zfill(8)}") |
| 39 | with open(output_path, "w", encoding="utf-8") as f: |
| 40 | for text in texts: |
| 41 | f.write(text + "\n") |
| 42 | |
| 43 | |
| 44 | def save_video_as_grid_and_mp4(video_batch: torch.Tensor, save_path: str, T: int, fps: int = 5, args=None, key=None): |