Skip to content

Fix rescale_noise_cfg zero std handling#13763

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

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
Copy link
Copy Markdown

@arieleli01212 arieleli01212 commented May 17, 2026

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
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