> This page is for version 0.5.0 · 26.06.
> For other versions, use one of these documentation indexes:
> - Nightly (default): https://docs.nvidia.com/nemo/automodel/nightly/llms.txt
> - Latest: https://docs.nvidia.com/nemo/automodel/latest/llms.txt
> - 0.7.0 · 26.10: https://docs.nvidia.com/nemo/automodel/v0.7/llms.txt
> - 0.5.0 · 26.06: https://docs.nvidia.com/nemo/automodel/v0.5/llms.txt
> - 0.4.0 · 26.04: https://docs.nvidia.com/nemo/automodel/v0.4/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/automodel/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/automodel/_mcp/server.

# nemo_automodel.components.distributed.pipelining.media

Consume explicitly staged pipeline media in microbatch order.

## Module Contents

### Classes

| Name                                                                                     | Description                                     |
| ---------------------------------------------------------------------------------------- | ----------------------------------------------- |
| [`VlmMediaChunk`](#nemo_automodel-components-distributed-pipelining-media-VlmMediaChunk) | One microbatch's views of staged image tensors. |

### Functions

| Name                                                                                                   | Description                                                      |
| ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- |
| [`next_vlm_media_chunk`](#nemo_automodel-components-distributed-pipelining-media-next_vlm_media_chunk) | Advance staged media once, including for a text-only microbatch. |

### API

```python
class nemo_automodel.components.distributed.pipelining.media.VlmMediaChunk(
    pixel_values: torch.Tensor | None,
    image_grid: torch.Tensor | None
)
```

Dataclass

One microbatch's views of staged image tensors.

Pixels retain their processor layout, with images or patches on axis zero.
Grids have shape \[images, coordinates]. Empty media
chunks become None; nonempty tensors alias the staged inputs unchanged.

**`image_grid`** `Tensor | None`

---

**`pixel_values`** `Tensor | None`

---

```python
nemo_automodel.components.distributed.pipelining.media.next_vlm_media_chunk(
    module: torch.nn.Module
) -> nemo_automodel.components.distributed.pipelining.media.VlmMediaChunk | None
```

Advance staged media once, including for a text-only microbatch.

**Parameters:**

**`module`** `torch.nn.Module`

Pipeline stage carrying image chunk lists. Pixel tensors retain
their image/patch-major layouts; metadata is \[images, coordinates].

---

**Returns:** `VlmMediaChunk | None`

The next chunk with original nonempty tensor views, or None when no media

**Raises:**

* `ValueError`: If a media or grid list is exhausted before the schedule.