How to use from the
Use from the
Diffusers library
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,black-forest-labs/FLUX.2-klein-base-9B", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("vafipas663/flux2-klein-base-9b-distill-lora")

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]

LoRA for Klein Base 9B extracted from Klein 9B using https://github.com/kijai/ComfyUI-FluxTrainer

For the reasons I cannot explain, it produces static noise at strength > 0.5. And sometimes, you have to go as low as 0.1.

Compared to https://civitai.com/models/2324315/klein-4b9b-base-to-turbo-lora it handles CFG much better, and produces higher frequency details

But on the other hand, https://civitai.com/models/2324315/klein-4b9b-base-to-turbo-lora is much closer to Klein 9B in terms of its output

Downloads last month
520
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for vafipas663/flux2-klein-base-9b-distill-lora

Adapter
(105)
this model
Finetunes
1 model