Field SOP
Field SOP

8GB VRAM, 4K Output: FLUX 3 Klein's Three Pitfalls

A practical path to running FLUX 3 Image Klein on consumer Nvidia cards, with three pitfalls found in the field; every command and filename comes from the official repositories or from third-party recipes that were actually run. The main line is ComfyUI. The repository black-forest-labs/flux-3-image-klein-comfy is gated, marked gated auto in the Hugging Face API, so an anonymous request returns 401 with x-error-code GatedRepo; sign in, accept the terms, then run hf auth login. Next, hf download pulls four files: the distilled int8 transformer at 5,827,874,779 bytes, the Qwen3-VL-4B int8 text encoder at 4,858,559,240 bytes, the w4a8 prompt upsampler at 6,724,090,780 bytes and the FLUX.2 VAE at 336,211,292 bytes. Start with python main.py, open Workflow and then Browse Templates, search FLUX 3 and pick distilled Text to Image with template id image_flux3_klein_distilled_t2i; the template defaults to 1024 by 1024, euler with the simple scheduler, 16 steps and CFG 1, both text-encoder loaders set to type flux3, and the upsampler switch left on. Then the three pitfalls. First, following the card's example and downloading the int8 upsampler at 9,748,113,996 bytes, about 9.08GiB, brings the four files to 19.343GiB, which will not fit a 16GB card, while the ComfyUI v0.41.2 distilled template actually loads the w4a8 file, 2.816GiB smaller. Second, the model card says the editing templates have no upsampler branch and that you should run your own LLM and paste the caption, yet the v0.41.2 editing template does contain an upsampler branch behind a switch that is off by default, a TextGenerate node with the W4A8 loader and an image-editing system prompt, so either route works. Third, running the model without an upsampler gives unstable results in editing and Ref2Image; the card states plainly not to use the model without a prompt upsampler. Memory budget: 11.2GB in BF16, 5.6GB in FP8, INT8 running on 8GB RTX cards, and NVFP4 aimed at data centres. All speed figures are vendor-reported: about 4 seconds per 1MP image on an RTX 5090 and under 9 seconds on an RTX 4070 with the distilled INT8 build, under 0.6 seconds in NVFP4 on a GB300, with a served LoRA adding about 5 percent. Resolution reaches 4K with width and height in multiples of 16, up to 10 reference images are accepted, and official defaults are 16 steps with no guidance for the distilled checkpoint and 50 steps at CFG 3.5 for the base. The Diffusers route is described only as far as is verifiable - it works, and BFL ships reference inference code including a Gradio demo with bounding-box control, with the repository README as the authority; no class names or parameters are invented here. Before commercial use, check the FLUX Kommunity License: free commercial use for individuals and companies under 5 million dollars in annualized revenue, free research and non-commercial use, and self-hosted licensing or the API beyond that, with the LICENSE text governing the details.

Published October 17, 202610 min read
<!-- flux-3-image-klein-local-deploy-sop | sop | 8GB VRAM, 4K Output: FLUX 3 Klein's Three Pitfalls -->

FLUX 3 Image Klein launched with one headline: the INT8 build runs on NVIDIA GeForce RTX cards with as little as 8GB of VRAM. The claim holds, but omits three qualifiers - which card, what resolution, how many seconds. The official speed chart covers 1MP output only, on an RTX 5090 and a 4070; neither an 8GB configuration nor a 4K render appears in it. VentureBeat flagged that gap on launch day.

So this SOP does not promise "8GB, four seconds, 4K." It paves the path from a clean machine to the first image and marks the three places where newcomers lose half a day. ComfyUI is the main route, Diffusers the secondary one. Every command, filename, and byte count is copied from the official repository or a third-party recipe write-up; every speed figure carries its source label.

1. Three Budgets Before You Touch Anything

The GPU tier. The official guidance comes in three bands. 8GB is the floor, held up by the INT8 build - transformer and text encoder both in int8 - and the vendor states it runs on RTX cards down to 8GB through either ComfyUI or Diffusers. 12GB and 16GB are the comfortable band: the same weights run with headroom and can hold the upsampler plus a larger latent at once. Above that: 11.2GB for BF16, 5.6GB for FP8 - weights alone, without activations or cache.

One ratio is easy to miss: the transformer is 5.83GB, while the two language models exceed 11.5GB together. At 8GB the pressure sits in loading both, not in rendering - so tune the language models first, not the step count.

Disk. With the w4a8 upsampler the v0.41.2 template actually loads, the four files total 17,746,736,091 bytes - about 17.6GB decimal, 16.5GiB. There is a three-gigabyte fork: follow the model card's example and you pull the int8 upsampler, 9,748,113,996 bytes for that one file, pushing the total to 19.343GiB. A 16GB card cannot hold that set.

Account and network. The ComfyUI repository is gated; the Hugging Face API reports it as gated: "auto". Without a login and an accepted license, anonymous requests return 401 with x-error-code: GatedRepo. This is not a network fault or a mirror fault - it is an unchecked license box. Access from mainland China also needs a working path to huggingface.co; no official mirror exists.

2. Step One: Accept the License, Then Log In

Order matters: accept the terms in a browser first, then authenticate. Reverse it and hf auth login reports success while downloads still fail with 401 - the decision is repository-side.

  1. Open black-forest-labs/flux-3-image-klein-comfy while logged in and accept the terms. Consent is recorded against the account; a token cannot carry it.
  2. Upgrade the client: pip install -U huggingface_hub. Older versions may not recognize the hf prefix.
  3. Run hf auth login and paste a read-scope token from Access Tokens in account settings.
bash
pip install -U huggingface_hub
hf auth login

Quickest check: run the download and watch whether the first file moves. Still 401? The browser account and the account that minted the token are probably different.

3. Step Two: Download Four Files, Not the Card's Example

Four files, four jobs: the transformer renders, the Qwen3-VL-4B encoder reads prompts, the Qwen3.5-9B upsampler expands a short instruction into a full scene, and the FLUX.2 VAE converts between latent and pixels.

Copy the command; do not edit paths. With --local-dir at ComfyUI/models, the repository's subdirectories land in matching folders.

bash
hf download black-forest-labs/flux-3-image-klein-comfy \
  diffusion_models/flux3_image_klein_sd_int8_convrot.safetensors \
  text_encoders/qwen3vl_4b_int8_convrot.safetensors \
  text_encoders/qwen3.5_9b_flux3_prompt_upsampler_w4a8.safetensors \
  vae/flux2-vae.safetensors --local-dir ComfyUI/models
FilenameRoleBytes
diffusion_models/flux3_image_klein_sd_int8_convrot.safetensorsdistilled transformer, int85,827,874,779 (about 5.83 GB)
text_encoders/qwen3vl_4b_int8_convrot.safetensorsQwen3-VL-4B text encoder, int84,858,559,240 (about 4.86 GB)
text_encoders/qwen3.5_9b_flux3_prompt_upsampler_w4a8.safetensorsprompt upsampler, w4a86,724,090,780
vae/flux2-vae.safetensorsautoencoder336,211,292

The third filename says w4a8, not int8 - deliberate; section 7 does the arithmetic. Total the bytes afterwards; a mismatch fails later in confusing ways.

4. Step Three: Launch, Pick the Right Template

Run python main.py, then open http://127.0.0.1:8188. First launch installs dependencies itself; fill gaps from the terminal.

Then open Browse Templates, search for "FLUX 3", and pick the distilled Text to Image template, id image_flux3_klein_distilled_t2i. It is the right entry point: 16 steps, friendliest on memory and time.

Two failure modes come from the wrong template: a base template with distilled weights produces smeared paint; a template that enables an upsampler node whose file was never downloaded fails at load.

5. Parameters: Defaults Work, Three Things to Verify

The template opens with a working configuration: 1024x1024, euler sampler, simple scheduler, 16 steps, CFG 1. Render one image on defaults before tuning.

Set type to flux3 on both text-encoder loaders. They are separate nodes. Get the type wrong on either and the model reads prompts with the wrong tokenizer and dimensions; the error rarely mentions type, sending debugging sideways.

Leave the upsampler switch on. The model card is blunt: "Do not use the model without a prompt upsampler." Klein understands prompts through Qwen3-VL; feed it a terse instruction and it invents the scene itself, which is rarely the scene you had in mind. Editing and Ref2Image suffer most.

Respect the resolution and step boundaries. The ceiling is 4K, and width and height must be multiples of 16. Ask for 1000x1000 and you get silent alignment or an error. Reference images cap at 10, enough for character consistency and style transfer. The official baselines are distilled at 16 steps with no guidance and base at 50 steps with CFG 3.5. The template already encodes the distilled set, so do not add guidance by hand; it makes output blurrier.

Latent size is a separate node; change it there too, to multiples of 16, before running.

6. The VRAM Budget Table

Precision / buildWeight footprintPositioningSpeed reference
BF1611.2 GBHigh VRAM, preferred for fine-tuningNot listed separately
FP85.6 GBMid-range VRAMNot listed separately
INT8Runs on 8GB RTX cardsConsumer laptops, mid-tier cards1MP image: about 4s on RTX 5090, under 9s on RTX 4070 (vendor figures)
NVFP4Datacenter classHigh throughput1MP image under 0.6s on GB300 (vendor figures)

Keep three qualifiers attached. Every speed number is a vendor figure, not an independent retest, measured with distilled plus INT8 at 1MP in ComfyUI. The 8GB claim ties to no variant, output size, or generation time, and the official chart tests neither 8GB nor 4K, so "8GB renders 4K" is unverified. A LoRA adds roughly 5% generation time - an order of magnitude, not a measurement.

Read the table as a starting order rather than a verdict: 8GB begins at INT8 and 1MP, 12GB buys resolution headroom on the same build, and 16GB is where FP8 and the full w4a8 set become practical. Change one variable at a time and watch peak VRAM.

7. Three Pitfalls That Cost Half a Day

Source note: these three come from third-party recipe write-ups and template inspection, not this author's run.

Pitfall 1: the int8 upsampler makes a 16GB card come up short. The model card's example points at the int8 upsampler, 9,748,113,996 bytes, about 9.08GiB. Total the four files and you get 19.343GiB. Meanwhile the ComfyUI v0.41.2 distilled template loads the w4a8 file by name - 6,724,090,780 bytes, 2.816GiB smaller. A third-party recipe write-up reaches a flat conclusion: follow the card's example, land at 19.343GiB, and a 16GB card cannot hold it. The difference between the two commands is one filename; the cost is nearly 3GB of VRAM and a full re-download.

Pitfall 2: the editing template's upsampler branch - card and template disagree. The model card says the editing template has no upsampler branch and that you must supply your own LLM, then paste the expanded prompt into the node. But the v0.41.2 editing template does contain a branch, disabled by default: a TextGenerate node, a W4A8 loader, and an editing-specific system prompt are all present, and flipping the switch enhances inside the graph. Both routes work. Do not assume the branch is missing because the card says so, nor that its presence makes the upsampler optional.

Pitfall 3: running without the upsampler destabilizes editing and Ref2Image. This follows from pitfall 2. The card's sentence is a prohibition, not a suggestion. Skip the step and text-to-image still looks acceptable, while editing and multi-reference generation drift: regions that should be preserved get repainted, character identity wanders, bounding-box placement shifts. The test is cheap - run the same prompt with the upsampler on and off, then compare untouched regions pixel for pixel.

The subtler version looks like success: composition right, one patch of source texture quietly rewritten - invisible in a thumbnail, obvious at 100% zoom. For product shots and portrait restoration, inspect at pixel level.

8. The Diffusers Route

