Nodes/AIO Image Generate/FLUX.2 Klein 9B Settings
ComfyUI Node

FLUX.2 Klein 9B Settings

Distilled vs base is the whole game

By helto4real·Created 3 months ago·Updated 23 days ago· 1
FLUX.2 Klein 9B Settings
    • AIO_MODEL_SETTINGS
    variant
    guidance1.0
    precision_policy
    memory_policy
    reference_megapixels1.00
    reference_upscale_method
    reference_resolution_steps1
    attention_modeauto
    torch_compile_modeoff
    torch_compile_backendinductor
    performance_apply_timingafter_loras

    FLUX.2 Klein 9B is Black Forest Labs' size-distilled answer to the complaint that FLUX.2 Dev was too heavy to run. It's the ~9B checkpoint that put a FLUX.2 in ~13GB of VRAM, and in the AIO pack it's the model family with the most knobs. AIOFlux2Klein9BSettings is where those knobs live. It produces one AIO_MODEL_SETTINGS output, which you wire into the model_settings socket on AIO Image Generate (with model_type set to flux2_klein_9b) - match them wrong and the main node refuses to run.

    What each control does

    The decision that actually matters is the first one:

    • variant - distilled or base. Distilled is the fast, guidance-simplified checkpoint: 4-step default sampling. Base is the full-precision-quality path: 50-step default. The main node's explicit steps value overrides either default, but if you leave steps at 0, this dropdown chooses your experience. Distilled is what most people want; base is for when you're chasing quality and can wait.
    • guidance - the model guidance value passed to FLUX (default 1.0). Higher follows the prompt more tightly. On distilled Klein you mostly leave this alone.
    • precision_policy - auto, fp8, bf16. auto picks something practical for your runtime; fp8 is the usual sweet spot for a 9B on a consumer card.
    • memory_policy - auto, low_vram, balanced, high_vram. The low-VRAM path is genuinely useful on 16GB cards, but the README warns to keep connected reference images at or below 1.0 megapixel there - references eat VRAM fast on Klein.
    • reference_megapixels, reference_upscale_method, reference_resolution_steps - how connected reference images get resized before encoding. Default 1.0 MP with an area-style ladder is a sane baseline; Klein edit mode is inferred from how many reference images you've connected (image 1 through image 4 on the main node).

    Then the shared performance block, which every settings node in this pack carries: attention_mode (auto, sage, sage3, flash, xformers, pytorch, split, sub_quad, or off), torch_compile_mode/torch_compile_backend (inductor or cudagraphs), and performance_apply_timing (after_loras vs before_loras). auto attention picks the best installed backend; off leaves ComfyUI's defaults untouched; after_loras applies patches to the final LoRA-patched model. If you're on a 16GB card, low_vram memory plus a real attention backend is where the visible gains are.

    What's deliberately missing

    The settings node does not expose FLUX.1-style shift controls - because ComfyUI's FLUX.2 scheduler doesn't consume them. That's not an omission; it's the author keeping the node honest. If you're coming from a FLUX.1 workflow hunting for the shift slider, it doesn't exist here for a reason.

    Installing and wiring

    Part of the AIO pack, so install the pack once:

    cd ComfyUI/custom_nodes
    git clone https://github.com/helto4real/comfyui-all-on-one-image-generation-node
    cd comfyui-all-on-one-image-generation-node
    python -m pip install -r requirements.txt
    

    Or use ComfyUI Manager and search "AIO Image Generate". Restart ComfyUI, and you'll find both this and AIO Image Generate under AIO/Image. Connect this node's AIO_MODEL_SETTINGS to the main node's model_settings input, pick the Klein 9B diffusion model, its text encoder and a compatible VAE in the main node's dropdowns, and generate.

    Gotchas

    • Wrong family settings are rejected. Wire these settings into a z_image_turbo or ideogram4 run and the main node throws rather than silently mis-sampling. Keep the settings node matched to model_type.
    • The dropdowns aren't auto-populated by this node. Model files resolve lazily at run time - make sure the Klein 9B weights, encoder and VAE are actually in models/.
    • Reference-heavy workflows on 16GB - that 1.0 MP reference cap is there for a reason. Exceed it and you'll be swapping to CPU mid-run.

    It's a thin settings node - one output, no surprises - but it's the difference between "Klein runs" and "Klein runs the way I want."

    CategoryAIO/Image

    Inputs (11)

    NameTypeDefaultDescription
    variantCOMBOSelect the FLUX.2 Klein 9B variant. Distilled uses the fast low-step defaults.
    guidanceFLOAT1.00–20Model guidance value passed to FLUX. Higher values follow the prompt more tightly.
    precision_policyCOMBOModel precision preference. Auto chooses a practical format for the current runtime.
    memory_policyCOMBOMemory strategy for loading and running the model on your hardware.
    reference_megapixelsFLOAT1.000.01–16Target megapixels for resizing each reference image before encoding.
    reference_upscale_methodCOMBOResize filter used when scaling reference images for encoding.
    reference_resolution_stepsINT11–256Resolution bucket step for reference image preprocessing.
    attention_modeCOMBOautoAttention backend preference. Auto selects the best installed option.
    torch_compile_modeCOMBOoffTorch compile behavior for the diffusion model.
    torch_compile_backendCOMBOinductorTorch compile backend. Inductor is the Triton-backed path.
    performance_apply_timingCOMBOafter_lorasApply attention and compile settings before or after AIO LoRAs.

    Outputs (1)

    NameTypeDescription
    AIO_MODEL_SETTINGSAIO_MODEL_SETTINGS