Skip to content

Fix rescale_noise_cfg zero std handling#13763

Closed
arieleli01212 wants to merge 1 commit into
huggingface:mainfrom
arieleli01212:codex/fix-rescale-noise-cfg-zero-std
Closed

Fix rescale_noise_cfg zero std handling#13763
arieleli01212 wants to merge 1 commit into
huggingface:mainfrom
arieleli01212:codex/fix-rescale-noise-cfg-zero-std

Conversation

@arieleli01212

@arieleli01212 arieleli01212 commented May 17, 2026

Copy link
Copy Markdown

Summary

  • avoid division by zero in rescale_noise_cfg when the guided noise prediction has zero variance
  • propagate the copied helper updates across Diffusers pipelines
  • add regression coverage for the pipeline and guider helpers

Fixes #13425.

Tests

  • PYTHONPATH=src python utils/check_copies.py
  • ruff check $(git diff --name-only) tests/others/test_rescale_noise_cfg.py
  • PYTHONPATH=src python -m pytest tests/others/test_rescale_noise_cfg.py -q

@arieleli01212 arieleli01212 marked this pull request as ready for review May 17, 2026 20:21
@arieleli01212

Copy link
Copy Markdown
Author

Going to close this one out — it's been open a while without any review, so I'll clear it from my open PRs. Happy to reopen if it's still useful to anyone.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Division by zero in rescale_noise_cfg can produce NaNs during inference

1 participant