Skip to content

[DtoH sync] set scheduler begin index in SD3 T2I - #14176

Open
laradipupo wants to merge 1 commit into
huggingface:mainfrom
laradipupo:fix/dtoh-sync-sd3
Open

laradipupo wants to merge 1 commit into
huggingface:mainfrom
laradipupo:fix/dtoh-sync-sd3

Conversation

@laradipupo

Copy link
Copy Markdown

Description

Sets the scheduler's begin index to 0 before the denoising loop in SD3 T2I, eliminating the implicit GPU鈫扖PU synchronization point from index_for_timestep.item(). This enables full torch.compile graph capture.

Follows the established pattern from PR #11696 (already deployed in Flux, Flux2, Wan, Z-Image, OVIS-Image, and SDXL).

Changes

  • src/diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3.py: Added canonical set_begin_index(0) block with hasattr guard before the denoising loop.

Verification

  • Fast tests pass: pytest tests/pipelines/stable_diffusion_3/ -x -v
  • make style && make fix-copies && make quality clean

This is commit 1 of 6 per the Phase 1 plan.

@github-actions github-actions Bot added pipelines size/S PR with diff < 50 LOC labels Jul 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi @laradipupo, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. Fixes #1234) to the PR description so the issue is linked. See the contribution guide for more details. If this PR intentionally does not fix a tracked issue, a maintainer can add the no-issue-needed label to silence this reminder.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pipelines size/S PR with diff < 50 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant