Skip to content

feat(benchmarks): add TeleFuser AIPerf video benchmark support#5

Open
ActivePeter wants to merge 1 commit into
Tele-AI:mainfrom
ActivePeter:main
Open

feat(benchmarks): add TeleFuser AIPerf video benchmark support#5
ActivePeter wants to merge 1 commit into
Tele-AI:mainfrom
ActivePeter:main

Conversation

@ActivePeter

Copy link
Copy Markdown

Summary

This PR adds the first TeleFuser benchmark workflow for AIPerf-based video serving evaluation. It includes TeleFuser benchmark configs, a Diffusers Wan2.1 I2V baseline service, benchmark contracts, documentation, and small service/runtime fixes
needed for reproducible batch and stream benchmark runs.

Changes

  • Add TeleFuser AIPerf benchmark assets for batch /v1/videos and stream WebRTC runs.
  • Add a Diffusers Wan2.1-I2V-14B-480P baseline service and matching AIPerf configs.
  • Add benchmark contract manifests for TeleFuser and Diffusers workloads.
  • Add a fixed Wan2.1 I2V 480P TeleFuser service example for apples-to-apples comparison.
  • Preserve exact OpenAI video size fields (openai_video_size, width, height) for fixed-workload benchmarks.
  • Tighten media input handling so benchmark media fields are endpoint-managed rather than overridden through extra request fields.
  • Add WebRTC ICE host address filtering for stream benchmark stability.
  • Add English and Chinese benchmark documentation and navigation entries.
  • Add focused unit coverage for OpenAI adapter and pipeline runner behavior.

Validation

  • Passed Python syntax compilation for the changed Python files.
  • Parsed the new benchmark contract YAML files successfully.
  • Full pytest was not run because the current environment does not have pytest installed.

中文说明

本 PR 增加了 TeleFuser 第一版基于 AIPerf 的视频服务 benchmark 工作流,包括 TeleFuser benchmark 配置、Diffusers Wan2.1 I2V baseline 服务、benchmark contract、相关文档,以及用于稳定批处理和流式 benchmark 的少量服务端运行时修正。

主要改动

  • 新增 TeleFuser AIPerf benchmark 资产,覆盖批处理 /v1/videos 和 WebRTC stream benchmark。
  • 新增 Diffusers Wan2.1-I2V-14B-480P baseline 服务和对应 AIPerf 配置。
  • 新增 TeleFuser 与 Diffusers 的 benchmark contract manifest。
  • 新增固定 Wan2.1 I2V 480P 的 TeleFuser service example,便于公平对比。
  • 保留 OpenAI video size 的精确宽高字段,支持固定 workload benchmark。
  • 收紧媒体输入处理,避免 extra 覆盖 endpoint 管理的媒体字段。
  • 新增 WebRTC ICE host 地址过滤,提高远程 stream benchmark 稳定性。
  • 新增中英文 benchmark 文档和导航入口。
  • 补充 OpenAI adapter 与 pipeline runner 的单元测试覆盖。

验证

  • 已通过变更 Python 文件的语法编译检查。
  • 已成功解析新增 benchmark contract YAML。
  • 未运行完整 pytest,因为当前环境未安装 pytest

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces an initial AIPerf-based benchmarking workflow for TeleFuser video serving, including batch /v1/videos configs/contracts and a WebRTC stream benchmark harness, plus a Diffusers Wan2.1 I2V baseline service for apples-to-apples comparisons.