The weight sources are clear: distilled at huggingface.co/black-forest-labs/flux-3-image-klein, base at huggingface.co/black-forest-labs/flux-3-image-klein-base. Pull with huggingface_hub and hand them to Diffusers. The vendor ships reference inference code and a Gradio demo with bounding-box control. Base is for fine-tuning, distilled for direct rendering.

One honest caveat: this article did not capture the official Diffusers documentation, so it omits class names and call parameters. Writing "three lines with some Pipeline.from_pretrained" would look tidy, but a guessed class name becomes a stack of ImportErrors the moment a reader pastes it. Use the README and example scripts in those repositories as the source of truth.

Diffusers also puts memory management back in your hands: ComfyUI's load-on-demand is built in, while here deciding what to load and when to move it to the GPU is your code. Skip it on an 8GB card and the first image may run out of memory.

9. LoRA and Fine-Tuning

Ostris AI Toolkit and NVIDIA NeMo AutoModel both ship ready-made recipes for Klein. The first is quick to pick up; the second suits teams already on an NVIDIA stack. The published training hardware is NVIDIA GB200 NVL72, a training-side figure with no bearing on 8GB inference.

The vendor gives one inference-side number: a LoRA adds about 5% generation time, small enough that a style LoRA can stay resident. For fine-tuning, start from base - distilled was already compressed for few-step inference.

10. Acceptance Checklist and License Notes

Four checks after the first renders, covering most "something is off but I cannot name it" cases:

  1. Are width and height multiples of 16, and does the output match what you set?
  2. Did the upsampler execute - check node execution and the expanded prompt length.
  3. In editing, are untouched regions preserved? Compare at pixel level.
  4. Is VRAM headroom left at peak? This matters most on a 16GB card at 4K.

Version note: the template id and byte counts correspond to ComfyUI v0.41.2 and a 2026-10-17 snapshot; verify before downloading.

The license is the last gate and the most skipped. Klein uses the FLUX Kommunity License (v1.0). Confirmed by the official blog and VentureBeat: individuals and companies under USD 5 million annual gross revenue may use it commercially free; research and non-commercial use is free for everyone; above that threshold you need a self-hosted commercial license or the API. The trigger is annual gross revenue plus affiliates; the license also conditions output moderation and redistribution separately.

One thing must be said plainly: the full LICENSE text for Klein was not captured, because the repository is gated. Beyond those three points this article does not expand and does not speculate. Before commercial deployment, open the LICENSE file and read it clause by clause. Nothing here is legal advice.

FAQ

Q1: Can 8GB of VRAM actually render 4K? A1: The vendor only says the INT8 build runs on RTX cards down to 8GB, without tying that to a resolution or generation time, and the official chart tests neither 8GB nor 4K. So "8GB runs" is a vendor statement; "8GB renders 4K" is unverified. Get 1024x1024 working first, then raise resolution while watching peak VRAM.

Q2: I get a 401 GatedRepo error. Is it the network? A2: No. It is a repository-side license decision. Log in on the web, accept the license, then run hf auth login with the same account. Mirrors will not help.

Q3: Do I need all four files, or can I skip the upsampler? A3: It starts without it, but the card states "Do not use the model without a prompt upsampler," and skipping it visibly destabilizes editing and multi-reference generation. An external LLM works too - just keep the expansion step.

Q4: int8 or w4a8 upsampler? A4: Follow the v0.41.2 template and take w4a8 at 6,724,090,780 bytes. The int8 build is 9,748,113,996 bytes and pushes the total to 19.343GiB, which a third-party recipe measured as not fitting on a 16GB card. The gap is 2.816GiB.

Q5: Can I use it commercially? A5: Individuals and companies under USD 5 million annual revenue may use it commercially for free; research and non-commercial use is free for everyone; above the threshold you need a self-hosted commercial license or the API. The full text was not captured, so consult the LICENSE file.

This article is AI-assisted and human-edited. Last updated: 2026-10-17

FAQ

