[Bugfix] Fix HunyuanVL XD-RoPE (#29593)

Signed-off-by: Roger Wang <hey@rogerw.io>
Co-authored by: grider-transwithai <grider@transwith.ai>
This commit is contained in:
Roger Wang
2025-11-27 04:36:24 -08:00
committed by GitHub
parent a5abd1d384
commit cf348c8d27
2 changed files with 4 additions and 4 deletions

View File

@@ -847,7 +847,7 @@ class HunYuanVLForConditionalGeneration(
.expand(-1, llm_grid_w + 1)
.reshape(-1)
)
h_index[pos : pos + token_num] = 0
t_index[pos : pos + token_num] = image_index
if xd_num == 4:
llm_positions = torch.stack([p_index, w_index, h_index, t_index])