Changes:

  • Added TeleFuser AIPerf benchmark assets (configs, scripts, datasets) and benchmark contract manifests for TeleFuser + Diffusers baselines.
  • Added a standalone Diffusers Wan2.1-I2V-14B-480P FastAPI service baseline and a fixed-workload TeleFuser 480p service example.
  • Added small runtime/service updates for benchmark stability (OpenAI adapter size preservation, pipeline runner media aliasing, WebRTC ICE host allowlisting).

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tests/unit/service/test_pipeline_runner.py Adds unit test coverage for media alias injection in _select_kwargs.
tests/unit/openai/test_adapter.py Adds unit test for preserving exact OpenAI WxH size fields in task requests.
telefuser/webrtc_ice.py Adds ICE host candidate allowlisting via aioice monkeypatching.
telefuser/service/main.py Calls ICE host allowlist configuration on stream server startup.
telefuser/service/core/pipeline_runner.py Extends kwarg selection and injects media aliases for **kwargs pipelines.
telefuser/service/api/openai/adapter.py Preserves openai_video_size plus parsed width/height in task extras.
telefuser/pipelines/lingbot_world_fast/pipeline.py Makes fast checkpoint paths robust to absolute/relative + ~ usage.
telefuser/models/init.py Makes LTX cross-file registration optional (but currently too broad in exception handling).
pyproject.toml Adds runtime deps (uvicorn[standard], python-multipart) needed for serving endpoints.
mkdocs.yml Adds Benchmarks nav entries and translations.
examples/wan_video/wan21_14b_image_to_video_480p_service.py Adds fixed-workload Wan2.1 I2V 480p TeleFuser service example.
examples/lingbot/stream_lingbot_world_fast.py Makes model zoo paths user/abs-path robust via Path.
docs/en/index.md Adds benchmark doc entry.
docs/en/benchmark_aiperf.md Adds English benchmark documentation.
docs/zh/index.md Adds benchmark doc entries (including design doc link).
docs/zh/benchmark_aiperf.md Adds Chinese benchmark runbook documentation.
docs/zh/benchmark_aiperf_design.md Adds Chinese benchmark design notes/spec.
benchmarks/telefuser_aiperf/scripts/run_video_bench.sh Adds batch benchmark runner script with health check + ulimit tuning.
benchmarks/telefuser_aiperf/scripts/run_stream_bench.sh Adds stream benchmark runner wrapper for the WebRTC harness.
benchmarks/telefuser_aiperf/scripts/run_stream_bench.py Adds WebRTC session benchmark harness (offer RTT, first-frame, FPS, control latency).
benchmarks/telefuser_aiperf/README.md Documents benchmark layout and usage.
benchmarks/telefuser_aiperf/data/video_prompts.jsonl Adds prompts + reference images dataset (currently hard-coded to /workspace/TeleFuser/...).
benchmarks/telefuser_aiperf/configs/video_generation_*.yaml Adds TeleFuser AIPerf batch configs (quick/e2e/rate/compare).
benchmarks/telefuser_aiperf/benchmark_contract.yaml Adds TeleFuser benchmark contract manifest.
benchmarks/baseline/diffusers_wan_i2v/service.py Adds Diffusers baseline FastAPI service implementing async /v1/videos.
benchmarks/baseline/diffusers_wan_i2v/scripts/run_video_bench.sh Adds baseline benchmark runner script.
benchmarks/baseline/diffusers_wan_i2v/scripts/run_service.sh Adds baseline service launcher (currently doesn’t export the env vars it intends to set).
benchmarks/baseline/diffusers_wan_i2v/README.md Documents the baseline service and how to run it.
benchmarks/baseline/diffusers_wan_i2v/configs/*.yaml Adds baseline AIPerf configs (E2E + compare).
benchmarks/baseline/diffusers_wan_i2v/benchmark_contract.yaml Adds baseline benchmark contract manifest.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +54 to +57
def _load_rgb_image(path: Any) -> Any:
from PIL import Image

return Image.open(path).convert("RGB")
Comment on lines 118 to 122
if name in ("image", "input_image"):
first_path = task_data.get("first_image_path") or task_data.get("image_path")
first_path = _first_image_path(task_data)
if first_path:
from PIL import Image

kwargs[name] = Image.open(first_path).convert("RGB")
kwargs[name] = _load_rgb_image(first_path)
continue
Comment thread telefuser/webrtc_ice.py
Comment on lines +43 to +45
allowed_host_ips = _normalize_host_ips(host_ips)
if not allowed_host_ips:
return
Comment thread telefuser/webrtc_ice.py
Comment on lines +47 to +50
try:
from aioice import ice as aioice_ice
except Exception:
return
Comment on lines +14 to +20
try:
from telefuser.core.model_registry import register_model_config
from telefuser.models.ltx_dit import LTXVideoTransformer
from telefuser.models.ltx_gemma_text_encoder import LTXEmbeddingsProcessor
from telefuser.models.ltx_video_vae import LTXVideoVAE
except Exception:
pass
Comment on lines +7 to +11
PYTHON_BIN="${PYTHON_BIN:-python3}"
SERVICE_HOST="${DIFFUSERS_WAN_I2V_HOST:-127.0.0.1}"
SERVICE_PORT="${DIFFUSERS_WAN_I2V_PORT:-8010}"

exec "${PYTHON_BIN}" benchmarks/baseline/diffusers_wan_i2v/service.py
Comment on lines +49 to +53
serverMetrics:
enabled: ${TELEFUSER_AIPERF_SERVER_METRICS:true}
urls:
- ${TELEFUSER_AIPERF_METRICS_URL:http://127.0.0.1:8000/metrics}
formats: [json, csv]
Comment on lines +1 to +5
{"text": "The character turns slightly toward the camera and breathes naturally, cinematic motion, consistent identity", "image": "/workspace/TeleFuser/examples/data/101235-video-720_0.png"}
{"text": "The subject begins walking forward with subtle parallax in the background, natural lighting, smooth motion", "image": "/workspace/TeleFuser/examples/data/101235-video-720_0.png"}
{"text": "A gentle push-in camera move with soft environmental motion, realistic dynamics, no sudden cuts", "image": "/workspace/TeleFuser/examples/data/101235-video-720_0.png"}
{"text": "The scene gains light wind and small secondary motion while preserving composition and subject details", "image": "/workspace/TeleFuser/examples/data/101235-video-720_0.png"}
{"text": "A short cinematic continuation with stable structure, coherent motion, and clean temporal consistency", "image": "/workspace/TeleFuser/examples/data/101235-video-720_0.png"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants