Skip to content

[Feat] support TP for GLM-Image#1918

Merged
wtomin merged 4 commits into
vllm-project:mainfrom
RuixiangMa:glmimagetp
Mar 24, 2026
Merged

[Feat] support TP for GLM-Image#1918
wtomin merged 4 commits into
vllm-project:mainfrom
RuixiangMa:glmimagetp

Conversation

@RuixiangMa
Copy link
Copy Markdown
Collaborator

@RuixiangMa RuixiangMa commented Mar 16, 2026

Purpose

Close #911.

Enable tensor parallelism (TP) support for GLM-Image diffusion model.

Test Plan

Test Result

Metric TP=1 TP=2 TP=4
Image img img img
Time (s/img) 46.778 38.317 32.187
VRAM(GiB) 23.14 17.804 14.798

Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan. Please provide the test scripts & test commands. Please state the reasons if your codes don't require additional test scripts. For test file guidelines, please check the test style doc
  • The test results. Please paste the results comparison before and after, or the e2e results.
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model. Please run mkdocs serve to sync the documentation editions to ./docs.
  • (Optional) Release notes update. If your change is user-facing, please update the release notes draft.

BEFORE SUBMITTING, PLEASE READ https://github.com/vllm-project/vllm-omni/blob/main/CONTRIBUTING.md (anything written below this line will be removed by GitHub Actions)

Signed-off-by: Lancer <maruixiang6688@gmail.com>
@hsliuustc0106
Copy link
Copy Markdown
Collaborator

does the tp work for AR or DiT or both?

@hsliuustc0106
Copy link
Copy Markdown
Collaborator

btw, I remember the AR part is not working faster as expected even in TP=1, can you help debug it?cc @JaredforReal

@RuixiangMa RuixiangMa mentioned this pull request Mar 18, 2026
5 tasks
@RuixiangMa
Copy link
Copy Markdown
Collaborator Author

RuixiangMa commented Mar 18, 2026

btw, I remember the AR part is not working faster as expected even in TP=1, can you help debug it?cc @JaredforReal

GLM-image AR likely support tp via vLLM. I only considered DiT, the results are also DiT.

@JaredforReal
Copy link
Copy Markdown
Contributor

JaredforReal commented Mar 19, 2026

@RuixiangMa GLM Image is not supported in vllm main repo, we need to work on vllm-omni to speed up the AR part
The AR part already supports TP in most of its components

Copy link
Copy Markdown
Collaborator

@wtomin wtomin left a comment

Choose a reason for hiding this comment

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

LGTM.

@wtomin wtomin added the ready label to trigger buildkite CI label Mar 23, 2026
Comment thread vllm_omni/diffusion/models/glm_image/glm_image_transformer.py Outdated
Copy link
Copy Markdown
Collaborator

@hsliuustc0106 hsliuustc0106 left a comment

Choose a reason for hiding this comment

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

Blocker Scan

Category Result
Correctness ✅ PASS
Reliability/Safety ✅ PASS
Breaking Changes ✅ PASS
Test Coverage ⚠️ NEEDS TESTS
Documentation ✅ PASS
Security ✅ PASS

OVERALL: 1 CONCERN FOUND


⚠️ Missing Test Coverage

This PR adds tensor parallelism support for GLM-Image but includes no test files. Other models with TP support have dedicated tests:

  • tests/diffusion/models/flux2/test_flux2_transformer_tp.py
  • tests/diffusion/models/z_image/test_zimage_tp_constraints.py

Consider adding a test to verify:

  1. TP constraints validation (similar to test_zimage_tp_constraints.py)
  2. Basic TP inference correctness

💡 Performance Comparison - Minor Gap

Per the performance comparison checklist for [Feature] PRs affecting performance, the PR provides:

  • ✅ Latency comparison (TP=1: 46.8s → TP=4: 32.2s)
  • ✅ VRAM comparison (TP=1: 23.1GiB → TP=4: 14.8GiB)
  • ✅ Output consistency (same image across TP sizes)

For completeness, consider documenting:

  • GPU model and CUDA version used for benchmarks
  • Exact commands used

VERDICT: COMMENT (non-blocking - tests recommended but implementation looks correct)

RuixiangMa and others added 3 commits March 24, 2026 01:01
Co-authored-by: Didan Deng <33117903+wtomin@users.noreply.github.com>
Signed-off-by: Lancer <402430575@qq.com>
Signed-off-by: Lancer <402430575@qq.com>
@wtomin wtomin merged commit c6b7597 into vllm-project:main Mar 24, 2026
7 of 8 checks passed
zhangj1an pushed a commit to zhangj1an/vllm-omni that referenced this pull request Mar 26, 2026
Signed-off-by: Lancer <maruixiang6688@gmail.com>
Signed-off-by: Lancer <402430575@qq.com>
Co-authored-by: Didan Deng <33117903+wtomin@users.noreply.github.com>
zhangj1an pushed a commit to zhangj1an/vllm-omni that referenced this pull request Mar 26, 2026
Signed-off-by: Lancer <maruixiang6688@gmail.com>
Signed-off-by: Lancer <402430575@qq.com>
Co-authored-by: Didan Deng <33117903+wtomin@users.noreply.github.com>
clodaghwalsh17 pushed a commit to clodaghwalsh17/nm-vllm-omni-ent that referenced this pull request May 12, 2026
Signed-off-by: Lancer <maruixiang6688@gmail.com>
Signed-off-by: Lancer <402430575@qq.com>
Co-authored-by: Didan Deng <33117903+wtomin@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready label to trigger buildkite CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: vllm-omni(v0.14.0)+GLM-Image OOM, seems TP not works

4 participants