Can 8GB of VRAM actually render 4K?
The vendor only says the INT8 build runs on RTX cards down to 8GB, without tying that to a resolution or generation time, and the official chart tests neither 8GB nor 4K. So "8GB runs" is a vendor statement; "8GB renders 4K" is unverified. Get 1024x1024 working first, then raise resolution while watching peak VRAM.
I get a 401 GatedRepo error. Is it the network?
No. It is a repository-side license decision. Log in on the web, accept the license, then run hf auth login with the same account. Mirrors will not help.
Do I need all four files, or can I skip the upsampler?
It starts without it, but the card states "Do not use the model without a prompt upsampler," and skipping it visibly destabilizes editing and multi-reference generation. An external LLM works too - just keep the expansion step.
int8 or w4a8 upsampler?
Follow the v0.41.2 template and take w4a8 at 6,724,090,780 bytes. The int8 build is 9,748,113,996 bytes and pushes the total to 19.343GiB, which a third-party recipe measured as not fitting on a 16GB card. The gap is 2.816GiB.
Can I use it commercially?
Individuals and companies under USD 5 million annual revenue may use it commercially for free; research and non-commercial use is free for everyone; above the threshold you need a self-hosted commercial license or the API. The full text was not captured, so consult the LICENSE file.

Related

Field SOP

ComfyUI Video Generation SOP: Run LTX-2.5 on 12GB VRAM

