hiyouga/LlamaFactory · error · ValueError

MOSS-VL does not support audio inputs.

Error message

MOSS-VL does not support audio inputs.

What it means

The MOSS-VL plugin is image/video-only: its _get_mm_inputs raises immediately if the audios list is non-empty. Audio placeholders/media are not implemented for this architecture.

Source

Thrown at src/llamafactory/data/mm_plugin.py:677

            message["content"] = content

        return messages

    @override
    def get_mm_inputs(
        self,
        images: list["ImageInput"],
        videos: list["VideoInput"],
        audios: list["AudioInput"],
        imglens: list[int],
        vidlens: list[int],
        audlens: list[int],
        batch_ids: list[list[int]],
        processor: Optional["MMProcessor"],
    ) -> dict[str, Union[list[int], "torch.Tensor"]]:
        self._validate_input(processor, images, videos, audios)
        if audios:
            raise ValueError("MOSS-VL does not support audio inputs.")

        if not (len(imglens) == len(vidlens) == len(batch_ids)):
            raise ValueError("MOSS-VL batch metadata must have one entry per sample.")
        final_pixel_values = []
        final_grid_thw = []
        media_nums_per_sample = []
        image_offset = 0
        video_offset = 0
        for imglen, vidlen, input_ids in zip(imglens, vidlens, batch_ids):
            sample_images = images[image_offset : image_offset + imglen]
            sample_videos = videos[video_offset : video_offset + vidlen]
            image_offset += imglen
            video_offset += vidlen
            image_chunks, image_grids = [], []
            if sample_images:
                regularized_images = self._regularize_images(
                    sample_images,
                    image_max_pixels=2**63 - 1,

View on GitHub (pinned to f28afaf635)

Solutions

  1. Switch to an audio-capable plugin/model (qwen2_omni, qwen2_audio) if audio input is required.
  2. Strip the audios column / <audio> placeholders from the dataset when using MOSS-VL.
  3. Use a template without audio support for MOSS-VL.

Example fix

### before
# dataset.json row
{"messages": [{"role":"user","content":"<audio> transcribe"}], "audios": ["a.wav"]}
# with model_plugin: moss_vl
### after
{"messages": [{"role":"user","content":"transcribe"}]}
# or switch plugin to qwen2_omni
Defensive patterns

Strategy: validation

Validate before calling

assert not audios, 'MOSS-VL does not accept audio; strip the audios column or use qwen2_omni'

Prevention

When it happens

Trigger: Running a template/dataset that supplies an `audios` column (or <audio> placeholders) with a MOSS-VL model, e.g. reusing a qwen2_omni audio dataset config with the moss_vl plugin.

Common situations: Copying a multimodal config from an omni model to MOSS-VL; datasets that always include an audios field even when empty-ish (a non-empty list triggers this).

Related errors


AI-assisted analysis of hiyouga/LlamaFactory@f28afaf635 (2026-08-14). Data as JSON: /api/errors/4c2ff7f2dcd05837. Report an issue: GitHub.