Skip to navigation

nemo_automodel.components.models.qwen3_8_flash_next.processing

View as MarkdownOpen in Claude

Image-text processor of Qwen3.8-Flash-Next models, assembled from Transformers classes.

Module Contents

Classes

NameDescription
Qwen3_8_FlashNextImageSizeBounds on the resized area of one image, in pixels (height times width, not edge lengths).

Functions

NameDescription
load_qwen3_8_flash_next_processorAssemble the image-text processor of a checkpoint from Transformers classes.

Data

_COMPAT_TOKENIZER_SUBFOLDER

API

class nemo_automodel.components.models.qwen3_8_flash_next.processing.Qwen3_8_FlashNextImageSize

Bases: typing.TypedDict

Bounds on the resized area of one image, in pixels (height times width, not edge lengths).

With 16-pixel patches merged 2x2, one image yields its resized area divided by 1024 placeholder tokens.

longest_edge
int
shortest_edge
int
nemo_automodel.components.models.qwen3_8_flash_next.processing.load_qwen3_8_flash_next_processor(
pretrained_model_name_or_path: str,
) -> transformers.Qwen3VLProcessor

Assemble the image-text processor of a checkpoint from Transformers classes.

The tokenizer and its chat template are read from the tokenizer-compat subfolder; the image and video processors are read from the checkpoint root.

Parameters:

pretrained_model_name_or_path
str

Local directory or hub id of the checkpoint.

size
Qwen3_8_FlashNextImageSize | NoneDefaults to None

Per-image area bounds replacing the ones in the checkpoint’s preprocessor_config.json; None keeps the checkpoint’s bounds.

Returns: Qwen3VLProcessor

Processor whose tokenizer and chat template come from tokenizer-compat/.

Raises:

  • ValueError: If the tokenizer-compat/ tokenizer carries no chat template.
nemo_automodel.components.models.qwen3_8_flash_next.processing._COMPAT_TOKENIZER_SUBFOLDER = 'tokenizer-compat'