Repository navigation
FLUX 3 on 8 and 12 GB cards: stream Qwen3-VL layers and fp8 linears - #74
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 Image Klein on 8 and 12 GB cards.
flux3_load_pipeline()decides what streams based on the card size (vram_gb, detected by default). Version 0.2.2.17.Streaming
stream_text(default below 10 GB): the Qwen3-VL layers stay in pinned host memory and move to the GPU one at a time during the encode, which takes about 1 s. The whole encoder would need about 9 GB at once.resident_gb(defaultvram_gb - 6.5below 12 GB): that many GB of fp8 transformer weights stay on the GPU. The remaining linears copy in from pinned memory inside each forward, reusing the existing host path inltx23_fp8_linear.Garbage collection
diffuseR.block_gcis on.reserved_rate× total. The 12 GB-footprint default works out to 0.92 on an 8 GB card, so no gc ran there even when an allocation failed.Measured (RTX 5060 Ti 16 GB, fp8; smaller cards simulated by holding memory in an unused tensor)
test_flux3_stream.R: the plan, Qwen layer streaming parity, and the fp8 split census and parity).Not in this PR
recommend()entry for FLUX 3.