From c9f2e5ad94032b8f2493ca829560efb607e26b79 Mon Sep 17 00:00:00 2001 From: Atharv Arun Chivate <167702506+atharv0o@users.noreply.github.com> Date: Tue, 4 Aug 2026 23:23:59 +0530 Subject: [PATCH] fix(bagel): correct CFG position ID concatenation for multimodal RoPE (#5775) Signed-off-by: atharv0o --- vllm_omni/diffusion/models/bagel/bagel_transformer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm_omni/diffusion/models/bagel/bagel_transformer.py b/vllm_omni/diffusion/models/bagel/bagel_transformer.py index 33f86f34b..de21ddccf 100644 --- a/vllm_omni/diffusion/models/bagel/bagel_transformer.py +++ b/vllm_omni/diffusion/models/bagel/bagel_transformer.py @@ -2426,7 +2426,7 @@ class Bagel(CFGParallelMixin, nn.Module): batched_sequence = packed_sequence.repeat(num_branches, 1) batched_vae_indexes = torch.cat([packed_vae_token_indexes + i * seq_len for i in range(num_branches)]) - batched_position_ids = torch.cat(cfg_branch_pids) + batched_position_ids = torch.cat(cfg_branch_pids, dim=1 if cfg_branch_pids[0].ndim == 2 else 0) batched_seqlens = packed_seqlens.repeat(num_branches) merged_cache = NaiveCache.merge(cfg_branch_caches)