[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>
Nathaniel McVicar committed
Jul 6, 2026 at 12:39 UTC
b136cc2c2c590593c9dfff2bd732edbb24bcceeb
1 file changed
+4
-1
vllm/model_executor/models/diffusion_gemma.py
+4
-1
@@ -800,7 +800,10 @@ class DiffusionGemmaModelState(ModelState):
800
max_denoising_steps=max_denoising_steps,
801
device=device,
802
hidden_size=text_config.hidden_size,
803
- stability_threshold=self.gen_config["stability_threshold"],
803
+ # In Transformers, `stability_threshold=1` (the default) means the current
804
+ # step must match the previous step. In vLLM, the history buffer includes
805
+ # the current step, so we add 1 to match the same behavior.
806
+ stability_threshold=self.gen_config["stability_threshold"] + 1,
807
)
808
self._req_id_to_index: dict[str, int] = {}
809