# MiniMax H3 Latent

[English](README.md) | [简体中文](README.zh-CN.md)

ComfyUI custom nodes for saving and loading MiniMax H3 AV latents.

MiniMax H3 latents are not plain tensors. They are `NestedTensor` values containing video and audio latent members, so ComfyUI's built-in `Save Latent` node can fail with:

```text
'NestedTensor' object has no attribute 'contiguous'
```

This node pack adds H3-specific latent save/load nodes.

## Nodes

- **Save MiniMax H3 AV Latent**
  - Saves H3 `LATENT` inputs, including `NestedTensor` video/audio members.
  - Files are written to the ComfyUI output folder with the `.h3latent` extension.

- **Load MiniMax H3 AV Latent**
  - Loads `.h3latent` files from the ComfyUI input folder.
  - Rebuilds the H3 `NestedTensor` before returning a `LATENT`.

## Usage

Use **Save MiniMax H3 AV Latent** instead of the built-in **Save Latent** node for MiniMax H3 workflows.

To load a saved latent, place the `.h3latent` file in ComfyUI's input folder, then use **Load MiniMax H3 AV Latent**.

## Format

The saved file stores each latent member separately:

```text
latent_0  video latent
latent_1  audio latent
```

On load, files with multiple members are rebuilt as a ComfyUI `NestedTensor`.
