def _enable_framewise_encoding(self):
        r"""
        Enables the framewise VAE encoding implementation with past latent padding. By default, Diffusers uses the
        oneshot encoding implementation without current latent replicate padding.

        Warning: Framewise encoding may not work as expected due to the causal attention layers. If you enable
        framewise encoding, encode a video, and try to decode it, there will be noticeable jittering effect.
        """
        self.use_framewise_encoding = True
        for name, module in self.named_modules():
            if isinstance(module, CogVideoXCausalConv3d):
                module.pad_mode = "constant"

        Enables the framewise VAE encoding implementation with past latent padding. By default, Diffusers uses the
        oneshot encoding implementation without current latent replicate padding.

        Warning: Framewise encoding may not work as expected due to the causal attention layers. If you enable
        framewise encoding, encode a video, and try to decode it, there will be noticeable jittering effect.
        
src/diffusers/models/autoencoders/autoencoder_kl_mochi.py