Instructions to use black-forest-labs/FLUX.2-klein-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use black-forest-labs/FLUX.2-klein-9B 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("black-forest-labs/FLUX.2-klein-9B", 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] - Diffusion Single File
How to use black-forest-labs/FLUX.2-klein-9B 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
- Inference
- Notebooks
- Google Colab
- Kaggle
- AMD Developer Cloud
New powerful Flux 20B EDIT model is needed
Which does much much better job than the pretty awesome Flux 9B Klein edit model.
-Which is trained to understand human anatomy (male, female) and all possible poses (ballet, gym, skiing, climbing etc.).
-Multi-image reference to get scene from image1, face from image2 and pose from image3, ... which you can reference in prompt.
-A model which does not produce extra legs and extra fingers or weird looking fingers or weird body parts.
-A model which understand different light scenarios like "studio light from behind camera" or "sun at noon from behind camera"
-A model which produces perfect human skin with the best details according to the age of person - should understand differences in skin look between 20 years old person and 50 years old person.
-Which remembers faces perfectly like Adonis Lora does for Flux 9B Klein ( check it out Black forest labs what I am talking about).
Flux 9B Klein is pretty good, but a totally improved successor, with like 20 billion params is needed for this time and to stay competitive to token-scam closed source models.
With ComfyUI and model offloading to RAM I can easily work with 40GB model on my laptop with 5060 and 48GB RAM. Do not worry about model being too big for people's computers.
Offloading weights to RAM makes wonders even on my HP Omen 16 laptop (GeForce 5060 + 16 core CPU Intel Core Ultra 7 255H + 48GB RAM).
Basically I am loading ONLY full bf16 models on my machine for the best quality.