◀ 上一页
1 / 5
下一页 ▶
FLUX.2 Klein 9B KV Edit 宏观架构
从条件编码、完整 denoiser 到 VAE 解码;关键 shape 均取自 FLUX2-KLEIN-9B-KV-EDIT-FULL 的实测记录。
1. FLUX.2 Klein 9B KV Edit 宏观架构
从条件编码、完整 denoiser 到 VAE 解码;关键 shape 均取自 FLUX2-KLEIN-9B-KV-EDIT-FULL 的实测记录。
FLUX2-KLEIN-9B-KV-EDIT-FULL
Prompt
token IDs
Qwen3-8B
完整文本编码器
[1, 512, 12288]
Noisy latent / tokens
batch = 1
[1, 4096, 128]
Reference KV Cache
extract → cached;8+24 层
K/V [1, 4096, 32, 128]
FLUX Transformer
Reference KV extract → cached denoise
完整生产层数,未折叠
[1, 4096, 128]
VAE Decoder
latent → pixels
[1, 3, 1024, 1024]
Final image
[1, 3, 1024, 1024]
ACTUAL-CUDA-FULL-TOPOLOGY
BF16 · NVIDIA A100-SXM4-40GB · native 1024² · 1 shape-equivalent denoiser timestep
条件编码与分支组装
保留所有实际执行的文本与图像条件分支;输出 shape 与 merge 方式分别标注。
2. 条件编码与分支组装
保留所有实际执行的文本与图像条件分支;输出 shape 与 merge 方式分别标注。
FLUX2-KLEIN-9B-KV-EDIT-FULL
Qwen3-8B
Layers ×36
hidden 4096 · heads 32
KV heads 8
[1, 512, 12288]
Selected hidden states → concat/project
Qwen layers [9, 18, 27]; joint condition width 12288
[1, 512, 12288]
Reference KV Cache
extract → cached;8+24 层
K/V [1, 4096, 32, 128]
ACTUAL-CUDA-FULL-TOPOLOGY
BF16 · NVIDIA A100-SXM4-40GB · native 1024² · 1 shape-equivalent denoiser timestep
完整 FLUX Transformer 拓扑
Double-stream 与 Single-stream 均保留完整层数;分支条件与状态转换按实际执行路径展示。
3. 完整 FLUX Transformer 拓扑
Double-stream 与 Single-stream 均保留完整层数;分支条件与状态转换按实际执行路径展示。
FLUX2-KLEIN-9B-KV-EDIT-FULL
Packed image tokens
token width 128
hidden 4096
[1, 4096, 128]
Double-stream Block
image stream + text stream
heads 32×128
modulated joint attention + MLP
完整执行 ×8
Single-stream Block
merged sequence
attention + gated MLP
residual update
完整执行 ×24
Project / Unpack
keep noisy tokens
[1, 4096, 128]
Text condition
joint dim 12288
[1, 512, 12288]
Reference KV Cache
extract → cached;8+24 层
Pass 1: reference KV extract
Pass 2: cached denoise;两种状态均实际执行
ACTUAL-CUDA-FULL-TOPOLOGY
BF16 · NVIDIA A100-SXM4-40GB · native 1024² · 1 shape-equivalent denoiser timestep
FLUX Block 微观结构与任务条件
Double-stream / Single-stream 的职责分开呈现,编辑、填充与缓存路径不混为 base。
4. FLUX Block 微观结构与任务条件
Double-stream / Single-stream 的职责分开呈现,编辑、填充与缓存路径不混为 base。
FLUX2-KLEIN-9B-KV-EDIT-FULL
Double-stream block
Modulate image + text streams
Joint multi-head attention
separate QKV, shared attention
Per-stream MLP
Residual update
Reference KV cache: two passes
Pass 1 · reference tokens
[1, 4096, 128]
Extract K/V per layer
[1, 4096, 32, 128]
Cache 8 double + 24 single layers
reference tokens 4096
Pass 2 · cached denoise reuse
[1, 4096, 128]
Reference 先抽取 K/V [1, 4096, 32, 128],再在 cached pass 复用。
ACTUAL-CUDA-FULL-TOPOLOGY
BF16 · NVIDIA A100-SXM4-40GB · native 1024² · 1 shape-equivalent denoiser timestep
VAE 边界与运行证据
VAE 仅把运行中真实执行的 Encode/Decode 标为 ACTUAL-CUDA;中间通道阶梯来自固定配置。
5. VAE 边界与运行证据
VAE 仅把运行中真实执行的 Encode/Decode 标为 ACTUAL-CUDA;中间通道阶梯来自固定配置。
FLUX2-KLEIN-9B-KV-EDIT-FULL
Source / reference image
VAE Encode 已执行
[1, 3, 1024, 1024]
VAE Encoder
Down blocks ×4
[1, 32, 128, 128]
Denoised latent
actual denoiser output
[1, 4096, 128]
VAE Decoder
MidBlock + UpDecoder ×4
spatial upsample ×8
[1, 3, 1024, 1024]
Pixel output
native 1024²
[1, 3, 1024, 1024]
STATIC-CONFIG 通道阶梯:512 → 512 → 256 → 128;latent_channels=32
Trace evidence
实例化参数合计
17.353B
峰值 CUDA allocated
20.99 GiB
行级 shape
3,910 rows / 77,820 hits
模块级 shape
1,587 rows / 1,745 hits
运行边界
native 1024² · batch 1
确定性有限 BF16 占位参数
结构/shape 学习证据;不代表生成质量
ACTUAL-CUDA-FULL-TOPOLOGY
BF16 · NVIDIA A100-SXM4-40GB · native 1024² · 1 shape-equivalent denoiser timestep