Repository navigation
FLUX 3 in less host RAM: fp8 Qwen3-VL text encoder - #79
Merged
Merged
Conversation
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.
FLUX 3 now ships an fp8 Qwen3-VL text encoder artifact, which lowers peak host RAM from 20.2 GB to 15.5 GB at 1024x1024 with the same speed and near-identical images.
Changes
R/quantize_qwen3.R(new):qwen3_quantize()writes a Qwen3 or Qwen3-VL text model as an fp8 or NF4 artifact. The 252 projection linears are quantized; embeddings and norms stay bf16; the vision tower and tied LM head are dropped.load_qwen3_text_encoder()loads such an artifact. Its config-to-args code moved into.qwen3_args().download_flux3_klein(text_precision = "fp8")builds the artifact by default.flux3_load_pipeline(text_precision = "auto")uses fp8, then NF4, else bf16..fp8_quantize().Measured (16 GB card, 1024x1024, two renders each)
Full tinytest suite: 1745 passed, 0 failed (37 new).