Fix batched DiffusionGemma adaptive stopping - #14386
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
dg845
left a comment
There was a problem hiding this comment.
Thanks for the PR! Are the changes (committing finished rows immediately, using scheduler-shaped logits instead of raw denoising model logits) intended to match the DiffusionGemma reference behavior? It's not obvious to me that they are bugfixes rather than modeling changes.
|
thanks @dg845 fixing! |
dg845
left a comment
There was a problem hiding this comment.
Thanks for the changes! Can we also update the DiffusionGemma docs to reflect the new per-batch-example behavior? Specifically, I think these lines need to be updated:
diffusers/docs/source/en/api/pipelines/diffusion_gemma.md
Lines 148 to 152 in 9284607
(For my question about the whether the changes are a bugfix, I believe the answer is that this PR's changes update the diffusers implementation to match the transformers implementation's batched adaptive stopping behavior.)
DiffusionGemma adaptive stopping currently waits for the whole batch to converge, so rows that finish early keep changing while slower rows continue. It also measures confidence from the raw model logits instead of the scheduler-shaped logits used for sampling.
This freezes each row once it is stable and confident, and uses the scheduler logits for the stopping decision. A regression test covers both cases.
Checks:
make qualitymake fix-copies11 passed)