Skip to content

[Model] Add HSDP support for LTX-2#2899

Merged
hsliuustc0106 merged 8 commits into
vllm-project:mainfrom
fywc:support-ltx2-hsdp
Apr 20, 2026
Merged

[Model] Add HSDP support for LTX-2#2899
hsliuustc0106 merged 8 commits into
vllm-project:mainfrom
fywc:support-ltx2-hsdp

Conversation

@fywc

@fywc fywc commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

PLEASE FILL IN THE PR DESCRIPTION HERE ENSURING ALL CHECKLIST ITEMS (AT THE BOTTOM) HAVE BEEN CONSIDERED.

Purpose

Add LTX-2 HSDP support.

This PR resolves the LTX-2 gap in HSDP support from RFC #1217 by:

  • defining shard conditions for LTX2VideoTransformer3DModel so HSDP can shard repeated transformer blocks
  • integrating LTX-2 into the existing FSDP2-based HSDP flow without changing HSDP core logic
  • updating tests and documentation to reflect LTX-2 HSDP support

Test Plan

Test Result

INFO 04-18 07:58:31 [diffusers_loader.py:324] Loading weights took 2.77 seconds
INFO 04-18 07:58:31 [hsdp.py:128] HSDP Inference: replicate_size=1, shard_size=2, world_size=2, rank=0, fs_world_size=2, fs_rank=0
INFO 04-18 07:58:34 [platform.py:77] Defaulting to diffusion attention backend FLASH_ATTN
INFO 04-18 07:58:37 [hsdp.py:128] HSDP Inference: replicate_size=1, shard_size=2, world_size=2, rank=1, fs_world_size=2, fs_rank=1
INFO 04-18 07:58:39 [hsdp.py:202] Sharded 912 modules + root
INFO 04-18 07:58:39 [hsdp.py:173] HSDP applied to model: FSDPLTX2VideoTransformer3DModel
INFO 04-18 07:58:40 [diffusion_model_runner.py:142] Model loading took 45.5504 GiB and 23.878847 seconds
INFO 04-18 07:58:40 [diffusion_model_runner.py:147] Model runner: Model loaded successfully.
INFO 04-18 07:58:40 [diffusion_model_runner.py:188] Model runner: Initialization complete.


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)

fywc and others added 2 commits April 18, 2026 07:57
@fywc fywc requested a review from hsliuustc0106 as a code owner April 18, 2026 08:00
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@hsliuustc0106

Copy link
Copy Markdown
Collaborator

can you profile with HSDP and check whether there are some free bubble in the first a few blocks with FSDP on? We notice some similar issues with WAN 2.2

Comment thread tests/diffusion/models/ltx2/test_ltx2_hsdp.py

@gcanlin gcanlin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Only one issue needs to be fixed. Otherwise LGTM.

@hsliuustc0106

Copy link
Copy Markdown
Collaborator

Well-structured PR adding HSDP support to LTX-2. Good test coverage and documentation.

Signed-off-by: hanzheli <hanzheli@kuaishou.com>
@fywc

fywc commented Apr 18, 2026

Copy link
Copy Markdown
Contributor Author

can you profile with HSDP and check whether there are some free bubble in the first a few blocks with FSDP on? We notice some similar issues with WAN 2.2

I’ll profile LTX-2 with HSDP enabled for this problem as soon as possible, is there any related issues already?

fywc and others added 2 commits April 18, 2026 19:19
Signed-off-by: hanzheli <hanzheli@kuaishou.com>
@fywc

fywc commented Apr 18, 2026

Copy link
Copy Markdown
Contributor Author

can you profile with HSDP and check whether there are some free bubble in the first a few blocks with FSDP on? We notice some similar issues with WAN 2.2

I’ll profile LTX-2 with HSDP enabled for this problem as soon as possible, is there any related issues already?

Hi,I did a profiling analysis on LTX-2 to investigate this problem, not sure if this is helpful or matches what you have observed with WAN2.2 ?

Test environment:

  • 2 × NVIDIA H200 GPU
  • HSDP shard size = 2

Test Flow

  • Initialize the LTX-2 model with & without HSDP.
  • Send one request to warmup the model.
  • Profile the next one request and analysis data.

Key findings:

Enabling HSDP introduces a noticeable latency increase at the block level:

  • Per-block latency increases from ~10 ms → ~27 ms (~2.5–3x).
  • The overhead is consistent across all transformer blocks, not a one-off effect.

Breaking down the block:

  • Both Attention and FFN stages are slower (~2–3x).
  • The main overhead comes from RowParallelLinear / ColumnParallel ops, each increasing from ~100 µs → ~1.2–1.4 ms.

According to the stream timeline :

  • HSDP introduces additional NCCL all_gather streams.
  • However, these comm streams are not effectively overlapped with compute, leading to visible pipeline bubbles.

As a result, Maybe the free bubbles are mainly due to lack of comm/compute overlap, rather than compute inefficiency itself.

PS:
2 snapshots showing timeline with one block:

  • without HSDP
image (7)
  • with HSDP
image (8)

@gcanlin gcanlin added the ready label to trigger buildkite CI label Apr 19, 2026
@hsliuustc0106

Copy link
Copy Markdown
Collaborator

can you profile with HSDP and check whether there are some free bubble in the first a few blocks with FSDP on? We notice some similar issues with WAN 2.2

I’ll profile LTX-2 with HSDP enabled for this problem as soon as possible, is there any related issues already?

