Instructions to use benzo86/FLUX.2-klein-base-9B-bnb-int8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use benzo86/FLUX.2-klein-base-9B-bnb-int8 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("benzo86/FLUX.2-klein-base-9B-bnb-int8", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
FLUX.2 [klein] base 9B β 8-bit (bitsandbytes LLM.int8)
A quantised copy of black-forest-labs/FLUX.2-klein-base-9B in diffusers format, made for Vision Studio (no-code visual inspection: learning the look of a defect from a few examples and painting new ones onto good parts).
Quantisation: Transformer and text encoder in 8-bit (bitsandbytes LLM.int8); x_embedder, context_embedder, time_guidance_embed and proj_out stay bfloat16; the VAE stays bfloat16.
Load it like the original; the quantisation is stored in the configs (needs bitsandbytes):
import torch
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained("benzo86/FLUX.2-klein-base-9B-bnb-int8", torch_dtype=torch.bfloat16)
License
This model is a derivative of black-forest-labs/FLUX.2-klein-base-9B and is distributed under the same FLUX Non-Commercial
License (see LICENSE.md). Non-commercial use only; read the license before use.
- Downloads last month
- 29
Model tree for benzo86/FLUX.2-klein-base-9B-bnb-int8
Base model
black-forest-labs/FLUX.2-klein-base-9B