Skip to content

perf: eliminate temporary allocations in Philox rounds - #1982

Merged
leejet merged 1 commit into
masterfrom
perf/reduce-philox-allocations
Sep 16, 2026
Merged

leejet merged 1 commit into
masterfrom
perf/reduce-philox-allocations

Conversation

@leejet

@leejet leejet commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace temporary vectors in Philox rounds with 64-bit products and direct extraction of their high and low halves.
  • Eliminate 327,680 small allocations per 16,384-value draw while preserving the random sequence and floating-point
    calculations.

Related Issue / Discussion

N/A

Additional Information

.\bin\Release\sd-cli.exe -m ..\..\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors -p "a lovely cat" -v --fa

12.45it/s -> 14.80it/s

Checklist

@leejet
leejet merged commit cc515a0 into master Sep 16, 2026
9 checks passed
@leejet
leejet deleted the perf/reduce-philox-allocations branch September 16, 2026 18:09
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.

1 participant