MTC-VAE: Multi-Level Temporal Compression with Content Awareness Yubo Dong, Linchao Zhu Abstract Latent Video Diffusion Models (LVDMs) rely on Variational Autoencoders (VAEs) to compress videos into compact latent representations. For continuous Variational Autoencoders (VAEs), achieving higher compression rates is desirable; yet, the efficiency notably declines when extra sampling layers are added without expanding the dimensions of hidden channels. In this paper, we present a technique to convert fixed compression rate VAEs into models that support multi-level temporal compression, providing a straightforward and minimal fine-tuning approach to counteract performance decline at elevated compression rates.Moreover, we examine how varying compression levels impact model performance over video segments with diverse characteristics, offering empirical evidence on the effectiveness of our proposed approach. We also investigate the integration of our multi-level temporal compression VAE with diffusion-based generative models, DiT, highlighting successful concurrent training and compatibility within these frameworks. This investigation illustrates the potential uses of multi-level temporal compression. 1 Introduction The field of video generation has attracted considerable interest from both academia and industry, notably following OpenAI’s announcement of SORA [ 4 ] . Presently, Latent Video Diffusion Models (LVDMs) like MagicTime [ 37 ] , VideoComposer [ 31 ] , AnimateDiff [ 10 ] , Stable Video Diffusion (SVD) [ 3 ] , HiGen [ 24 ] , Latte [ 19 ] , SORA [ 4 ] , Open-Sora [ 41 ] , Open-Sora-Plan [ 17 ] , CogVideo [ 11 ] , CogVideoX [ 34 ] and Hunyuan-DiT [ 18 ] have come to lead the video generation space due to their reliability, performance, and adaptability. The common workflow among these LVDMs involves using Variational Autoencoders (VAEs) [ 15 ] to compress original videos into latent variables. Subsequently, denoisers are trained to estimate the noise applied to these compacted forms. The Stable Diffusion VAE (SD-VAE) [ 25 , 23 ] , employed by LVDMs, focuses on compressing individual image frames without accounting for temporal consistency, which leads to increased input sizes and hardware needs while diminishing the quality and accuracy of reconstruction. Prior studies have investigated the use of VQ-VAEs [ 29 ] for temporal compression in video generation by transforming videos into discrete tokens for autoregressive models [ 33 , 9 , 35 , 36 ] . VideoVAE is a critical component for LVDM. Previous approaches, like Stable Video Diffusion VAE (SVD-VAE) [ 3 ] , OD-VAE [ 17 ] , and CV-VAE [ 40 ] , integrate temporal data and prioritize enhancing quality with predetermined compression rates. These methods encode video segments into latents simultaneously for greater efficiency and later combine them for diffusion training. In the inference phase, a diffusion transformer generates the latent video from text prompts. It then divides this latent video into segments, which are individually decoded into videos using the VAE decoder. These segments are subsequently merged. Due to varying video dynamics, the predefined temporal compression rates may not suit all video segments. To investigate the potential of enhancing temporal compression rate without compromising reconstruction quality, we introduce the MTC-VAE , or M ulti-level T emporal C ompression VAE, which is designed to be seamlessly integrated with pretrained VAEs. In contrast to VAEs with a fixed temporal compression rate, MTC-VAE compresses video segments temporally into latent representations by accounting for the distinctive attributes of each segment. It is compatible with a wide range of 3D-VAEs as foundational models and adapts video reconstruction accordingly. Drawing on the notion that segments which are sparse or exhibit slow movement can undergo higher compression compared to those that are dense or rapidly changing, we propose an approach to dynamically assign compression rates to video segments based on their temporal complexity. However, this approach presents a technical difficulty: since a diffusion transformer is trained using latent videos generated from combined latent segments, how can these be accurately decoded back to their initial temporal resolution? We formulated the Video Clipper module, adept at pinpointing the initial frame (keyframe) of each segment within the hidden features, facilitating accurate decompression of each segment conforming to its initial compression rate. Additionally, we propose a flow-guided loss to adaptively optimize the balance between compression efficiency and reconstruction quality across various video dynamics (Table 1 ). Can our MTC-VAE be seamlessly combined with a pre-trained DiT model? To explore this, our MTC-VAE is utilized to fine-tune DiT. We carried out experiments where the MTC-VAE Encoder was employed to transform videos into latent representations at different temporal compression rates. These representations were linked with the corresponding video text descriptions to serve as finetuning inputs for the DiT model. We adjusted two open-source Latent Video Diffusion Models (LVDMs) and observed that these models could effectively accommodate the fluctuating temporal compression features of our MTC-VAE. This adaptation could facilitate the generation of longer videos with the same hardware or lower the computational demands for videos of similar duration, optimizing the balance between quality and compression efficiency (Table 2 ). Our MTC-VAE experiments highlight that we can significantly boost the compression rate by 92.4% while still achieving nearly identical performance, with only marginal differences of 0.0027 in SSIM and 0.15 in PSNR. Our detailed analysis, presented as scatter plots comparing quality metrics to compression rates across various video genres, uncovers an interesting insight: lower temporal compression rates in VAEs do not consistently lead to the best outcomes across all video styles. This complex relationship between compression rate and quality supports the core idea of our adaptive strategy, illustrating how selectively applying elevated compression rates to suitable video segments preserves quality and reduces overall compression rates. Figure 1 : Our MTC-VAE model is illustrated. This architecture incorporates a compression algorithm that adaptively manages temporal compression rates C across video segments, deciding the quantity of sampling layers to implement. Only the temporal sample layers are shown, with newly introduced sample layers initialized from existing pretrained ones. The segment area is indicated by the embedding f_{c} . Our linear keyframe predictor is adept at identifying the labeled latent features from the combined latent representation, and segments are divided based on these features. These latent segments are then decoded to generate the final video output. The specific process can be referenced in the pseudocode in Algorithm 21 . 2 Related Work 2.1 Latent Video Diffusion Model LVDMs represent a crucial challenge in artificial intelligence [ 30 ] . They employ VAEs to encapsulate video content into latent formats, followed by leveraging denoisers for noise prediction, a field experiencing swift advancements. OpenAI’s SORA [ 4 ] , which creates 1080P resolution videos lasting one minute, significantly amazes the world. LVDMs are categorized based on their denoiser frameworks. The first category incorporates U-net-based denoisers [ 26 , 38 , 6 ] , like MagicTime [ 37 ] , AnimateDiff [ 10 ] , and Stable Video Diffusion (SVD) [ 3 ] . Meanwhile, the second category employs Transformer-based denoisers [ 22 ] , including Latte [ 19 ] , SORA [ 4 ] , CogVideoX [ 34 ] , Vidu [ 2 ] , and Hunyuan-DiT [ 18 ] . Regardless of the denoiser structures, VAEs dictate the input dimensions for denoisers and the fidelity of video reconstructions from latent forms. Therefore, VAEs offering efficient representation while ensuring high-quality reconstruction will substantially boost performance. 2.2 Variational Autoencoder VAE, originally crafted to optimize the Evidence Lower Bound (ELBO) for generative tasks [ 15 ] , is now integral to various generative models, split into two classifications. First, VQ-VAEs [ 29 ] , which convert videos into discrete tokens for use with autoregressive models [ 9 , 35 , 36 ] . MAGVIT-v2 [ 36 ] excels in video reconstruction yet its discrete tokens don’t fit LVDMs. Conversely, continuous VAEs create continuous video representations for LVDMs; notable ones include SD-VAE [ 25 ] and SVD-VAE [ 3 ] . These, however, ignore temporal redundancy by focusing solely on spatial compression. Recent studies are trialing static temporal compression rates. OPS-VAE [ 41 ] employs two VAEs for spatial and temporal compression, CV-VAE [ 40 ] uses temporal compression to align with SD-VAE, and OD-VAE [ 5 ] implements a 3D-causal-CNN for combined compression. We compared our MTC-VAE against these methods in experiments. 3 Method In this work, we present the MTC-VAE (§ 3.1 ), short for M ulti-level T emporal C ompression VAE, designed to seamlessly integrate with existing pretrained VAEs. We describe a core compression algorithm (§ 3.2 ) where parameters are set heuristically, following our analysis that suggests VAE compression quality is affected by the properties of the video segments. Subsequently, we discuss the Encoder procedure (§ 3.3 ). To restore segments to their original temporal resolution, we developed a video clipper (§ 3.4 ) and tested various configurations, considering that a diffusion transformer is trained on latent videos constructed from combined segments. Additionally, we elaborate on the fine-tuning strategies (§ 3.5 ) and essential structural alterations necessary to adopt our proposed method in this section. 3.1 MTC-VAE Our MTC-VAE consists of an encoder \mathcal{E} and a decoder \mathcal{D} . As depicted in Figure 1 , the video is initially segmented into fixed-length video segments with a resolution of T×H×W. The multi-level compression algorithm determines a temporal compression rate C by balancing quality and compression. The encoder then converts the video segment into a latent segment with dimensions t×h×w, determining the number of temporal sample layers based on the compression rate C . Each segment receives an additional embedding to indicate the segment area. During decoding, a linear video predictor \mathcal{P} is utilized to identify labeled features and divide the latent representation into segments. We use the latent length and fixed video length to calculate the temporal compression rate and decode it back. Ratios such as 4×8×8 imply that \frac{T}{t}=4,\frac{H}{h}=8,\frac{W}{w}=8 , among others. New up/down sampling layers (incorporating nearest-neighbor sampling layers and weights from the base video VAE) are integrated into the original architecture to achieve compression ratios of 4×8×8, 8×8×8, and 16×8×8. 3.2 Compression Algorithm To enhance temporal compression while maintaining comparable reconstruction efficacy, the main challenge our algorithm addresses is finding an optimal balance between reconstruction quality and compression efficiency. We tackle this by optimizing a score function for the input video. Consider a video divided into N segments, represented by the tensor \boldsymbol{X}=[\boldsymbol{x}_{1},\boldsymbol{x}_{2},\ldots,\boldsymbol{x}_{N}]\in\mathbb{R}^{N\times T\times H\times W\times 3} , where each segment \boldsymbol{x}_{i} includes T frames. Our objective is to maximize the total score: \displaystyle\sum_{i=1}^{N}\Big[ \displaystyle(1-\alpha(x_{i}))\cdot Q(c_{i},x_{i})+\alpha(x_{i})\cdot\log_{2}(c_{i})\cdot w\Big], (1) s.t. \displaystyle c_{i}\in\{4,8,16\},\forall i\in\{1,2,...,N\}. (2) This summation is made up of two elements: the initial segment evaluates the quality of each part at designated compression levels, whereas the latter segment encourages increased compression rates, with w managing the tendency towards more compression, with a default of w=1.5 . The quality assessments produce a quality vector \boldsymbol{Q}(x_{i})=[Q(4,x_{i}),Q(8,x_{i}),Q(16,x_{i})] for each segment. The compression tolerance factor \alpha(x_{i}) for a given segment is computed as follows: \alpha(x_{i})=\frac{1}{2}\cdot\frac{\overline{Q}(x_{i})-Q_{\text{min}}}{Q_{\text{max}}-Q_{\text{min}}}+\frac{1}{2}\cdot\left(1-\frac{\sigma_{Q}(x_{i})}{\sigma_{Q_{\text{max}}}}\right). (3) Where: \overline{Q}(x_{i}) signifies the average quality over various compression rates for segment x_{i} , Q_{\text{min}} and Q_{\text{max}} denote the smallest and largest PSNR values across all compression rates and segments, \sigma_{Q}(x_{i}) represents the standard deviation of quality across compression rates for segment x_{i} , \sigma_{Q_{\text{max}}} is the highest standard deviation among all segments. Utilizing PSNR to evaluate Q(\textperiodcentered) proves more effective, as demonstrated in Table 5 . This model increases \alpha(x_{i}) (promoting greater compression) when: 1. The segment achieves higher average quality across compression rates. 2. The segment exhibits minimal quality variation across different compression rates. Figure 2 : Using our compression algorithm, we clearly observe that it tends to apply higher compression rates to simpler and slower videos, while employing lower temporal compression rates for more complex or fast-moving videos. 3.3 VAE Encoder Encode the video through a three-step process: Initially, determine the suitable compression rates for each video segment using our algorithm. Next, compress each segment in parallel and incorporate a keyframe embedding for each. Finally, concatenate them along the temporal dimension. Encoding Procedure. Consider the video segments \boldsymbol{X} . The compressed latent representation is expressed as \boldsymbol{Z}\in\mathcal{R}^{N\times t\times h\times w\times c} . Initially, MTC-VAE employs our compression algorithm 3.2 to determine a sequence of compression rates \boldsymbol{C} , defined as \boldsymbol{C}=[{c_{1}},{c_{2}},\ldots,{c_{N}}]\in\mathcal{R}^{N} , where the compression rate for the i -th video segment is indicated by {c_{i}} . Subsequently, the video segments \boldsymbol{X} are processed in parallel by \mathcal{E} , potentially omitting sample layers in accordance with the compression rates in \boldsymbol{C} to derive the latent features: \boldsymbol{z}_{i}=\mathcal{E}(\boldsymbol{x}_{i},c_{i}),\hskip 10.00002pti\in\{1,\ldots,N\}. (4) For the first latent feature \boldsymbol{z_{i}} at t=0 of each segment, known as the keyframe , an extra embedding f_{c} is included, see Figure 1 . Integration of f_{c} at the final frame or its exclusion is detailed in table 4 ): \boldsymbol{z_{i}}[:,j]=\begin{cases}\boldsymbol{z_{i}}[:,j]+f_{c},&\text{if }j=0\\ \boldsymbol{z_{i}}[:,j],&\text{otherwise}\end{cases} (5) The ultimate latent representation \boldsymbol{Z} is formed by concatenating these individual segment encodings: \boldsymbol{Z}=[\boldsymbol{z}_{1}\|\boldsymbol{z}_{2}\|\ldots\|\boldsymbol{z}_{N}],\hskip 10.00002pt\boldsymbol{Z}\in\mathcal{R}^{Nt\times h\times w\times c}. (6) 3.4 VAE Decoder Given that segments are compressed at various temporal rates, the initial task is to retrieve the specific temporal compression rates for the complete latent feature. Upon ascertaining the temporal compression rates from the latent feature, each segment can be concurrently decoded based on its particular temporal compression rate. Recover Temporal Compression Rates. Extracting temporal compression rates from latent features poses a challenge. We propose two structures to tackle this issue: a) Analysis per latent unit . We utilize a predictor to assess the temporal compression rate at each temporal index within the latent segment and leverage the smoothed compression rate outcomes at each location to approximate the actual segment compression rate. However, this method requires training a greater number of parameters, which can substantially diminish reconstruction capabilities. b) Convert multi-classification to binary classification . In response to the complexity of the previous predictor, we develop a novel keyframe predictor. Its sole function is to identify keyframes (the initial frame of each latent segment). The keyframe predictor \mathcal{P} serves as a binary classifier that moves through \boldsymbol{Z} over time to generate logits to detect latent keyframe latents, used to compute \boldsymbol{\hat{C}} from the fixed length segment T . Then, \boldsymbol{Z} is divided temporally at these identified keyframe latents, which can be formatted as: \boldsymbol{\hat{C}}=\left\{\frac{T}{\text{length}(\boldsymbol{Z}[i])}\mid i\in N\right\}. (7) Decoding procedure. Based on the keyframes identified by the predictor, latents are divdied into distinct latent segments. Each of these segments z_{i} is then decoded into video parts \hat{x} and subsequently combined: \hat{x}_{i}=\mathcal{D}({z}_{i},\hat{c}_{i}),\hskip 10.00002pti\in\{1,\ldots,N\}. (8) 3.5 Training We applied a two-step fine-tuning method. Initially, we quickly fine-tuned the VAE at compression rates of 8×8×8 and 16×8×8. By adding two sampling layers, based on the nearby sampling layer of the pre-trained VAE and initialized with its parameters, we adjusted these layers for their new roles. The first stage objective involves combining reconstruction, adversarial, and KL regularization losses, using the loss as same as OD-VAE [ 5 ] . We used the Adam optimizer [ 14 ] to perform 10k fine-tuning steps in stage 1 with a learning rate of 1\times 10^{-5} , using 4 A100 GPUs. The VAE training dataset included open-source videos from OpenSoraPlan [ 17 ] . Input videos were divided into 17-frame segments at a 256\times 256 pixel resolution. In the second phase, we trained the embedding f_{c} (c×1×1×1) and the linear Keyframe Predictor, utilizing extra losses: Binary cross-entropy loss . The keyframe detector \mathcal{P}(\cdot) , identifying if a latent frame Z_{i} is a keyframe, relies on this loss: \mathcal{L}_{\text{BCE}}=-\frac{1}{N}\sum_{i=1}^{N}\left[y_{i}\log(p_{i})+(1-y_{i})\log(1-p_{i})\right], (9) with p_{i}=\mathcal{P}(Z_{i}) as the predicted keyframe probability, and y_{i} as the true label. Flow-guided consistency loss. We found that enhancing both motion and quality aspects improves performance. The flow-guided consistency loss is: \mathcal{L}_{\text{flow}}=\mathcal{L}_{\text{quality}}+\mathcal{L}_{\text{motion}}, (10) defining quality and motion losses as: \mathcal{L}_{\text{quality}}=\|\text{warp}(\hat{\boldsymbol{X}},\Delta\mathbf{f})-\boldsymbol{X}\|_{1}, (11) \mathcal{L}_{\text{motion}}=\|\Delta\mathbf{f}\|_{1}. (12) Here, \Delta\mathbf{f} is the optical flow from the optical flow model [ 20 ] , and \text{warp}(\hat{\boldsymbol{X}},\Delta\mathbf{f}) is the adjusted output using this flow. This stage included 10k additional training steps. To enhance stability, we implement an exponential moving average (EMA) during training with a decay rate of 0.999, following the approach proposed in [ 27 , 28 ] . Model Pattern Ch WebVid-10M Panda-70M VCPR \uparrow PSNR \uparrow SSIM \uparrow LPIPS \downarrow VCPR \uparrow PSNR \uparrow SSIM \uparrow LPIPS \downarrow VQGAN [ 8 ] ( 1 × 8 × 8 ) 4 64 26.26 0.7699 0.0906 64 26.07 0.8295 0.0722 SD-VAE [ 25 ] ( 1 × 8 × 8 ) 4 64 30.19 0.8379 0.0568 64 30.40 0.8894 0.0396 SVD-VAE [ 3 ] ( 1 × 8 × 8 ) 4 64 31.15 0.8686 0.0547 64 31.00 0.9058 0.0379 TATS [ 9 ] ( 4 × 8 × 8 ) 4 256 23.10 0.6758 0.2645 256 21.77 0.6680 0.2858 CV-VAE [ 40 ] ( 4 × 8 × 8 ) 4 256 30.76 0.8566 0.0803 256 29.57 0.8795 0.0673 OPS-VAE [ 41 ] ( 4 × 8 × 8 ) 4 256 31.12 0.8569 0.1003 256 31.06 0.8969 0.0666 OD-VAE [ 17 ] ( 4 × 8 × 8 ) 4 256 31.16 0.8694 0.0586 256 30.49 0.8970 0.0454 CogVideoVAE [ 34 ] ( 4 × 8 × 8 ) 16 256 35.25 0.9323 0.0317 256 34.92 0.9422 0.0206 MTC-VAE ( / × 8 × 8 ) 4 443.7 \uparrow +73.3% 31.25 0.8703 0.0621 371.9 \uparrow +45.3% 30.69 0.8993 0.0464 MTC-VAE ( / × 8 × 8 ) 16 492.5 \uparrow +92.4% 35.10 0.9296 0.0304 431.2 \uparrow +68.4% 34.84 0.9409 0.0205 Table 1 : Video reconstruction results of VAEs on WebVid-10M and Panda-70M validation sets, including compression rates (VCPR).Our MTC-VAE still performs comparably to the CogVideoVAE model with higher temporal compression rates. ”Ch” means the latent feature channel size. / indicates multi-level temporal compression. Best and second-best scores are in bold and underlined . Figure 3 : MTC-VAE enables a finely-tuned DiT to allocate less latent space for simple data with high compression, while dedicating more for complex frames with lower compression rates. We illustrate four videos generated with differing compression: 256× (4×8×8), 512× (8×8×8), and 1024× (16×8×8). This method assists DiT in creating videos with variable frame lengths. The generation process includes producing 720p videos in 50 sampling steps, utilizing carefully designed prompts to emphasize temporal scene transitions. Additional visuals and comparisons can be found in the supplementary 5 and material. Model Ch VCPR \uparrow Latency \downarrow Speedup \uparrow VBench \uparrow Resolution Steps (times) (sec/frame) (times) Total(%) OpenSora-Plan [ 17 ] 4 256.0 1.36 1.00\times 74.34 512 \times 512 30 MTC-OSP 4 441.9 0.71 1.91 \times 74.72 512 \times 512 30 CogVideoX-5B [ 34 ] 16 256.0 4.43 1.00\times 80.88 720 \times 480 50 MTC-CogVideo 16 366.7 3.12 1.42\times 80.70 720 \times 480 50 Table 2 : Evaluation results for video generation. This table compares VCPR, speedup, latency and sample steps for CogVideoX and OpenSora-Plan, both with and without our MTC-VAE. ”Ch” means the latent feature channel size. 4 Experiment Initially, we detail the experimental configuration and the evaluation metrics (§ 4.1 ). Subsequently, we carry out a comprehensive comparison of MTC-VAE with various baseline models for video reconstruction. We explore the correlation between video features and tolerance compression rates (§ 4.2 ). Furthermore, we conduct an analysis of the quantitative reconstruction results as well as the generation outcomes (§ 4.3 ). Additionally, a series of ablation studies are performed (§ 4.4 ). 4.1 Experimental Setup Baselines. To evaluate the performance and efficiency, we compared our MTC-VAE against eight state-of-the-art VAEs for video reconstruction. The models include: (1) VQGAN, SD-VAE, and SVD-VAE: These are image VAEs based on VQ techniques. VQGAN [ 8 ] is a popular image VQ-VAE (f8-8192 version) [ 40 ] . SD-VAE [ 25 ] is widely used in LVDMs, utilizing the stable SD2.1-VAE version [ 40 ] . SVD-VAE [ 3 ] enhances video VAE with an improved decoder, sharing the encoder with SD-VAE. (2) TATS, CV-VAE, and OPS-VAE: These are video VAEs designed for video generation. TATS [ 9 ] is a 3D video VQ-VAE for autoregressive video generation. CV-VAE [ 40 ] and OPS-VAE [ 41 ] were developed concurrently with our research. (3) OD-VAE and OpenSora-Plan: OD-VAE [ 5 ] is a contemporaneous video VAE with spatial and temporal compression. OpenSora-Plan [ 17 ] is an LVDM model trained with OD-VAE, compared using the Open-Sora Plan v1.2.0, 93×480p model. (4) CogVideoVAE and CogVideoX-5B: CogVideoVAE [ 34 ] is a 3D Causal VAE from CogVideoX, applying spatial and temporal downsampling. CogVideoX-5B [ 34 ] supports 720p video generation. We additionally fine-tuned two DiT models, CogVideoX and OpenSora-Plan, using our MTC-VAE Encoder to encode latent variables and text pairs as input, and evaluated their performance during inference. Evaluation Metrics and Datasets. In our study, we utilize two widely recognized large open-domain video datasets: WebVid-10M [ 1 ] and Panda-70M [ 7 ] . Each video within the validation sets is standardized into a clip of 34 frames, maintaining a resolution of 256\times 256 . We conducted fine-tuning on two versions of MTC-VAE: MTC-VAE(ch=4), derived from OD-VAE [ 5 ] , and MTC-VAE(ch=16), adapted from the VAE of CogVideoX-5B [ 34 ] . Metrics. For video reconstruction, we consider the video compression rate (VCPR=\frac{T}{t}\cdot\frac{H}{h}\cdot\frac{W}{w}) to indicate compression efficiency and network complexity, along with three quality metrics: peak signal-to-noise ratio (PSNR) [ 12 ] , structural similarity index measure (SSIM) [ 32 ] and Learned Perceptual Image Patch Similarity (LPIPS) [ 39 ] . We determine Keyframe prediction accuracy (Acc.) by dividing correctly predicted frames by the overall number of frames. For video generation, performance is evaluated by VBench [ 13 ] , VCPR, Speedup, and Latency. DiT Fine-tuning. For video generation evaluation (as shown in the pseudocode 24 ), we compare our method with two leading models, CogVideoX-5B [ 34 ] and OpenSoraPlan [ 17 ] . We fine-tune two versions of our model based on these architectures. Our primary objective is to minimize a noise prediction loss defined as: \displaystyle\mathcal{L}_{\text{DiT}}=\mathcal{L}_{\epsilon}(\boldsymbol{Z};\boldsymbol{Z_{prompt}}). (13) DiT is fine-tuned using the MTC-VAE encoder for a total of 20,000 steps. The training scheme incorporates a learning rate of 1\times 10^{-5} along with a batch size of 4. We utilize the OpenSoraPlan dataset, maintaining a resolution of 256\times 256 pixels as specified by the OpenSoraPlan model outlined in [ 17 ] . Our model is developed at a resolution of 720p , based on the 720p version of the CogVideoX model [ 34 ] . This process is executed on 4 NVIDIA A100 GPUs, each with 80GB, within the PyTorch framework [ 21 ] . Figure 4 : Scatter plot illustrates when the compression of 256×(4×8×8) provides equivalent or higher quality compared to 128×(2×8×8). Orange indicates cases where |\text{PSNR}_{128\times}-\text{PSNR}_{256\times}|\leq 0.5 or \text{PSNR}_{256\times}>\text{PSNR}_{128\times} for a video segment, whereas blue signifies \text{PSNR}_{256\times}<(\text{PSNR}_{128\times}-0.5) . PSNR Std. denotes the standard deviation of PSNR values across compression levels 128×(2×8×8), 256×(4×8×8), 512×(8×8×8), and 1024×(16×8×8). Optical Flow refers to motion dynamics, and MPEG-4 refers to the level of storage compression applied via the MPEG technique for the video. This data is gathered from 1,024 videos within the Pixabay collection, included in the OpenSoraPlan open-source dataset [ 17 ] . 4.2 Discussion Which video segments can be temporally compressed higher? Figure 4 illustrates situations where videos can achieve comparable performance ( |\text{PSNR}_{128\times}-\text{PSNR}_{256\times}|\leq 0.5 ), represented by the orange points. The distribution of orange and blue points demonstrates some overlap; however, they remain distinguishably apart. By analyzing the mean differences shown in the plots along the main diagonal, it becomes clear that: 1) Video segments that are highly compressible under MPEG-4 [ 16 ] generally maintain quality even with considerable temporal compression. 2) Video sequences with low optical flow, indicating smooth motion, tend to be resilient to higher compression levels. 3) Similar PSNR values across compression rates suggest higher compression is possible without significant quality loss. 4.3 Main Results Video Reconstruction Comparison. In Table 1 , we report the results of four evaluation metrics for two models on two datasets. Our key observations are: 1) SVD-VAE outperforms SD-VAE in video compression performance. On WebViD, it achieves a PSNR of 31.15 compared to SD-VAE’s 30.19. 2) CV-VAE’s method improves temporal consistency by supervising the latent space, reducing LPIPS to 0.0803. 3) OPS-VAE and OD-VAE achieve higher performance at higher compression rates through causal encoder-decoder designs and effective structural designs. With a VCPR of 256 on Panda-70M, they reach PSNR values of 31.06 and 30.49 respectively, with higher SSIM values of 0.8969 and 0.8970. 4) CogVideoVAE opts for higher channel counts, enhancing latent representation capacity. 5) Compared to the above models, our MTC-VAE method achieves higher video compression rates with minimal performance loss. On the WebVid-10M validation set and Panda-70M, MTC-VAE(ch=4) achieves a 73.3% and 45.3% improvement in compression rate over commonly used models such as OD-VAE and CogVideoVAE. MTC-VAE(ch=16) shows even greater improvements under the default w settings. Besides, with higher compression rates, our MTC-VAE variants perform competitively against OD-VAE and CogVideoVAE. On the Panda-70M validation set, MTC-VAE(ch=4) achieves higher PSNR and SSIM scores than both CV-VAE and OD-VAE. Similarly, on the WebVid-10M validation set, our MTC-VAE(ch=16) delivers a 92.4% improvement in compression rate while maintaining performance comparable to the CogVideoVAE model. Video Generation Comparison. In Table 2 , we present the results of video generation involving the fine-tuned DiT along with our MTC-VAE and other baseline models. The findings in Table 2 represent our comprehensive evaluation of the VBench Video Generation Benchmark. With respect to OpenSora-Plan, the MTC-OSP model enhances the Video Compression Rate (VCPR) from 256 to 441.9 and increases the speed of generation by a factor of 1.91, while the VBench score shows actual improvement. For CogVideoX-5B, even though the MTC-CogVideo model experiences a slight reduction in the VBench score (from 80.88 to 80.70), it boosts the VCPR to 366.7 from 256 and decreases latency from 4.43 seconds per frame to 3.12 seconds. Therefore, we deduce that: 1) Our MCT-VAE approach is compatible with current DiT models for video generation. 2) LVDM can benefit from multi-level temporal compression rates by accelerating the video generation process. Visual Results. For our analysis and qualitative review, we utilized the same prompts as CogVideoX and the extended prompts from VBench, as depicted in Figure 3 . Our findings revealed that after fine-tuning with our MTC-VAE, DiT delivers comparable image quality in terms of visual aesthetics. Moreover, DiT with our MTC-VAE achieves higher compression rates at specific points, such as when characters perform minor actions within a scene (as seen in lines 3 and 4), or when they start to reflect or look into the distance (as seen in lines 1 and 2), among others, enabling our method to generate longer video outputs. Additional video results can be found in the supplementary materials. Model \mathcal{L}_{\text{flow}} w VCPR \uparrow PSNR \uparrow LPIPS \downarrow Acc.(%) \uparrow OD-VAE – – 256.0 30.69 0.0502 – OD-VAE – – 512.0 29.99 0.0565 – MTC-VAE ✗ 1.0 348.0 30.62 0.0564 99.8 MTC-VAE ✓ 1.0 370.0 30.76 0.0540 99.9 MTC-VAE ✓ 1.5 454.5 30.72 0.0569 99.9 MTC-VAE ✓ 2.0 748.0 30.32 0.0584 99.8 MTC-VAE ✓ 2.5 827.0 30.14 0.0601 99.8 Table 3 : Our ablation study of the MTC-VAE w/o flow-guided consistency loss and compared with OD-VAE at 256 and 512 compression rate. We find our flow-guided consistency loss useful in holding the VAE performance. 4.4 Ablation Study Use w to control the temporal compression rate. In order to gain a better understanding of the effects of w in our temporal compression algorithm, we utilize videos from the OpenSoraPlan dataset to compare models across various compression rates by adjusting w from 1.0 to 2.5 in 0.5 increments, as illustrated in Table 3 . Our findings indicate that: 1) Increasing w from 1.0 to 2.5 leads to an elevated compression rate. Significantly, MTC-VAE attains a VCPR of up to 827 with a PSNR of 30.14, which surpasses the PSNR offered by OD-VAE at a 512x compression rate. 2) The inclusion of optical flow loss L_{flow} enhances VAE performance; with w=1 , the use of L_{flow} during stage 2 training can boost the PSNR, increasing it to 30.76. Method Idx f_{c} PSNR↑ LPIPS↓ Acc.↑ MTC-VAE begin ✗ 24.31 0.2390 0.41 MTC-VAE end ✓ 32.49 0.0353 1.00 MTC-VAE begin ✓ 32.90 0.0338 1.00 Table 4 : Ablation study on extra embedding for segment marking. Adding the embedding to the first index achieves the best performance, while removing it significantly reduces accuracy. Extra embedding f_{c} . Learnable parameter f_{c} (C×1×1×1) adds to latent segments to mark each segment area, so the keyframe predictor can divide segments more easily. To analyze the effectiveness of this embedding and determine whether the first position of each segment is better, we set up two controls: 1) The first option does not use the f_{c} embedding but still regards the first frame of each segment as the keyframe (predictor uses keyframe to segment latents) 2) Adding the embedding to the last frame of each segment, and regarding the last frame as the keyframe. We randomly selected 256 videos with 256 resolution and 34 frames each for this experiment. The ablation (Table 4 ) shows: 1. Without extra embedding, the accuracy significantly decreases. 2. Adding to the beginning is better than adding to the end of the segment, possibly because the first frame in causal VAE contains denser information and is globally visible. Selection Method PSNR↑ LPIPS↓ SSIM↑ VCPR↑ Time(s/it)↓ Original (4×8×8) 30.77 0.064 0.864 256.00 1.13 Random 29.82 0.077 0.843 598.13 1.03 H.264 30.51 0.070 0.852 421.23 1.07 PSNR-based 30.67 0.069 0.859 492.00 1.22 Table 5 : Comparison of different quality function selection methods for our compression algorithm. The PSNR-based approach achieves the best reconstruction quality across all metrics with a modest increase in computational cost. The quality function of Compression Algorithm . In our compression algorithm, Q(\textperiodcentered) is employed to assess video quality, as depicted in the scatter plot 4 and our discussion. Although metrics like H.264 (MPEG-4), PSNR, or optical flow could be used, we observed significant overlaps in optical flow measurements, rendering it impractical for our needs. We evaluated three approaches—random selection, H.264 (MPEG-4) based selection, and PSNR-based selection—in terms of the quality-compression tradeoff for video sequences. When compared to analyzing the video compression ratio with H.264, we discovered that utilizing the PSNR of video reconstruction from VAE as Q(\textperiodcentered) is more appropriate. This approach not only achieves higher PSNR and LPIPS but also enhances the VCPR while requiring a slightly greater compute budget. 5 Conclusion In this work, we introduce MTC-VAE, a new approach that addresses the limitations of fixed compression rates by enabling multi-level temporal compression based on video content complexity. Our MTC-VAE demonstrates the ability to dynamically adjust the temporal compression ratio based on video content complexity, effectively balancing compression efficiency with high-fidelity reconstruction. The compression algorithm can adjust the compression rate by w , allowing for fine-grained control over the temporal resolution. We analyse the video compression rate relationship with temporal compression rates, revealing improvements in both efficiency and performance. We fine-tuned DiT with MTC-VAE, integrating our adaptive compression framework with diffusion transformers. This architecture optimizes the temporal distribution of information within the latent space, reducing information redundancy. Experiments and ablation studies on video reconstruction and generation demonstrate the effectiveness of our methods compared to fixed-rate compression approaches. Supplementary Material 6 Algorithm Description We present two key algorithms for our video compression and generation framework. Algorithm 1 details the MTC-VAE training process, while Algorithm 2 describes the VAE+DiT text-to-video generation pipeline. Algorithm 1 MTC-VAE Training Process 0: Video X , compression rates C=\{4,8,16\} , weight w Segment X into \{x_{1},x_{2},...,x_{N}\} of equal length for all x_{i}\in\{x_{1},x_{2},...,x_{N}\} do \boldsymbol{Q}(x_{i})\leftarrow[Q(4,x_{i}),Q(8,x_{i}),Q(16,x_{i})] {Quality vector} \overline{Q}(x_{i})\leftarrow\text{mean}(\boldsymbol{Q}(x_{i})) \sigma_{Q}(x_{i})\leftarrow\text{std}(\boldsymbol{Q}(x_{i})) \alpha(x_{i})\leftarrow\frac{1}{2}\cdot\frac{\overline{Q}(x_{i})-Q_{\text{min}}}{Q_{\text{max}}-Q_{\text{min}}}+\frac{1}{2}\cdot(1-\frac{\sigma_{Q}(x_{i})}{\sigma_{Q_{\text{max}}}}) {Adaptive weight} end for \{c_{1},c_{2},...,c_{N}\}\leftarrow\arg\max\limits_{c_{i}\in C}\sum_{i=1}^{N}[(1-\alpha(x_{i}))\cdot Q(c_{i},x_{i})+\alpha(x_{i})\cdot\log_{2}(c_{i})\cdot w] {Optimal rates} Encoder: for all x_{i} do z_{i}\leftarrow\text{TemporalDownsample}(x_{i}^{\text{init}},c_{i}) {Skip samplers based on c_{i} } z_{i}^{1}\leftarrow z_{i}^{1}+f_{c_{i}} {Add compression embedding to first frame} end for Decoder: for all z_{i} do p_{i}\leftarrow\text{KeyframePredictor}(z_{i}) {Keyframe probabilities} \hat{z}_{i}\leftarrow\text{TemporalUpsample}(z_{i},c_{i}) {Using ground truth c_{i} } \hat{x}_{i}\leftarrow\text{Decode}(\hat{z}_{i}) {Reconstruct segment} end for \hat{X}\leftarrow\text{Concatenate}(\hat{x}_{1},\hat{x}_{2},...,\hat{x}_{N}) {Final video output} return \hat{X} Algorithm 1: MTC-VAE Training Process. This algorithm details our VAE training method for dynamic latent frame rates. We determine quality metrics for 4×, 8×, and 16× compression rates per video segment to derive an adaptive weight \alpha(x_{i}) , balancing reconstruction quality and efficiency. The encoder chooses optimal compression rates based on content complexity, embedding this rate data into the latent space. The decoder includes a keyframe predictor that identifies frames requiring higher precision. Algorithm 2 VAE+DiT Text-to-Video Generation 0: Text prompt y , noise schedule \beta_{1},...,\beta_{T} , number of diffusion steps T , segment length L z_{T}\sim\mathcal{N}(0,I) {Sample initial noise} \hat{y}\leftarrow\text{TextEncoder}(y) {Encode text prompt} Diffusion Denoising: for t=T to 1 do \epsilon_{\theta}\leftarrow\text{DiT}(z_{t},t,\hat{y}) {Predict noise using DiT} \mu_{t}\leftarrow\frac{1}{\sqrt{\alpha_{t}}}(z_{t}-\frac{\beta_{t}}{\sqrt{1-\bar{\alpha}_{t}}}\epsilon_{\theta}) {Predict mean} if t>1 then z_{t-1}\sim\mathcal{N}(\mu_{t},\frac{\beta_{t}(1-\bar{\alpha}_{t-1})}{1-\bar{\alpha}_{t}}I) {Sample next state} else z_{0}\leftarrow\mu_{1} {Final denoised latent} end if end for VAE Decoding: p\leftarrow\text{KeyframePredictor}(z_{0}) {Predict keyframe probabilities for each frame} K\leftarrow\{i\mid p_{i}>\text{threshold}\} {Identify keyframe positions} Split z_{0} into segments \{z_{1},z_{2},...,z_{M}\} based on keyframe positions K for all segment z_{i} do l_{i}\leftarrow\text{Length}(z_{i}) {Length of current latent segment} c_{i}\leftarrow L/l_{i} {Calculate compression rate} \hat{z}_{i}\leftarrow\text{TemporalUpsample}(z_{i},c_{i}) {Upsample based on compression rate} x_{i}\leftarrow\text{VAEDecode}(\hat{z}_{i}) {Decode latent to pixel space} end for X\leftarrow\text{Concatenate}(x_{1},x_{2},...,x_{M}) {Merge segments into final video} return X Algorithm 2: VAE+DiT Text-to-Video Generation. This algorithm outlines our text-to-video generation process using a diffusion transformer (DiT) with our MTC-VAE framework. Starting with random noise and a text prompt, we perform iterative denoising using the DiT model conditioned on text embeddings. The denoised latent representation z_{0} is then processed by our keyframe predictor to identify optimal segment boundaries. Each segment z_{i} is upsampled according to its calculated compression rate c_{i} , which is determined by comparing the latent segment length to the target output length. Finally, the VAE decoder reconstructs each segment independently before concatenating them into the final video output. Figure 5 : Visual comparison of our MTC-VAE model’s performance across different scenes. Each row shows consistent style preservation despite varying compression rates, demonstrating robust visual quality maintenance across diverse content types. 7 Additional Results on VBench We conducted additional evaluations on the VBench benchmark to assess our model’s capability in maintaining visual consistency across different compression rates. Figure 5 demonstrates MTC-VAE’s performance in preserving visual appearance while applying varying temporal compression. As shown, our model successfully maintains consistent visual styles across diverse scenes - from black and white beach landscapes to stylized paintings with vibrant color palettes, photorealistic architectural structures, and character animations with artistic styling. These results confirm that our adaptive compression approach reduces computational requirements without compromising visual quality or style consistency, demonstrating robustness across VBench’s diverse evaluation criteria. 8 Impact Statement This paper presents work whose goal is to advance the field of Machine Learning, particularly in the domain of video generation. By introducing MTC-VAE (Multi-level Temporal Compression Variational Auto Encoder), we propose a simple to transfer framework that adjusts the latent frame rate based on video content complexity, while maintaining high reconstruction quality. This innovation has the potential to make video generation more efficient and scalable, enabling longer and higher-resolution video synthesis with reduced computational resources. 8.1 Limitations and Future Work We acknowledge certain limitations in our current approach. For instance, we utilized three discrete compression rates to better leverage existing sampling parameters. Future work could explore fully trained VAE and DiT models using attention blocks to achieve arbitrary compression rates, enabling finer-grained compression. This would allow for more seamless integration between components, potentially enabling DiT to autonomously control video compression rates based on textual input. While our keyframe predictor achieves high accuracy by framing compression rate prediction as a binary classification problem, prediction inaccuracies may still occur during generation. For frames with prediction confidence below 0.6, we default to the previous segment’s compression rate (or 256× for the first segment). We attribute these limitations partly to insufficient pretraining and computational constraints, and encourage future work to address these challenges with more extensive training regimes. 8.2 Broader Impact Our research contributes to making advanced video generation more accessible and environmentally sustainable. By reducing computational requirements, MTC-VAE enables researchers with limited resources to participate in cutting-edge video synthesis research. This democratization of technology could accelerate innovation across multiple sectors including creative arts, and scientific visualization. We recognize that efficient video generation technologies carry dual-use potential. While they enable beneficial applications like improved educational content and medical simulations, they could also facilitate the creation of synthetic media for deception. We advocate for continued development of detection tools, watermarking techniques, and transparent disclosure practices to mitigate potential misuse. The computational efficiency of our approach also aligns with growing concerns about AI’s environmental footprint, potentially reducing the carbon impact of video generation systems. We remain committed to responsible innovation that balances technological advancement with ethical considerations.