[Bugfix] Align the AR and DiT prompt formatting across both online and offline modes. (#3516)

Signed-off-by: dengyunyang <584797741@qq.com>
Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
dengyunyangandHongsheng Liu authored and GitHub committed 2026-05-12 12:13:30 +08:00
1 parent ce621be29b
commit 0d91fbbbb7
5 files changed
+49 -18

No files matched your search

@@ -192,9 +192,9 @@ def main():
# Format prompts
formatted_prompts: list[OmniPromptType] = []
for p in prompts:
token_ids = build_prompt_tokens(p, tokenizer, task=task, sys_type=args.sys_type)
preset_sys_type, _, _ = _TASK_PRESETS[task]
effective_sys_type = args.sys_type or preset_sys_type
result = build_prompt_tokens(p, tokenizer, task=task, sys_type=args.sys_type)
token_ids = result.token_ids
effective_sys_type = result.system_prompt_type
# `prompt_token_ids` drives the AR stage (matches HF byte-for-byte).
# `prompt` and `use_system_prompt` are forwarded by ar2diffusion to