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
- Unsloth Studio new
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, )
Which text encoder matches flux-2-klein-9b-Q4_K_M.gguf in ComfyUI-GGUF?
Hi, I’m trying to use flux-2-klein-9b-Q4_K_M.gguf from this repo in ComfyUI on macOS with ComfyUI-GGUF.
My environment:
- ComfyUI desktop 0.8.28
- ComfyUI core 0.18.5
- torch 2.12.0.dev on Apple Silicon (M2 Max, 64GB)
- ComfyUI-GGUF installed
I used:
- UNet loader:
UnetLoaderGGUF - UNet:
flux-2-klein-9b-Q4_K_M.gguf - VAE:
flux2-vae.safetensors
I could not find the exact matching text encoder for this GGUF model.
I tried:
qwen_3_8b_fp4mixed.safetensorsqwen_3_8b_fp8mixed.safetensors
Both fail with text encoder shape mismatch errors in ComfyUI, for example:
RuntimeError: mat1 and mat2 shapes cannot be multiplied (512x4096 and 2048x1024)
Could you please tell me the exact text encoder file that matches flux-2-klein-9b-Q4_K_M.gguf in ComfyUI-GGUF?
If possible, please share the exact model filename and loader combination.
I got results with this as well: Qwen3-8B-abliterated-josiefied-goekdeniz-v1-IQ3_XS.gguf
I'm not sure whether 9/10 gens creating physical abominations is normal here. I can only run the Q4 GGUF in stable-diffusion.cpp sd-cli.