Skip to content

[Bugfix] DiffusionGemma: cast the self-conditioning soft embed to the buffer dtype - #57462

Merged
LucasWilkinson merged 3 commits into
vllm-project:mainfrom
mmastrac:dgemma-sc-embed-dtype
Sep 20, 2026
Merged

LucasWilkinson merged 3 commits into
vllm-project:mainfrom
mmastrac:dgemma-sc-embed-dtype

Conversation

@mmastrac

@mmastrac mmastrac commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

The self-conditioning soft embed is computed in the embedding weight's dtype and written
into the fp32 self_conditioning_embeds buffer.

Once dynamo falls back to eager (past the recompile limit, which happens when requests
arrive in several canvas widths) the index put raises a dtype mismatch and the engine dies.

Cast explicitly so the eager and compiled paths agree.

Test plan

Hardware: 1 DGX Spark, google/diffusiongemma-26B-A4B-it.

Setting TORCHDYNAMO_DISABLE=1 disables torch.compile entirely, so _compiled_sample_step runs eagerly from the very first denoise step and hits the dtype-mismatched index put immediately

TORCHDYNAMO_DISABLE=1 vllm serve google/diffusiongemma-26B-A4B-it


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

… buffer dtype

The soft embed is computed in the embedding weight's dtype and written
into the fp32 self-conditioning buffer. Inductor inserts the cast, so the
compiled step is fine, but once dynamo falls back to eager (past the
recompile limit, for instance when requests come in several canvas widths)
the index put raises a dtype mismatch and the engine dies. Cast explicitly
so both paths agree.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Matt Mastracci <matthew@mastracci.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify mergify Bot added the bug Something isn't working label Sep 18, 2026
@LucasWilkinson LucasWilkinson added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 18, 2026
@LucasWilkinson

Copy link
Copy Markdown
Contributor

/ci run

@github-actions

Copy link
Copy Markdown

✅ @mmastrac, CI is now available for this PR.

  • /ci run starts upstream CI; /amd-ci run starts AMD CI only.
  • Your branch must contain every commit currently on its upstream target branch. Merge or rebase onto the latest target branch, then rerun the command. Append --allow-stale to a run command to test an outdated branch at your own risk.
  • /ci retry retries failed jobs in the CI build for the current PR head. If the current head has no CI build, it starts a new CI build for the current head containing only jobs that failed in the latest earlier CI build for this PR.
  • /amd-ci retry retries failed jobs in AMD CI for the current PR head. Use /amd-ci run when the current head has no AMD CI build.
  • /ci cancel cancels scheduled or running CI builds for this PR branch; /amd-ci cancel does the same for AMD CI only.

@LucasWilkinson

Copy link
Copy Markdown
Contributor

/ci run

@LucasWilkinson
LucasWilkinson enabled auto-merge (squash) September 18, 2026 21:28
@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #89919 for commit b9dc1f45b7fc.

@github-actions

Copy link
Copy Markdown

✅ CI is already running for this commit: https://buildkite.com/vllm/ci/builds/89919

@mmastrac

Copy link
Copy Markdown
Contributor Author

/ci retry

@github-actions

Copy link
Copy Markdown

✅ Queued 2 failed job(s) for retry in Buildkite CI #89919.

@mmastrac

Copy link
Copy Markdown
Contributor Author

/ci retry

@github-actions

Copy link
Copy Markdown

✅ Queued 2 failed job(s) for retry in Buildkite CI #89919.

@mmastrac

Copy link
Copy Markdown
Contributor Author

/ci retry

@github-actions

Copy link
Copy Markdown

✅ Queued 2 failed job(s) for retry in Buildkite CI #89919.

@mmastrac

Copy link
Copy Markdown
Contributor Author

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #90003 for commit 4777782b4de7.

@mmastrac

Copy link
Copy Markdown
Contributor Author

/ci retry

@github-actions

Copy link
Copy Markdown

✅ Queued 1 failed job(s) for retry in Buildkite CI #90003.

@LucasWilkinson
LucasWilkinson merged commit 0c90804 into vllm-project:main Sep 20, 2026
136 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants