Skip to content

fix(schedulers): guard Helios schedulers against float64 on MPS - #14427

Open
erensh27 wants to merge 2 commits into
huggingface:mainfrom
erensh27:fix/helios-mps-float64
Open

fix(schedulers): guard Helios schedulers against float64 on MPS#14427
erensh27 wants to merge 2 commits into
huggingface:mainfrom
erensh27:fix/helios-mps-float64

Conversation

@erensh27

@erensh27 erensh27 commented Aug 9, 2026

Copy link
Copy Markdown

Fixes #14367.

Both Helios schedulers build float64 tensors without the MPS guard used elsewhere in the codebase, so on Apple Silicon the pipeline fails with TypeError at the first scheduler call.

Changes in src/diffusers/schedulers/scheduling_helios.py and scheduling_helios_dmd.py:

  • set_timesteps (both): when the target device is MPS, cast the NumPy schedule to float32 before from_numpy and force the concatenated sigmas tensor to float32 — mps does not support float64. Non-MPS behavior unchanged.
  • convert_flow_pred_to_x0 (HeliosDMDScheduler): keep float64 for the high-precision calculation on non-MPS devices; use float32 on MPS instead of x.double().to(device).

Mirrors the existing guard in scheduling_consistency_models.py / scheduling_cosine_dpmsolver_multistep.py.

The labeler LLM is told to pick from a fixed set of labels, but several
of those labels do not exist in the repo (e.g. 'compile',
'attention-backends', 'torchao', 'new-pipeline/model'). Applying any of
them with 'gh issue edit --add-label' fails the whole job, so most bug
reports end up with no labels at all (issue huggingface#14377: 'needs-env-info').

Filter the model output against the repo's actual label list before
applying, and emit a warning for any label that does not exist instead
of failing the run.
Both Helios schedulers built float64 tensors without the MPS guard
used elsewhere in the codebase, raising TypeError on Apple Silicon
the moment the pipeline set timesteps (or reached
convert_flow_pred_to_x0).

- set_timesteps (both schedulers): when the target device is MPS, cast
  the numpy schedule to float32 before from_numpy, and force the
  concatenated sigma tensor to float32 (mps does not support float64).
- convert_flow_pred_to_x0 (HeliosDMDScheduler): use float64 for
  calculation on non-MPS devices, fall back to float32 on MPS.

Mirrors the existing device guard in
scheduling_consistency_models.py and scheduling_cosine_dpmsolver_multistep.py.
@github-actions github-actions Bot added size/S PR with diff < 50 LOC CI schedulers fixes-issue and removed size/S PR with diff < 50 LOC labels Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Helios schedulers raise TypeError on MPS: float64 without the device guard

1 participant