Model setup recipes

Qwen3-Omni Local Setup Conditions: Testing Audio and Video Paths

Qwen3-Omni is a multimodal model that understands text, audio, and video and answers in text or speech.

Give Qwen3-Omni Instruct text, an audio recording, or a short video and it can respond in text; with the talker path, it can also answer in speech. The thinker processes the input and forms a response, while the talker handles audio output.

To turn a meeting recording into notes, submit the audio file with a request for a summary and receive text. To ask about a short clip, submit the video with a question. Deciding whether you need text or spoken output first makes it easier to choose a test path.

First check the input path with an example that returns text from a short audio file. Then test whether you need spoken answers, and add video questions last; this staged sequence makes it easier to locate problems.

Requirements and key details
  • Start on the official Linux NVIDIA and Transformers path with one short WAV file and receive a text answer.
  • Once text answers work, test talker audio output and video input separately.
  • Change video length, resolution, and frame interval one at a time, recording processing time and memory.
  • For real-time conversation, focus on the first response and audio start; for long-recording summaries, consider total time and memory stability.

Prepare the runtime on a Linux NVIDIA GPU

On a Linux NVIDIA GPU1, use Transformers to load the official Qwen3OmniMoeForConditionalGeneration model and processor for audio files. The model is 30B-A3B in scale. Prepare Transformers 5.2.0 or later, accelerate, qwen-omni-utils, and ffmpeg as listed by Qwen, and install a PyTorch2 build matched to your GPU.

With a compatible CUDA3 GPU and FP164 or BF165, you can also use FlashAttention6 2. If you need a server for multiple requests, consider the officially listed option, vLLM-Omni.

This example uses the Linux and NVIDIA GPU path documented by Qwen. Qwen’s official materials do not list a macOS/MLX support path.

The official memory table assumes BF16 with Transformers and FlashAttention 2. Memory requirements and functionality can change with a different precision or runtime7, so prepare a compatible GPU and CUDA/PyTorch combination and enough space for the checkpoint8.

Install the official Transformers environment
python -m venv .venv
source .venv/bin/activate
python -m pip install -U 'transformers>=5.2.0' accelerate qwen-omni-utils soundfile
# Install a PyTorch build matched to your CUDA and GPU from the official PyTorch selector.
python -m pip install -U flash-attn --no-build-isolation
ffmpeg -version
Install the package versions used by the official example and prepare a short WAV file. These commands set up the environment for a Linux CUDA GPU.
A local computer desk with a microphone, webcam, and speaker connected.
Check model capabilities separately from peripheral and runtime compatibility.

First check a text answer from a short audio file

Save a short WAV file without personal information as sample.wav, then run the code. Add its local path to the conversation input; process_mm_info prepares the audio and the Thinker prints a text response.

The first run can take time to download and load the large checkpoint, and may use substantial GPU memory. If the file cannot be read, check its codec9 and sample rate10, and confirm ffmpeg and qwen-omni-utils are installed.

After checking the text answer, test audio output through the talker path. Check whether the same answer is available as text and speech and whether the generated file plays. If only text appears, compare the request format and runtime configuration with the official example. Testing audio input and audio output separately makes it easier to identify which path needs adjustment.

Record model loading, input processing, time to the first text response, and total response time separately; distinguish cold from warm runs11. The code below requests text only and does not include talker audio output.

This article first runs the Python example that turns WAV input into a text answer. To add speech output, use the talker settings and saving code in the linked official README's audio-generation example. Keep the Instruct model, processor and environment prepared here when comparing.

Submit one local WAV file and receive a text answer
from transformers import Qwen3OmniMoeForConditionalGeneration, Qwen3OmniMoeProcessor
from qwen_omni_utils import process_mm_info

model_id = 'Qwen/Qwen3-Omni-30B-A3B-Instruct'
model = Qwen3OmniMoeForConditionalGeneration.from_pretrained(
    model_id, dtype='auto', device_map='auto', attn_implementation='flash_attention_2'
)
processor = Qwen3OmniMoeProcessor.from_pretrained(model_id)
messages = [{'role': 'user', 'content': [
    {'type': 'audio', 'audio': './sample.wav'},
    {'type': 'text', 'text': 'Summarize the spoken message in one sentence.'},
]}]
text = processor.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
audios, images, videos = process_mm_info(messages, use_audio_in_video=False)
inputs = processor(text=text, audio=audios, images=images, videos=videos,
                    return_tensors='pt', padding=True, use_audio_in_video=False)
inputs = inputs.to(model.device).to(model.dtype)
text_ids, _ = model.generate(**inputs, return_audio=False, thinker_return_dict_in_generate=True)
answer = processor.batch_decode(
    text_ids.sequences[:, inputs['input_ids'].shape[1]:],
    skip_special_tokens=True, clean_up_tokenization_spaces=False
)
print(answer)
sample.wav is a local file path. Use the official Transformers example to check that a short audio clip is processed and produces a text answer.

Increase video length and frame count in small steps

