[Refactor]: Intrduce x_to_text.py in examples (#5384)

Signed-off-by: princepride <wangzhipeng628@gmail.com>
Signed-off-by: 汪志鹏 <wangzhipeng628@gmail.com>
This commit is contained in:
汪志鹏 authored and GitHub committed 2026-07-26 16:33:17 +08:00
1 parent b6c4578dac
commit ccdb2b51aa
12 files changed
+457 -9

No files matched your search

+30 -3
View File
@@ -8,8 +8,8 @@
- Vendor: Tencent Hunyuan
- Model: `tencent/HunyuanImage-3.0-Instruct`
- Task: Text-to-image generation
- Mode: Online serving and performance benchmarking, DiT stage only
- Task: Text-to-image generation; text-to-text and image-to-text understanding
- Mode: Offline understanding, online serving, and performance benchmarking
- Maintainer: Community
## When to use this recipe
@@ -31,8 +31,10 @@ FP8/NVFP4 configuration:
## References
- Model: <https://huggingface.co/tencent/HunyuanImage-3.0-Instruct>
- Offline example:
- Existing model-specific offline example:
[`examples/offline_inference/hunyuan_image3`](../../examples/offline_inference/hunyuan_image3)
- Shared T2T/I2T example:
[`examples/offline_inference/x_to_text/x_to_text.py`](../../examples/offline_inference/x_to_text/x_to_text.py)
- Related PRs:
[#2495](https://github.com/vllm-project/vllm-omni/pull/2495) for DiT performance CI,
[#3055](https://github.com/vllm-project/vllm-omni/pull/3055) for GEBench accuracy CI,
@@ -42,6 +44,31 @@ FP8/NVFP4 configuration:
## GPU
### Shared T2T/I2T offline example
For text-to-text, the shared x-to-text example automatically selects the
AR-only Hunyuan deploy config and applies the checkpoint's prompt tokens and
stop-token rules:
```bash
python examples/offline_inference/x_to_text/x_to_text.py \
--model tencent/HunyuanImage-3.0-Instruct \
--prompt "Explain why the sky appears blue."
```
Add `--image` for image-to-text:
```bash
python examples/offline_inference/x_to_text/x_to_text.py \
--model tencent/HunyuanImage-3.0-Instruct \
--image /path/to/input.jpg \
--prompt "Describe the content of this image."
```
The AR-only default uses four GPUs. Pass `--deploy-config` to override the
layout. Image-output tasks remain documented by the existing model-specific
example and the DiT sections below.
### 4x H100/H800 80GB
#### Environment