`prepare_energon_dataset.py` is supposed to save encoded latents but reconstructed videos are saved instead.
@zpx01 can you take a look? @Sy-Zhang can you try changing the following line:
https://github.com/NVIDIA/NeMo/blob/1626ddded63af1fe82b0bee482fba44c57b8203d/nemo/collections/common/video_tokenizers/cosmos_tokenizer.py#L205

to this:

`output_tensor = self.encode(input_tensor)`

I think this will temporarily fix your issue. We are going to have a large revision of the code soon, so this will not be an issue moving forward. 
**Describe the bug**

According to https://github.com/NVIDIA/NeMo/blob/main/nemo/collections/diffusion/data/readme.rst, `prepare_energon_dataset.py` is supposed to save encoded latents. However, it save the reconstructed videos instead. 

**Steps/Code to reproduce bug**
`torchrun --nproc_per_node=8 nemo/collections/diffusion/data/prepare_energon_dataset.py`


** Reason **
Autoencoder's forward function is called [here](https://github.com/NVIDIA/NeMo/blob/main/nemo/collections/diffusion/data/prepare_energon_dataset.py#L219), which first encode the latents and then decode the latents, as shown [here](https://github.com/NVIDIA/NeMo/blob/main/nemo/collections/common/video_tokenizers/cosmos_tokenizer.py#L205).

`autoencoder.encode` should be called instead.

 


