Instructions to use unsloth/FLUX.2-klein-9B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusion Single File
How to use unsloth/FLUX.2-klein-9B-GGUF with Diffusion Single File:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Studio
How to use unsloth/FLUX.2-klein-9B-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for unsloth/FLUX.2-klein-9B-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for unsloth/FLUX.2-klein-9B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for unsloth/FLUX.2-klein-9B-GGUF to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="unsloth/FLUX.2-klein-9B-GGUF", max_seq_length=2048, )
Newbie Question: Which CLIP can I use with flux-2-klein-9b-Q4_K_M.gguf?
I'm using a comfyui workflow to run Flux2 Klein GGUF. It works fine with flux-2-klein-4b-Q5_K_M.gguf + Qwen3-4B-UD-Q6_K_XL.gguf but If I try running flux-2-klein-9b-Q4_K_M.gguf with the same CLIP I get an incompatible matrix shapes error on ksampler. What I am doing wrong? Thx!
I'm using this text encoder: qwen_3_8b_fp8mixed_abliterated.safetensors (β8gb), using q8 (rtx4060 8gbvram, 40gb ram).
For incompatible matrix shapes could be the image resolution, should be divisible by 8 or 16 or 32, (i've noticed that with wan2.2, about errors on ksampler with matrix dimentions missmatch and also with wrong text encoders)
.
Flux2 klein 4b uses a different text encoder than 9b. Swap out Qwen3 4b for qwen3 8b.
Flux2 klein 4b uses a different text encoder than 9b. Swap out Qwen3 4b for qwen3 8b.
that was it. many thanks
I frequently have these mismatches between models and text encoders. The correct combos seem totally random for me, I fail to see the logic (if there's one). I usually try to get matching model+clip through working example workflows but I don't always find tested workflows for all models and their variants.
thanks again!