After the audio test, ask a question about a short video of about five seconds. The model receives decoded frames12 and timing information, so the amount of input can vary with frames per second13 and resolution even when file sizes match. Start with a short clip using the official preprocessing and frame-sampling settings.

In the official model-card example using BF16, Transformers, and FlashAttention 2, a 15-second video uses about 78.85 GB and a 120-second video about 144.81 GB of memory. These are theoretical figures for that setup, not actual minimums for other runtimes or precisions. Record input frame count and peak memory as you increase the duration.

Change video length, resolution, or frame interval one at a time. Along with input frame count, check whether small text and objects are visible, actions between frames are missed, or the answer adds details absent from the video. If event order matters, ask about the final scene and the sequence of events using the same clip.

For video requests, continue with the video example in the official README linked in this section. Replace the local clip path and question, then inspect the preprocessed frame count. The WAV and video examples use the same model but different input preparation; confirm each works before combining them.

For short-video tests, record input size and answer quality together.
VariablePath to check firstValidation question
Text dialogueThinker input/outputEvent order and opening/closing scenes
Audio understandingAudio-input preprocessing and recognitionRecognition of small text and objects
Frame samplingTalker audio outputCan the generated audio be saved and played?
Video questionVideo-frame sampling and thinkerAre timing and key scenes reflected?
A video clip, audio waveform, and document page enter a local AI interface.
Test one input modality path at a time instead of combining them all at once.

Inspect latency and memory use separately

A multimodal request may pass through file preprocessing, a vision/audio encoder, thinker prefill14, answer decoding15, and talker audio output. When measuring, record the stage timings available in the runtime logs and total response time. Do not estimate stage-level values that the logs do not provide.

If memory is insufficient, examine input length, video frame count, the number of concurrent conversations, and memory used by other apps separately. If video is the cause, shorten it and run again; for work that does not require audio and video together, process them separately and compare.

For real-time conversation, look at time to the first text response and when speech begins. For a batch job that summarizes a long recording, compare total processing time and whether memory remains stable.

A local PC workspace showing a graphics processor and available memory.
Record memory use as you increase video length and frame count.

Find the required options in official examples

The Qwen3-Omni README and speech-recognition cookbook provide audio-input examples and package versions; video preprocessing and model-memory conditions are in the official repository and model card. For a serving setup that handles multiple requests, consult vLLM-Omni documentation and choose a path that matches the installed version.

Terminology notes

  1. GPU — A processor designed to handle many calculations in parallel. It performs model computations during AI inference.

    Back to the text
  2. PyTorch — A software framework for building and running AI models. Check the compatible PyTorch version and hardware support along with the model.

    Back to the text
  3. CUDA — A software platform for general-purpose computing on NVIDIA GPUs.

    Back to the text
  4. FP16 — A 16-bit floating-point format. It uses the same bit width as BF16 but allocates bits differently between exponent and significand.

    Back to the text
  5. BF16 — A 16-bit floating-point format for model values. Its exponent has the same width as FP32, giving it a similarly wide value range.

    Back to the text
  6. FlashAttention — An attention algorithm that computes in tiles, keeps intermediate values in fast on-chip memory, and reduces GPU-memory traffic without storing the full attention matrix.

    Back to the text
  7. Runtime — The software environment that provides facilities needed while a program runs. In local AI, it can also refer to a model execution engine.

    Back to the text
  8. Checkpoint — A file containing saved model weights and related state. Versions or tasks in one model family may use different checkpoints.

    Back to the text
  9. Audio codec — A method or software for encoding, compressing, and decoding digital audio. Size, compatibility, and lossiness vary by codec.

    Back to the text
  10. Sampling rate — The number of times per second an audio signal is measured when digitized.

    Back to the text
  11. Warm run — A measurement made after model loading and initialization. It may exclude the loading wait from the first run.

    Back to the text
  12. Frame — A single image that makes up part of a video.

    Back to the text
  13. FPS — Frames per second.

    Back to the text
  14. Prefill — The stage where an LLM reads the input prompt and computes representations for its tokens. Longer prompts contain more tokens to process.

    Back to the text
  15. Token decoding — The stage that generates successive output tokens using the input and the response produced so far.

    Back to the text

Frequently asked questions

What should you check first in this article?
Give Qwen3-Omni Instruct text, an audio recording, or a short video and it can respond in text; with the talker path, it can also answer in speech. The thinker processes the input and forms a response, while the talker handles audio output.
How much memory does it need?
The official memory table assumes BF16 with Transformers and FlashAttention 2. Memory requirements and functionality can change with a different precision or runtime, so prepare a compatible GPU and CUDA/PyTorch combination and enough space for the checkpoint.
Where can you check the conditions and sources?
The Qwen3-Omni README and speech-recognition cookbook provide audio-input examples and package versions; video preprocessing and model-memory conditions are in the official repository and model card. For a serving setup that handles multiple requests, consult vLLM-Omni documentation and choose a path that matches the installed version.