A multimodal inference testing framework supporting Image Understanding, Image Generation, Audio-to-Text, Speech Synthesis, and Audio-to-Audio tasks.
🚀 Looking for an advanced multimodal inference framework? Check out Omni-Flow — a unified workflow orchestration and distributed KV cache sharing framework that natively supports LongCat-Next and other multimodal models (DeepSeek-V2, HunyuanImage-3, and more). It provides flexible pipeline composition, cross-role KV cache sharing, and seamless SGLang integration for high-throughput deployments.
Native Multimodal Models (NMMs) introduce unique challenges to traditional LLM inference frameworks. We design this system to balance model flexibility with inference efficiency, enabling rapid iteration while leveraging proven LLM inference optimization techniques.
Our inference workflow consists of three core stages, each handling distinct responsibilities in the multimodal processing chain:

Data Flow Details:
To minimize latency and memory overhead while supporting efficient multi-step inference, we have implemented the following system-level optimizations:

Key Optimizations:
Multimodal generation often requires precise sequencing—for example, generating an image before processing follow-up text, or synthesizing speech after generating transcripts. We implement a lightweight state machine that interprets special tokens from the LLM output to dynamically route processing through different modality decoders, enabling complex multi-step workflows without external orchestration.

git clone https://github.com/meituan-longcat/LongCat-Next-inference.git
cd LongCat-Next-inference
git checkout main
sh setup.sh
# Setup environment
source create_env.sh
source set_env.sh
# Run tests
python3 demo.py \
--model-path ${MODEL_PATH} \
--sequential \
--output-dir output \
--tasks img_gen img_und aud_2_txt spk_syn aud_2_aud
| Argument | Short | Description | Default |
|---|---|---|---|
--model-path | -m | Model path (required) | - |
--output-dir | -o | Output directory | output |
--sequential | -s | Execute tests sequentially | Concurrent |
--tasks | -t | Specify task types | All tasks |
| Argument | Task Name | Description |
|---|---|---|
img_gen | Image Generation | Image generation |
img_und | Image Understanding | Visual understanding |
aud_2_txt | Audio-to-Text | Audio question answering / Audio understanding |
spk_syn | Speech Synthesis | Speech synthesis |
aud_2_aud | Audio-to-Audio | Audio question answering |
# Run only image generation
python3 demo.py -m ${MODEL_PATH} -t img_gen
# Run vision tasks sequentially
python3 demo.py -m ${MODEL_PATH} -s -t img_gen img_und
# Run all tasks
python3 demo.py -m ${MODEL_PATH}
Test cases are configured in example/test_cases.yaml. Modify the parameters as needed.
3 commits
Python
99.5%
A multimodal inference testing framework supporting Image Understanding, Image Generation, Audio-to-Text, Speech Synthesis, and Audio-to-Audio tasks.
🚀 Looking for an advanced multimodal inference framework? Check out Omni-Flow — a unified workflow orchestration and distributed KV cache sharing framework that natively supports LongCat-Next and other multimodal models (DeepSeek-V2, HunyuanImage-3, and more). It provides flexible pipeline composition, cross-role KV cache sharing, and seamless SGLang integration for high-throughput deployments.
Native Multimodal Models (NMMs) introduce unique challenges to traditional LLM inference frameworks. We design this system to balance model flexibility with inference efficiency, enabling rapid iteration while leveraging proven LLM inference optimization techniques.
Our inference workflow consists of three core stages, each handling distinct responsibilities in the multimodal processing chain:

Data Flow Details:
To minimize latency and memory overhead while supporting efficient multi-step inference, we have implemented the following system-level optimizations:

Key Optimizations:
Multimodal generation often requires precise sequencing—for example, generating an image before processing follow-up text, or synthesizing speech after generating transcripts. We implement a lightweight state machine that interprets special tokens from the LLM output to dynamically route processing through different modality decoders, enabling complex multi-step workflows without external orchestration.

git clone https://github.com/meituan-longcat/LongCat-Next-inference.git
cd LongCat-Next-inference
git checkout main
sh setup.sh
# Setup environment
source create_env.sh
source set_env.sh
# Run tests
python3 demo.py \
--model-path ${MODEL_PATH} \
--sequential \
--output-dir output \
--tasks img_gen img_und aud_2_txt spk_syn aud_2_aud
| Argument | Short | Description | Default |
|---|---|---|---|
--model-path | -m | Model path (required) | - |
--output-dir | -o | Output directory | output |
--sequential | -s | Execute tests sequentially | Concurrent |
--tasks | -t | Specify task types | All tasks |
| Argument | Task Name | Description |
|---|---|---|
img_gen | Image Generation | Image generation |
img_und | Image Understanding | Visual understanding |
aud_2_txt | Audio-to-Text | Audio question answering / Audio understanding |
spk_syn | Speech Synthesis | Speech synthesis |
aud_2_aud | Audio-to-Audio | Audio question answering |
# Run only image generation
python3 demo.py -m ${MODEL_PATH} -t img_gen
# Run vision tasks sequentially
python3 demo.py -m ${MODEL_PATH} -s -t img_gen img_und
# Run all tasks
python3 demo.py -m ${MODEL_PATH}
Test cases are configured in example/test_cases.yaml. Modify the parameters as needed.
3 commits
Python
99.5%