Skip to content

Add FLUX.1 export and runtime support - #24376

Open
kiymetakdemir wants to merge 4 commits into
pytorch:mainfrom
kiymetakdemir:flux1-support
Open

kiymetakdemir wants to merge 4 commits into
pytorch:mainfrom
kiymetakdemir:flux1-support

Conversation

@kiymetakdemir

Copy link
Copy Markdown
Contributor

Summary

Add black-forest-labs/FLUX.1-dev and black-forest-labs/FLUX.1-schnell support to the Diffusers exporter and runner. The pipeline handles CLIP/T5 conditioning, packed image latents, flow-matching schedules and checkpoint-specific guidance defaults through the existing component interfaces.

Static and bounded dynamic exports share precomputed RoPE coordinate tables, preserving the reference computation without float64 operations in the exported graph.

Authored with OpenAI Codex.

Test plan

63 tests passed:

python -m pytest export/tests/test_diffusers.py extension/diffusers/test/test_diffusers.py \
  -q -k 'not portable_pte and not portable_flux_pte' --disable-warnings

Exported and ran FLUX.1-dev and FLUX.1-schnell on MLX with a BF16 denoiser and FP32 text encoders/VAE. Checked dynamic execution at 768x1024. Dev's static and dynamic programs produced pixel-identical images at 1024x1024 with the same prompt and seed.

@pytorch-bot

pytorch-bot Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24376

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (1 Unrelated Failure)

As of commit b2f63ac with merge base 893d815 (image):

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 31, 2026
@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

This branch has not been deployed

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant