> 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.glm5_next.processing

Build the GLM-5.3 image processor on Transformers versions before 5.16.

## Module Contents

### Functions

| Name                                                                                                              | Description                                                                     |
| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [`_enable_image_placeholders`](#nemo_automodel-components-models-glm5_next-processing-_enable_image_placeholders) | Render image content as GLM image tokens while preserving the shipped template. |
| [`_load_chat_template`](#nemo_automodel-components-models-glm5_next-processing-_load_chat_template)               | -                                                                               |
| [`_load_processor_config`](#nemo_automodel-components-models-glm5_next-processing-_load_processor_config)         | -                                                                               |
| [`build_glm5_next_processor`](#nemo_automodel-components-models-glm5_next-processing-build_glm5_next_processor)   | Create the image-only GLM-5.3 processor used by MedPix recipes.                 |

### Data

[`_IMAGE_PLACEHOLDER`](#nemo_automodel-components-models-glm5_next-processing-_IMAGE_PLACEHOLDER)

[`_MEDIA_REMINDER`](#nemo_automodel-components-models-glm5_next-processing-_MEDIA_REMINDER)

[`__all__`](#nemo_automodel-components-models-glm5_next-processing-__all__)

### API

```python
nemo_automodel.components.models.glm5_next.processing._enable_image_placeholders(
    template: str | None
) -> str | None
```

Render image content as GLM image tokens while preserving the shipped template.

The initial GLM-5.3-Flash checkpoint template renders every media block as a
text-only capability reminder.  That leaves `Glm46VProcessor.__call__` no
`&lt;|image|&gt;` token to expand even though it receives and patchifies the image.
MedPix fine-tuning requires the native begin/image/end token triplet; video
retains the checkpoint's reminder because this onboarding is image-only.

```python
nemo_automodel.components.models.glm5_next.processing._load_chat_template(
    path_or_id: str,
    kwargs: typing.Any = {}
) -> str | None
```

```python
nemo_automodel.components.models.glm5_next.processing._load_processor_config(
    path_or_id: str,
    kwargs: typing.Any = {}
) -> dict[str, typing.Any]
```

```python
nemo_automodel.components.models.glm5_next.processing.build_glm5_next_processor(
    pretrained_model_name_or_path: str,
    kwargs: typing.Any = {}
) -> transformers.processing_utils.ProcessorMixin
```

Create the image-only GLM-5.3 processor used by MedPix recipes.

```python
nemo_automodel.components.models.glm5_next.processing._IMAGE_PLACEHOLDER = '{%- if media_type == \'image\' -%}\n                {{- "<|begin_of_image|><|im...
```

```python
nemo_automodel.components.models.glm5_next.processing._MEDIA_REMINDER = '{{- "<reminder>You are unable to process this " ~ media_type ~ " because you do...
```

```python
nemo_automodel.components.models.glm5_next.processing.__all__ = ['build_glm5_next_processor']
```