Hi,I did a profiling analysis on LTX-2 to investigate this problem, not sure if this is helpful or matches what you have observed with WAN2.2 ?

Test environment:

  • 2 × NVIDIA H200 GPU
  • HSDP shard size = 2

Test Flow

  • Initialize the LTX-2 model with & without HSDP.
  • Send one request to warmup the model.
  • Profile the next one request and analysis data.

Key findings:

Enabling HSDP introduces a noticeable latency increase at the block level:

  • Per-block latency increases from ~10 ms → ~27 ms (~2.5–3x).
  • The overhead is consistent across all transformer blocks, not a one-off effect.

Breaking down the block:

  • Both Attention and FFN stages are slower (~2–3x).
  • The main overhead comes from RowParallelLinear / ColumnParallel ops, each increasing from ~100 µs → ~1.2–1.4 ms.

According to the stream timeline :

  • HSDP introduces additional NCCL all_gather streams.
  • However, these comm streams are not effectively overlapped with compute, leading to visible pipeline bubbles.

As a result, Maybe the free bubbles are mainly due to lack of comm/compute overlap, rather than compute inefficiency itself.

PS: 2 snapshots showing timeline with one block:

  • without HSDP
image (7) * with HSDP image (8)

do you mean HSDP introduces negative latency impact for LTX-2?

@hsliuustc0106

Copy link
Copy Markdown
Collaborator

how about the peak vram consumption?

hsliuustc0106

This comment was marked as outdated.

@fywc

fywc commented Apr 19, 2026

Copy link
Copy Markdown
Contributor Author

how about the peak vram consumption?

Peak vram remains the same with HSDP enabled, no noticeable difference observed.

@fywc

fywc commented Apr 19, 2026

Copy link
Copy Markdown
Contributor Author

can you profile with HSDP and check whether there are some free bubble in the first a few blocks with FSDP on? We notice some similar issues with WAN 2.2

I’ll profile LTX-2 with HSDP enabled for this problem as soon as possible, is there any related issues already?

Hi,I did a profiling analysis on LTX-2 to investigate this problem, not sure if this is helpful or matches what you have observed with WAN2.2 ?
Test environment:

  • 2 × NVIDIA H200 GPU
  • HSDP shard size = 2

Test Flow

  • Initialize the LTX-2 model with & without HSDP.
  • Send one request to warmup the model.
  • Profile the next one request and analysis data.

Key findings:
Enabling HSDP introduces a noticeable latency increase at the block level:

  • Per-block latency increases from ~10 ms → ~27 ms (~2.5–3x).
  • The overhead is consistent across all transformer blocks, not a one-off effect.

Breaking down the block:

  • Both Attention and FFN stages are slower (~2–3x).
  • The main overhead comes from RowParallelLinear / ColumnParallel ops, each increasing from ~100 µs → ~1.2–1.4 ms.

According to the stream timeline :

  • HSDP introduces additional NCCL all_gather streams.
  • However, these comm streams are not effectively overlapped with compute, leading to visible pipeline bubbles.

As a result, Maybe the free bubbles are mainly due to lack of comm/compute overlap, rather than compute inefficiency itself.
PS: 2 snapshots showing timeline with one block:

  • without HSDP
image (7) * with HSDP image (8)

do you mean HSDP introduces negative latency impact for LTX-2?

I think so. Possibly similar behavior may appear on other models as well, I can follow up with additional tests and analysis.

@fywc

fywc commented Apr 20, 2026

Copy link
Copy Markdown
Contributor Author

cc @hsliuustc0106 @gcanlin

@hsliuustc0106

Copy link
Copy Markdown
Collaborator

thanks, I hope you can profile higher resolution inputs which HSDP may benefit more

@hsliuustc0106 hsliuustc0106 merged commit d613864 into vllm-project:main Apr 20, 2026
8 checks passed
nainiu258 pushed a commit to nainiu258/vllm-omni that referenced this pull request Apr 21, 2026
Signed-off-by: hanzheli <hanzheli@kuaishou.com>
Signed-off-by: fywc <hanzheli@kuaishou.com>
Signed-off-by: nainiu258 <cperfect02@163.com>
qinganrice pushed a commit to qinganrice/vllm-omni that referenced this pull request Apr 23, 2026
Signed-off-by: hanzheli <hanzheli@kuaishou.com>
Signed-off-by: fywc <hanzheli@kuaishou.com>
lengrongfu pushed a commit to lengrongfu/vllm-omni that referenced this pull request May 1, 2026
Signed-off-by: hanzheli <hanzheli@kuaishou.com>
Signed-off-by: fywc <hanzheli@kuaishou.com>
clodaghwalsh17 pushed a commit to clodaghwalsh17/nm-vllm-omni-ent that referenced this pull request May 12, 2026
Signed-off-by: hanzheli <hanzheli@kuaishou.com>
Signed-off-by: fywc <hanzheli@kuaishou.com>
daixinning pushed a commit to daixinning/vllm-omni that referenced this pull request May 28, 2026
Signed-off-by: hanzheli <hanzheli@kuaishou.com>
Signed-off-by: fywc <hanzheli@kuaishou.com>
quyifei23 pushed a commit to quyifei23/vllm-omni that referenced this pull request Jun 6, 2026
Signed-off-by: hanzheli <hanzheli@kuaishou.com>
Signed-off-by: fywc <hanzheli@kuaishou.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.

3 participants