Skip to content

Fix DiffusionGemma selected-canvas SFT decoding - #777

Open
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:fix/diffusion-selected-canvas-decode
Open

Fix DiffusionGemma selected-canvas SFT decoding#777
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:fix/diffusion-selected-canvas-decode

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Address the multi-canvas cache semantics reported in #773.

The SFT encoder moves each cache cursor to the selected canvas start, but the decoder currently submits the full response as queries. For selected canvases after index zero this shifts and wraps K/V writes into later-canvas and prompt slots.

Decode exactly canvas_size queries at the selected canvas positions, gather aligned time and self-conditioning tensors, and scatter the selected logits back only to preserve the existing full-response masked loss interface. Add regression coverage for selected query length, positions, future-canvas isolation, and preselected inputs.

Address the multi-canvas cache semantics reported in google-deepmind#773.

The SFT encoder moves each cache cursor to the selected canvas start, but the decoder currently submits the full response as queries. For selected canvases after index zero this shifts and wraps K/V writes into later-canvas and prompt slots.

Decode exactly canvas_size queries at the selected canvas positions, gather aligned time and self-conditioning tensors, and scatter the selected logits back only to preserve the existing full-response masked loss interface. Add regression coverage for selected query length, positions, future-canvas isolation, and preselected inputs.
@sylvesterkaczmarek
sylvesterkaczmarek marked this pull request as ready for review August 15, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant