From 248b2de881d48c43d2563d4aabe19b50a85b51b5 Mon Sep 17 00:00:00 2001 From: abhinav <244986440+erensh27@users.noreply.github.com> Date: Sun, 9 Aug 2026 13:13:07 +0530 Subject: [PATCH 1/2] fix(ci): never fail issue labeler on unknown labels 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 #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. --- .github/workflows/issue_labeler.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/issue_labeler.yml b/.github/workflows/issue_labeler.yml index 30acf9193df0..ced0f81ae127 100644 --- a/.github/workflows/issue_labeler.yml +++ b/.github/workflows/issue_labeler.yml @@ -31,6 +31,11 @@ jobs: ISSUE_NUMBER: ${{ github.event.issue.number }} LABELS: ${{ steps.get-labels.outputs.labels }} run: | + existing=$(gh label list --limit 100 --json name | python -c "import json,sys; print('\n'.join(l['name'] for l in json.load(sys.stdin)))") for label in $(echo "$LABELS" | python -c "import json,sys; print('\n'.join(json.load(sys.stdin)))"); do - gh issue edit "$ISSUE_NUMBER" --add-label "$label" + if echo "$existing" | grep -Fqx "$label"; then + gh issue edit "$ISSUE_NUMBER" --add-label "$label" + else + echo "::warning::Issue labeler produced '$label', which does not exist in this repo; skipping." + fi done From f2383a2d311910d57c9a693452222e530445d540 Mon Sep 17 00:00:00 2001 From: abhinav <244986440+erensh27@users.noreply.github.com> Date: Sun, 9 Aug 2026 13:14:08 +0530 Subject: [PATCH 2/2] fix(schedulers): guard Helios schedulers against float64 on MPS 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. --- src/diffusers/schedulers/scheduling_helios.py | 9 +++++++-- src/diffusers/schedulers/scheduling_helios_dmd.py | 14 +++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/diffusers/schedulers/scheduling_helios.py b/src/diffusers/schedulers/scheduling_helios.py index 6d24e54627aa..cc17ccc445f6 100644 --- a/src/diffusers/schedulers/scheduling_helios.py +++ b/src/diffusers/schedulers/scheduling_helios.py @@ -235,8 +235,13 @@ def set_timesteps( ratios = np.linspace(stage_sigmas[0].item(), stage_sigmas[-1].item(), num_inference_steps) sigmas = torch.from_numpy(ratios) - self.timesteps = torch.from_numpy(timesteps).to(device=device) - self.sigmas = torch.cat([sigmas, torch.zeros(1)]).to(device=device) + if device is not None and torch.device(device).type == "mps": + # mps does not support float64 + self.timesteps = torch.from_numpy(timesteps.astype(np.float32)).to(device=device) + self.sigmas = torch.cat([sigmas, torch.zeros(1)]).to(device=device, dtype=torch.float32) + else: + self.timesteps = torch.from_numpy(timesteps).to(device=device) + self.sigmas = torch.cat([sigmas, torch.zeros(1)]).to(device=device) self._step_index = None self.reset_scheduler_history() diff --git a/src/diffusers/schedulers/scheduling_helios_dmd.py b/src/diffusers/schedulers/scheduling_helios_dmd.py index 1f4afa0e3128..dc0ab0a8444e 100644 --- a/src/diffusers/schedulers/scheduling_helios_dmd.py +++ b/src/diffusers/schedulers/scheduling_helios_dmd.py @@ -213,8 +213,13 @@ def set_timesteps( ratios = np.linspace(stage_sigmas[0].item(), stage_sigmas[-1].item(), num_inference_steps) sigmas = torch.from_numpy(ratios) - self.timesteps = torch.from_numpy(timesteps).to(device=device) - self.sigmas = torch.cat([sigmas, torch.zeros(1)]).to(device=device) + if device is not None and torch.device(device).type == "mps": + # mps does not support float64 + self.timesteps = torch.from_numpy(timesteps.astype(np.float32)).to(device=device) + self.sigmas = torch.cat([sigmas, torch.zeros(1)]).to(device=device, dtype=torch.float32) + else: + self.timesteps = torch.from_numpy(timesteps).to(device=device) + self.sigmas = torch.cat([sigmas, torch.zeros(1)]).to(device=device) self._step_index = None self.reset_scheduler_history() @@ -275,7 +280,10 @@ def convert_flow_pred_to_x0(self, flow_pred, xt, timestep, sigmas, timesteps): # use higher precision for calculations original_dtype = flow_pred.dtype device = flow_pred.device - flow_pred, xt, sigmas, timesteps = (x.double().to(device) for x in (flow_pred, xt, sigmas, timesteps)) + target_dtype = torch.float32 if device.type == "mps" else torch.float64 + flow_pred, xt, sigmas, timesteps = ( + x.to(device=device, dtype=target_dtype) for x in (flow_pred, xt, sigmas, timesteps) + ) timestep_id = torch.argmin((timesteps.unsqueeze(0) - timestep.unsqueeze(1)).abs(), dim=1) sigma_t = sigmas[timestep_id].reshape(-1, 1, 1, 1, 1)