Repository navigation
FLUX 3 Image Klein: text-to-image and single-reference editing - #73
Merged
Merged
Conversation
Port of the diffusers FLUX 3 transformer and distilled modular pipeline: flux3_transformer (per-mode + joint blocks, per-token modulation, flow-map target timestep), Qwen3-VL text path (flux3_encode_prompt; the Qwen3 encoder gains position ids, Qwen3-VL loading, and HF's post-norm last hidden state), fill-mode reference preprocessing, txt2img_flux3, img2img_flux3, flux3_load_pipeline and download_flux3_klein (gated, pinned snapshot, fp8 census 265). FLUX 3 transformers load as skeletons to keep host RAM under the bf16 size.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds FLUX 3 Image Klein (black-forest-labs/flux-3-image-klein): text-to-image and single-reference editing, ported from the diffusers pipeline. Version 0.2.2.16.
What's in it
flux3_transformer(): per-mode blocks (image, reference, text; 5 each) then 28 joint blocks, per-token timestep modulation, target-timestep embedder. Built as a skeleton so a bf16 load peaks at ~15 GB host RAM instead of 22 GB.load_qwen3_text_encoder()(layers 4..32 stacked, prompt padded to a multiple of 80).flux3_preprocess_image(): reference kept whole, scaled to fitmax_area(default 4 MP), reflect-padded to the 16 px grid, output cropped back.Shared fixes
flux2_feed_forwarduseslinear_noinit.Validation (real weights)
Not in this PR
The weights are under the FLUX Kommunity License and are never redistributed; see
inst/COPYRIGHTS.