A ComfyUI local video generation SOP, using LTX-2.5 to get a 12GB card through the full pipeline. Model files and directories (int8_convrot builds, not BF16): the transformer goes to models/diffusion_models/, gemma4-12b-with-proj to models/text_encoders/, the video and audio VAEs (both bf16) to models/vae/, and the 2x latent upscaler to models/latent_upscale_models/. Pitfalls first: the audio VAE is a separate file - skip it and you render a silent video; the prompt enhancer is an extra ~5GB model adding 1-2 minutes per generation and is off by default; HF gated=auto means you must log in and accept terms to download (even to read the model card). Hardware floor: 12GB VRAM with distilled/int8, CUDA 12.7+, PyTorch ~2.7, Python 3.12+ (innfactory's compilation); on 8GB cards, switch to Wan 2.2 TI2V-5B with offload instead. Three workflow types: two-stage T2V/I2V (generate, then 2x latent upsample refinement), single-stage (fast, for previews), and A2V (audio-driven video). VRAM strategy: quantized/distilled first, ComfyUI native offload, short low-res generation then upscale. Repos: github.com/Lightricks/ComfyUI-LTXVideo, huggingface.co/Lightricks/LTX-2.5.

Oct 10, 20269 min read
Field SOP

LLaDA-Image Local Deploy SOP: Setup, Inference, Production

A five-step SOP for running Ant's open-source 6B image model LLaDA-Image: (1) environment setup with dependencies and mirror-accelerated downloads; (2) choosing among four weight variants (Base 50-step / Turbo 4-step, each in BF16 or FP8, with ModelScope for China); (3) generating the first image with minimal Base and Turbo commands; (4) advanced work - reference-image editing, text rendering, ComfyUI integration, and degradation strategies when VRAM runs short; (5) productionizing with batch queues, concurrency sizing, cost monitoring, result storage and graceful failure modes. Includes 6 pitfalls and a 10-item launch checklist, with every command copied verbatim from the official README; note the repo license is null, so confirm rights before commercial use.

Sep 9, 202611 min read
Field SOP

Can One GPU Run Matrix-Game 4.0? A Local Deploy SOP

A nine-step SOP for running Matrix-Game 4.0 locally on a single GPU, with every command and flag taken verbatim from the v4 subdirectory README (repository: github.com/SkyworkAI/Matrix-Game, file Matrix-Game-4/README.md). Step 1, align on requirements: model inference needs Linux, an NVIDIA GPU and Python 3.12 together, the reference A100 80 GB deployment uses PyTorch 2.12.0 / CUDA 13.2, and the repo ships a dedicated RTX 5090 runtime that does not auto-detect hardware, so the matching preset must be selected explicitly; the browser demo needs a Linux server that also builds the game and GStreamer pipeline while the Safari/Chrome client needs no GPU; standalone play and recording need macOS or Linux plus CMake, C++20, SDL2 and FFmpeg, with the legacy Windows entry retained but not validated for feature parity; and weights and assets are not shipped in the repo, so budget extra space for the Hugging Face Hub cache. Step 2, install inside the Matrix-Game-4/ subdirectory or everything after is wrong: git clone, cd Matrix-Game/Matrix-Game-4, python3.12 -m venv .venv and source .venv/bin/activate, then pip install torch==2.12.0 torchvision==0.27.0 --index-url https://download.pytorch.org/whl/cu132 as a matched pair, then pip install -e '.[inference,server,download,test]' with all four extras; FlashAttention is optional and only rtx5090-sage needs SageAttention while plain rtx5090 uses PyTorch SDPA. Step 3, downloads come as two manifests, game assets and model weights, pinned to revision 4419accdb7bb7881234c5914de8cd915266e0325 with --scene switchable across castle, racing and all, and one server process supporting only one scene model; the downloader verifies size and SHA256 against the manifests so interrupted runs can simply restart, shared T5/tokenizer and Wan VAE pull automatically from the official base, and matrix-game verify rechecks an installed scene. Step 4, offline rendering proves the model produces output: matrix-game render --scene ancient-egypt --input lowpoly.mp4 --resources resources --preset realtime --prompt-mode fixed --output outputs/egypt, where the input is a low-poly proxy stream rather than real footage and the output is rendered.mp4 plus a configuration report with FPS and frame count preserved; the three presets matter - realtime is for A100, RTX 5090 switches to rtx5090, and quality is slower yet is exactly the default when --preset is omitted. Step 5, play and record locally without loading a model: bash scripts/build_game.sh then bash scripts/play.sh --scene ancient-egypt, giving the two shooter scenes a 48 FPS, 2x simulation-time demo mode with F9 recording and Escape menu, and MATRIX_GAME_DATA_DIR overriding the default data directory; racing uses build_racing.sh with 1x simulation time, and the browser demo does not enable the shooters' 2x mode either, advancing 1/--fps seconds per captured frame. Step 6, the browser demo splits server and client: mediamtx configs/mediamtx.yml in one terminal and CUDA_VISIBLE_DEVICES=0 bash scripts/serve.sh --scene ancient-egypt --resources resources --preset realtime --fps 40 in another, then open http://127.0.0.1:8025/, with --reference-only testing controls, HUD, audio and transport without loading a model; --fps 40 is a capture cadence target, not a throughput or latency guarantee. Step 7, the two RTX 5090 presets: rtx5090 needs no extra installation while rtx5090-sage requires building SageAttention 2.2.0 with the supplied CUDA-graph patch and CUDA 13.2 at git checkout eb615cf6cf4d221338033340ee2de1c37fbdba4a; both reuse the same scene checkpoints and shared resources, converting DiT block linear weights to FP8 at load with activations quantized during inference while embeddings and the output head stay BF16, and startup warms kernels and captures CUDA graphs so the first launch is slower than steady state. Step 8, acceptance in two forms: a keypress producing a picture in the browser demo (officially about under 150 ms, not independently reproduced) or an offline render turning a low-poly video into a finer output, with the three performance accounts written side by side (official 480p 60 FPS, 83 FPS and 18.5 GiB; the project page panel still at 0; and the README's about 38-39 FPS on an A100 at 864 x 480), remembering that model throughput, pipeline throughput, presentation frame rate and end-to-end latency are four different things. Step 9, six pitfalls: one process supports one session and one scene model; it binds to loopback by default and must not be exposed to the internet, since the official statement calls it a trusted single-user demo rather than a public cloud-gaming service; --fps 40 is not a throughput guarantee; Windows is unvalidated; disk must accommodate the Hub cache; and VRAM splits into an A100 80 GB reference tier and an RTX 5090 consumer tier with the 5080 and 5070 still pending.

Oct 16, 202610 min read