[Refactor] Normalize diffusion request extra arguments in Chat serving (#5171)

Signed-off-by: TaffyOfficial <2324465096@qq.com>
Co-authored-by: TaffyOfficial <2324465096@qq.com>
This commit is contained in:
TaffyOfficialandTaffyOfficial authored and GitHub committed 2026-07-30 07:08:12 +00:00
1 parent 1d6c0816a4
commit 0c88f8a0b6
7 files changed
+669 -176

No files matched your search

@@ -610,7 +610,8 @@ class BagelPipeline(nn.Module, SupportsComponentDiscovery, DiffusionPipelineProf
# cfg_text_context: update with negative prompt (no text condition).
# When empty, keep cfg_text_context as-is (kv_lens=0) to match
# original BAGEL.
neg_prompt = extra_args.get("negative_prompt", "")
prompt_negative = first_prompt.get("negative_prompt") if isinstance(first_prompt, dict) else None
neg_prompt = prompt_negative if prompt_negative is not None else extra_args.get("negative_prompt", "")
if neg_prompt:
neg_input, neg_newlens, neg_rope = self.bagel.prepare_prompts(
curr_kvlens=cfg_text_context["kv_lens"],