def export_latents_to_video(self, latents: torch.FloatTensor, video_path: str, fps: int):
        r"""
        Decode latent vectors into video and export as video file.

        Args:
            latents (`torch.FloatTensor`): Encoded latents in `[B, F, D, H_latent, W_latent]` format from
                `encode_video_frames()`
            video_path (`str`): Output path for video file
            fps (`int`): Target frames per second for output video
        """
        video = self.decode_latents(latents)
        frames = self.video_processor.postprocess_video(video=video, output_type="pil")
        os.makedirs(os.path.dirname(video_path), exist_ok=True)
        export_to_video(video_frames=frames[0], output_video_path=video_path, fps=fps)

        Decode latent vectors into video and export as video file.

        Args:
            latents (`torch.FloatTensor`): Encoded latents in `[B, F, D, H_latent, W_latent]` format from
                `encode_video_frames()`
            video_path (`str`): Output path for video file
            fps (`int`): Target frames per second for output video
        
examples/community/cogvideox_ddim_inversion.py