Views
No views yet
black-forest-labs/FLUX.2-klein-base-9B, fine-tuned with Flow-DPPO on GenEval2 in the single-reward setting (optimizing the GenEval2 reward only).black-forest-labs/FLUX.2-klein-base-9Bis a gated model. Make sure you have accepted its license and are logged in (hf auth login). FLUX.2 currently requiresdiffusersfrom source:pip install git+https://github.com/huggingface/diffusers.git.
1import torch
2from diffusers import Flux2KleinPipeline
3from peft import PeftModel
4
5pipe = Flux2KleinPipeline.from_pretrained(
6 "black-forest-labs/FLUX.2-klein-base-9B",
7 torch_dtype=torch.bfloat16,
8)
9
10# Load the Flow-DPPO LoRA adapter
11pipe.transformer = PeftModel.from_pretrained(
12 pipe.transformer,
13 "Tencent-Hunyuan-Multimodal-RL/FLUX2-klein-base-9b-GenEval2-Single-Reward",
14 torch_dtype=torch.bfloat16,
15)
16
17pipe.enable_model_cpu_offload() # remove and call pipe.to("cuda") if you have enough VRAM
18
19prompt = "four white cats are behind a red bagel"
20image = pipe(
21 prompt=prompt,
22 height=1024,
23 width=1024,
24 guidance_scale=4.0,
25 num_inference_steps=50,
26 generator=torch.Generator("cpu").manual_seed(0),
27).images[0]
28image.save("output.png")1@article{ping2026flowdppo,
2 title={Flow-DPPO: Divergence Proximal Policy Optimization for Flow Matching Models},
3 author={Ping, Bowen and Zhou, Xiangxin and Qi, Penghui and Luo, Minnan and Bo, Liefeng and Pang, Tianyu},
4 journal={arXiv preprint arXiv:2606.11025},
5 year={2026}
6}