[Bugfix][Model] Add stability window to DiffusionGemma to match HF stability_threshold semantics (#45965)

Signed-off-by: Nathaniel McVicar <namcvica@microsoft.com>
Signed-off-by: Nathaniel McVicar <Nathaniel.McVicar@microsoft.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Nathaniel McVicar
2026-07-06 19:39:12 +00:00
committed by GitHub
co-authored by Harry Mellor
parent 9fde043f54
commit b136cc2c2c
@@ -800,7 +800,10 @@ class DiffusionGemmaModelState(ModelState):
max_denoising_steps=max_denoising_steps,
device=device,
hidden_size=text_config.hidden_size,
stability_threshold=self.gen_config["stability_threshold"],
# In Transformers, `stability_threshold=1` (the default) means the current
# step must match the previous step. In vLLM, the history buffer includes
# the current step, so we add 1 to match the same behavior.
stability_threshold=self.gen_config["stability_threshold"] + 1,
)
self._req_id_to_index: dict[str, int] = {}