> 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.models.inkling.image_processing

Native image preprocessing for Inkling's hierarchical vision tower.

## Module Contents

### Classes

| Name                                                                                                                    | Description                                                       |
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| [`InklingImageProcessor`](#nemo_automodel-components-models-inkling-image_processing-InklingImageProcessor)             | Convert images into Inkling's padded spatiotemporal patch layout. |
| [`InklingImageProcessorKwargs`](#nemo_automodel-components-models-inkling-image_processing-InklingImageProcessorKwargs) | Additional Inkling image preprocessing arguments.                 |

### Functions

| Name                                                                                                  | Description                                                            |
| ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [`_divide_to_patches`](#nemo_automodel-components-models-inkling-image_processing-_divide_to_patches) | Divide a channels-first image into possibly incomplete square patches. |

### Data

[`__all__`](#nemo_automodel-components-models-inkling-image_processing-__all__)

### API

```python
class nemo_automodel.components.models.inkling.image_processing.InklingImageProcessor(
    kwargs: transformers.processing_utils.Unpack[nemo_automodel.components.models.inkling.image_processing.InklingImageProcessorKwargs] = {}
)
```

**Bases:** `TorchvisionBackend`

Convert images into Inkling's padded spatiotemporal patch layout.

**`resample`** `= PILImageResampling.LANCZOS`

---

**`rescale_image_max_upscaled_long_edge`** `= 2048`

---

**`size`** `= {'height': 40, 'width': 40}`

---

```python
nemo_automodel.components.models.inkling.image_processing.InklingImageProcessor._preprocess(
    images: list[torch.Tensor],
    size: transformers.image_utils.SizeDict,
    do_rescale: bool,
    rescale_factor: float,
    do_normalize: bool,
    image_mean: float | list[float] | None,
    image_std: float | list[float] | None,
    resample: transformers.image_utils.PILImageResampling | int | None,
    rescale_image_frac: float | None,
    rescale_image_max_upscaled_long_edge: int | None,
    return_tensors: str | transformers.utils.TensorType | None,
    kwargs: typing.Any = {}
) -> transformers.image_processing_utils.BatchFeature
```

Process normalized channels-first image tensors.

**Parameters:**

**`images`** `list[torch.Tensor]`

Tensors of shape `[channels, height, width]`.

---

**`size`** `SizeDict`

Square patch dimensions.

---

**`do_rescale`** `bool`

Whether to multiply pixels by `rescale_factor`.

---

**`rescale_factor`** `float`

Pixel rescaling multiplier.

---

**`do_normalize`** `bool`

Whether to normalize channels.

---

**`image_mean`** `float | list[float] | None`

Per-channel normalization means.

---

**`image_std`** `float | list[float] | None`

Per-channel normalization standard deviations.

---

**`resample`** `PILImageResampling | int | None`

Resize interpolation mode.

---

**`rescale_image_frac`** `float | None`

Optional multiplier for the long image edge.

---

**`rescale_image_max_upscaled_long_edge`** `int | None`

Maximum long edge when upscaling.

---

**`return_tensors`** `str | TensorType | None`

Requested output tensor framework.

---

**`**kwargs`** `Any` — default: \{}

Unused common backend arguments.

---

**Returns:** `BatchFeature`

A batch containing `pixel_values` with shape

```python
nemo_automodel.components.models.inkling.image_processing.InklingImageProcessor._validate_preprocess_kwargs(
    do_rescale: bool | None = None,
    rescale_factor: float | None = None,
    do_normalize: bool | None = None,
    image_mean: float | tuple[float, ...] | None = None,
    image_std: float | tuple[float, ...] | None = None,
    do_resize: bool | None = None,
    size: transformers.image_utils.SizeDict | None = None,
    do_center_crop: bool | None = None,
    crop_size: transformers.image_utils.SizeDict | None = None,
    resample: transformers.image_utils.PILImageResampling | int | None = None,
    kwargs: typing.Any = {}
) -> None
```

Validate model-specific image preprocessing settings.

```python
nemo_automodel.components.models.inkling.image_processing.InklingImageProcessor.preprocess(
    images: transformers.image_utils.ImageInput,
    kwargs: transformers.processing_utils.Unpack[transformers.processing_utils.ImagesKwargs] = {}
) -> transformers.image_processing_utils.BatchFeature
```

Convert image inputs into vision-tower patches.

**Parameters:**

**`images`** `ImageInput`

One image or a batch in a supported PIL, NumPy, or tensor layout.

---

**`**kwargs`** `Unpack[ImagesKwargs]` — default: \{}

Standard Transformers image preprocessing overrides.

---

**Returns:** `BatchFeature`

A batch containing `pixel_values` with shape

```python
class nemo_automodel.components.models.inkling.image_processing.InklingImageProcessorKwargs()
```

**Bases:** `ImagesKwargs`

Additional Inkling image preprocessing arguments.

**`rescale_image_frac`** `float | None`

---

**`rescale_image_max_upscaled_long_edge`** `int | None`

---

```python
nemo_automodel.components.models.inkling.image_processing._divide_to_patches(
    image: torch.Tensor,
    patch_size: int
) -> list[torch.Tensor]
```

Divide a channels-first image into possibly incomplete square patches.

**Parameters:**

**`image`** `torch.Tensor`

Tensor of shape `[channels, height, width]`.

---

**`patch_size`** `int`

Height and width of each patch.

---

**Returns:** `list[torch.Tensor]`

Tensors of shape `[channels, patch_height, patch_width]` in row-major order.

```python
nemo_automodel.components.models.inkling.image_processing.__all__ = ['InklingImageProcessor']
```