File size: 3,482 Bytes
04be923
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
base_model:
- black-forest-labs/FLUX.2-klein-base-9B
library_name: diffusers
license: other
license_name: flux-non-commercial-license
license_link: LICENSE.md
pipeline_tag: text-to-image
tags:
- flow-matching
- pixel-diffusion
- pixel-generation
- flux2
---

# Asymmetric Flow Models

Pixel-space text-to-image model AsymFLUX.2-klein finetuned from [black-forest-labs/FLUX.2-klein-base-9B](https://huggingface.co/black-forest-labs/FLUX.2-klein-base-9B), using the AsymFlow method proposed in the paper:

**Asymmetric Flow Models**
<br>
arXiv 2026
<br>
[Hansheng Chen](https://lakonik.github.io/),
[Jan Ackermann](https://janackermann.info/),
[Minseo Kim](https://soniaminseokim.github.io/),
[Gordon Wetzstein](http://web.stanford.edu/~gordonwz/), 
[Leonidas Guibas](https://geometry.stanford.edu/?member=guibas)<br>
Stanford University
<br>
[Project Page](https://hanshengchen.com/asymflow) | [arXiv](https://arxiv.org/abs/2605.12964) | [Code](https://github.com/Lakonik/LakonLab/blob/main/docs/AsymFlow.md) | [AsymFLUX.2 klein Demo🤗](https://huggingface.co/spaces/Lakonik/AsymFLUX.2-klein)

![asymflow_teaser](https://cdn-uploads.huggingface.co/production/uploads/638067fcb334960c987fbeda/UCU9seMTK_iBccdFNErns.jpeg)

## Usage

Please first install the [LakonLab v0.2](https://github.com/Lakonik/LakonLab).

We provide a Diffusers-style pipeline for AsymFLUX.2 klein. The example below loads the FLUX.2 klein Base 9B model, attaches the AsymFlow adapter, and generates an image directly in pixel space.

```python
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')
```

## Citation
```
@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},
}
```