Skip to content

Conversation

@bghira
Copy link
Owner

@bghira bghira commented Feb 1, 2026

This pull request addresses a potential issue with floating-point precision in the scheduler's timestep lookup across multiple model pipelines. The main change is the addition of a call to self.scheduler.set_begin_index(0) before entering the denoising loop in each pipeline. This ensures robust and consistent behavior during inference by preventing failures in scheduler.step() due to precision errors, as referenced in a related HuggingFace diffusers pull request.

Key changes by theme:

Scheduler Robustness and Consistency:

  • Added self.scheduler.set_begin_index(0) before the denoising loop in the __call__ or equivalent method of the following pipelines to avoid floating-point precision issues in timestep lookup (see: Avoid DtoH sync from access of nonzero() item in scheduler huggingface/diffusers#11696):
    • auraflow/pipeline.py
    • auraflow/pipeline_controlnet.py
    • chroma/pipeline.py
    • cosmos/pipeline.py
    • flux/pipeline.py [1] [2]
    • flux/pipeline_controlnet.py [1] [2]
    • hidream/pipeline.py
    • hunyuanvideo/pipeline.py
    • hunyuanvideo/pipeline_i2v.py
    • kandinsky5_image/pipeline_kandinsky5_t2i.py
    • kandinsky5_video/pipeline_kandinsky5_t2v.py
    • longcat_image/pipeline.py
    • longcat_image/pipeline_edit.py
    • longcat_video/pipeline.py
    • ltxvideo2/pipeline_ltx2.py
    • ltxvideo2/pipeline_ltx2_image2video.py
    • wan/pipeline.py [1] [2]
    • wan_s2v/pipeline.py
    • z_image/pipeline.py
    • z_image_omni/pipeline.py

@bghira bghira merged commit 05af8c0 into main Feb 1, 2026
2 checks passed
@bghira bghira deleted the bugfix/missing-set-step-zero branch February 1, 2026 15:38
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.

2 participants