像素空间文本到图像模型 AsymFLUX.2-klein 基于 black-forest-labs/FLUX.2-klein-base-9B 进行微调,采用了论文中提出的 AsymFlow 方法:
非对称流模型
arXiv 2026
Hansheng Chen,
Jan Ackermann,
Minseo Kim,
Gordon Wetzstein,
Leonidas Guibas
斯坦福大学
项目页面 | arXiv | 代码 | AsymFLUX.2 klein 演示🤗

请先安装 LakonLab v0.2。
我们为 AsymFLUX.2 klein 提供了 Diffusers 风格的流水线。以下示例加载 FLUX.2 klein Base 9B 模型,附加 AsymFlow 适配器,并直接在像素空间生成图像。
import math
import torch
from lakonlab.models.architectures import OklabColorEncoder
from lakonlab.models.diffusions.schedulers import FlowAdapterScheduler
from lakonlab.pipelines.pipeline_pixelflux2_klein import PixelFlux2KleinPipeline
pipe = PixelFlux2KleinPipeline.from_pretrained(
'black-forest-labs/FLUX.2-klein-base-9B',
vae=OklabColorEncoder(
use_affine_norm=True,
mean=(0.56, 0.0, 0.01),
std=0.16),
scheduler=FlowAdapterScheduler(
shift=17.0,
use_dynamic_shifting=True,
base_seq_len=1024 ** 2,
max_seq_len=2048 ** 2,
base_logshift=math.log(17.0),
max_logshift=math.log(34.0),
dynamic_shifting_type='sqrt',
base_scheduler='UniPCMultistep'),
torch_dtype=torch.bfloat16)
adapter_name = pipe.load_lakonlab_adapter( # you may later call `pipe.set_adapters([adapter_name, ...])` to combine other adapters (e.g., style LoRAs)
'Lakonik/AsymFLUX.2-klein-9B',
target_module_name='transformer')
pipe = pipe.to('cuda')
# Text-to-image generation example
prompt = 'Restored color photo from the 1900s. A middle-aged man with cybernetic metal hands is sitting on an old wooden chair and reading the newspaper. The newspaper has the prominent headline "AsymFLOW RELEASED" in large bold font. Close-up shot focusing on the newspaper.'
neg_prompt = 'Low quality, worst quality, blurry, deformed, bad anatomy, unclear text'
out = pipe(
prompt=prompt,
negative_prompt=neg_prompt,
width=960,
height=1280,
num_inference_steps=38,
guidance_scale=4.0,
generator=torch.Generator().manual_seed(42),
).images[0]
out.save('asymflux2_klein.png')@article{chen2026asymmetric,
title={Asymmetric Flow Models},
author={Hansheng Chen and Jan Ackermann and Minseo Kim and Gordon Wetzstein and Leonidas Guibas},
journal={arXiv preprint arXiv:2605.12964},
url={https://arxiv.org/abs/2605.12964},
year={2026},
}