AsymFLUX2 Oklab Encode
AsymFLUX2's 'VAE' is a color transform, not a neural network
- image
- latent
In a normal ComfyUI graph you encode an image with VAE Encode, and the VAE is a whole neural network that learned to compress pixels into a latent. AsymFLUX2 has no VAE - that's the entire architectural point of the model - so its encode step is this node: a deterministic color transform that turns a ComfyUI IMAGE into the exact 3-channel Oklab "latent" the transformer denoises in. No learned weights, no compression, nothing to download. sRGB → linear RGB → LMS → cube root → Oklab, straight out of Bjorn Ottosson's Oklab spec.
Calling it a latent is generous. The output is still full-resolution pixel data, just in a perceptual color space where the L channel is lightness and a/b carry the chroma. What the node adds on top of plain Oklab is an affine normalization: it subtracts a mean and divides by a std, which is what actually makes the numbers sit in a friendly range for the model. The defaults - mean (0.56, 0, 0.01), std 0.16 - are exactly LakonLab's OklabColorEncoder settings, i.e. the values the model was trained against. Those four parameters are the only inputs besides the image, and you should basically never touch them. If you do, you have to keep them in lockstep with AsymFLUX2 Oklab Decode, or your colors will drift off the model's native distribution.
When you'd actually reach for it
Honest answer: not in the shipped workflow. The example graph is text-to-image only - Empty Pixel Latent → KSampler → Oklab Decode - and the pack's README is upfront that reference-image conditioning isn't supported because the output quality wasn't there. So Encode's real uses are:
- Starting a
KSamplerfrom an existing image's Oklab (img2img-style). Feed a real image in, get a latent, sample from it at partial denoise. Unsupported territory - the pack doesn't bless it - but the plumbing is right there. - Round-tripping to see what the model actually sees:
Encode → Decodewith matching mean/std is near-lossless. - Checking your clamp. The per-step gamut clamp in
Apply Adapteruses this same math internally, so this node is the reference for what "valid" Oklab looks like.
One input to name: image (a ComfyUI IMAGE, e.g. from Load Image), and the output latent feeds the same sockets as Empty Pixel Latent. There are no optional inputs, no lists - it's a plain utility.
Install and gotchas
Standard for the pack, and there are no node-specific deps:
cd ComfyUI/custom_nodes
git clone https://github.com/Nynxz/ComfyUI-AsymFLUX2
The whole pack is written against ComfyUI's newer native-node API, so keep ComfyUI current or every asymflux2.* node will show up missing. The common mistakes here are the mean/std (don't touch them), and expecting this to be a full edit pipeline - it isn't, and if image editing is your goal the official Lakonik/ComfyUI-piFlow pack (maintained by the model's own authors) is where the maintained support lives. This repo's README says as much, and it's the right call for most people. But if you're here to understand the no-VAE stack, this node is the cleanest illustration of it: the "autoencoder" of 2026's pixel-space models is just a cube root and a matrix multiply.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mean_l | FLOAT | 0.560-1–1 | — |
| mean_a | FLOAT | 0.000-1–1 | — |
| mean_b | FLOAT | 0.010-1–1 | — |
| std | FLOAT | 0.1600.001–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |