Skip to content

[Restore] torch.chunk in Flux2SwiGLU from #13485#14107

Open
JingyaHuang wants to merge 2 commits into
huggingface:mainfrom
JingyaHuang:fix-regression-on-torchao
Open

[Restore] torch.chunk in Flux2SwiGLU from #13485#14107
JingyaHuang wants to merge 2 commits into
huggingface:mainfrom
JingyaHuang:fix-regression-on-torchao

Conversation

@JingyaHuang

Copy link
Copy Markdown
Contributor

What does this PR do?

Reverts the manual half-slicing workaround in Flux2SwiGLU.forward back to torch.chunk to fix the regression reported in #14097. The workaround was only added to support the Neuron torch.compile backend, which no longer requires it in their latest beta, so this change carries no downside for Neuron integration.

@github-actions github-actions Bot added size/S PR with diff < 50 LOC models and removed size/S PR with diff < 50 LOC labels Jul 2, 2026
@JingyaHuang JingyaHuang marked this pull request as ready for review July 2, 2026 09:06
@github-actions github-actions Bot added the size/S PR with diff < 50 LOC label Jul 2, 2026
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@Beinsezii Beinsezii left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirmed on my end in real env

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

Labels

models size/S PR with diff < 50 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants