FLUX / FLUX.2
工业闭源大模型路线:专有混合数据、flow matching、VLM 条件、多参考图、生产级编辑和多产品线蒸馏。
Latent Flow MatchingMulti-referencePrompt upsamplingImage generation systems
从 FLUX 到 Qwen-Image,再到 Z-Image:现代图像生成的核心竞争,已经从“网络结构”转向“数据分布设计、caption 体系、编辑对构造、后训练奖励和蒸馏策略”。
现代图像模型不再只是 `image + caption -> diffusion loss`。更准确的对象是一条数据、任务、奖励和部署共同定义的视觉执行系统。
如果只看主干,FLUX、Qwen-Image 和 Z-Image 都落在 latent DiT / flow / MMDiT 的大路线里;如果看数据工程,它们代表了工业闭源生产流、文字与图文设计专项路线、高效开源训练路线三种不同战略。
工业闭源大模型路线:专有混合数据、flow matching、VLM 条件、多参考图、生产级编辑和多产品线蒸馏。
Latent Flow MatchingMulti-referencePrompt upsampling文字与图文设计路线:OCR / text-rich 数据、中文和复杂排版、Qwen-VL 条件编码、I2I reconstruction、编辑一致性与 RLHF 后训练。
Text RenderingVLM + VAEGRPO / OPD高效开源路线:6B 单流 S3-DiT、数据 profile、知识图谱采样、双语多粒度 caption、8-step no-CFG Turbo。
S3-DiTZ-CaptionerDPO / GRPO图像模型正在从 prompt-to-image 模型,演化为多参考、多任务、可编辑、可排版、可蒸馏的视觉执行系统。
Data systemReward modelModel familyweb 图文对、授权图库、内部数据、合成数据、用户交互数据、编辑前后对、多参考图样本。
去重、低清过滤、压缩伪影过滤、尺寸和比例过滤、安全过滤、隐私处理、版权与来源管理。
aesthetic score、technical quality、OCR、safety labels、主体类别、风格、构图复杂度和语言。
long / medium / short caption、tags、OCR-inclusive caption、simulated user prompt、editing difference caption。
长尾概念、中文 / 英文、多语言、文字密集图、人物、产品、海报、UI、PPT、真实摄影和艺术风格。
低分辨率到高分辨率;简单 prompt 到复杂 prompt;无文字到段落级文字;T2I 到 I2I / 多参考图。
人工偏好对、VLM 自动偏好对、OCR 可验证样本、编辑一致性样本、身份保持样本和奖励样本。
teacher trajectory、guided samples、few-step distillation 数据、reward-guided samples、prompt enhancer 对齐数据。
调节文字密集、编辑和后训练权重,观察数据预算如何从通用图文对转向专项能力数据。这个 toy model 不代表真实比例,只用来说明训练目标如何改变数据需求。
allocation ready
专项能力不是靠一个 loss 自然出现,而是靠数据分布、任务组合和奖励信号持续施压。
FLUX.1 公开的数据细节有限,但训练策略清晰:大规模 latent rectified flow transformer、从头训练 autoencoder、双流到单流混合架构,以及 guidance distillation。
公开披露BFL 披露 FLUX family 使用专有文本和图像混合数据,包括第三方私有采购数据、标注服务和付费承包商数据、使用数据、合成数据和 BFL 内部生成数据。
未公开完整数据比例、captioner、OCR pipeline、动态采样策略和训练数据配方没有公开,因此不能把具体 recipe 写成确定事实。
图像先进入从头训练的 autoencoder latent space。给定数据 latent \(z_1\)、噪声 latent \(z_0\)、条件 \(c\) 和时间 \(t\),rectified flow matching 学习从噪声到数据的 velocity field:
公开资料还指向 logit-normal shift schedule、随训练分辨率调整的 schedule、包含 adversarial objective 的 autoencoder、以及扩大到 16 latent channels 来提高重建能力。
Kontext 把任务从 pure text-to-image 扩展到 image editing / in-context generation:给定文本指令和上下文图像,生成目标图像。
工程上可以理解为:context image + instruction + noisy target latent 经过 sequence concatenation 进入 rectified flow transformer,输出目标图像 latent 的 velocity / denoising 方向。
image + caption,保留基础文本到图像能力。
source image + instruction + target image,学习局部和全局编辑。
reference style image + new scene prompt + target image。
reference character or product + new prompt + target image。
input image with text + instruction + corrected target。
从 pure T2I checkpoint 出发,联合 fine-tune image-to-image 和 text-to-image。
使用简单 sequence concatenation 处理 context / instruction tokens,并保持 velocity prediction target。
Kontext pro 使用 flow objective 后接 LADD;Kontext dev 通过 guidance distillation 得到 12B diffusion transformer。
为了优化编辑,dev 版本专注 image-to-image,不再继续训练 pure T2I 任务。
benchmark 覆盖 local editing、global editing、text editing、style reference、character reference。它关注的是真实编辑工作流中的局部改写、全局重构、文字修改、风格引用和角色一致性,而不只是单张图的审美评分。
Kontext 还需要 classifier-based filtering 和 adversarial training 来约束编辑风险,尤其是防止 NCII / CSAM 等非同意或非法内容生成。
FLUX.2 不是 FLUX.1 的简单放大,而是从高质量生成模型升级为生产级视觉工作流模型:多参考图、一致性、品牌规范、复杂文字、结构化 prompt 和 4MP 编辑都进入训练目标。
同一个人、产品或风格,在不同输出中保持稳定。
海报、meme、UI mockup、infographic、小字和多行文字。
logo、色彩、字体、产品形态、包装和广告视觉规范。
4MP 级别下保持纹理、边缘和局部细节稳定。
多段约束、位置关系、颜色、数量、构图和空间逻辑。
公开披露FLUX.2 基于 latent flow matching architecture,在同一架构中统一 image generation 和 editing。Mistral-3 24B vision-language model 负责 real-world knowledge 与 contextual understanding,flow transformer 负责空间关系、材质属性、构图逻辑和图像 latent 生成。
FLUX.2-dev 是 32B flow matching transformer;支持 text-to-image、single-reference editing、multi-reference editing,官方文档披露多参考编辑最多 10 张参考图、最高 4MP 输出和 32K text input tokens。
FLUX.2 重新训练 latent space,用 learnability、quality 和 compression 的平衡来提升 text rendering、编辑和高分辨率细节。autoencoder 改进不是附属细节,而是生产质量的基础接口。
prompt upsampling 在生成前使用大型 VLM 扩展用户 prompt,把简短、含糊、缺少视觉细节的指令改写成结构化视觉说明。它相当于在图像模型前接了一个 visual prompt compiler,尤其服务 reasoning-heavy、复杂结构、图中文字、代码 / 数学 / 流程图等长约束场景。
做一张高级感生日海报,有算法研究员氛围。
温暖光线、极简高级构图、神经网络纹理、中文标题、细腻字体、低饱和色彩、主视觉层级、背景元素和排版约束。
| 模型层 | 定位 | 适用场景 | 证据边界 |
|---|---|---|---|
| Large / dev / pro / flex | 高质量、多参考、高控制、生产级输出。 | 专业编辑、品牌生产、API 工作流。 | 官方产品分层和模型页面披露。 |
| Klein Base | undistilled base,约 50-step,更灵活。 | fine-tuning / LoRA / research。 | 官方 Klein 页面披露。 |
| Klein Distilled | few-step distilled,面向快速迭代。 | 实时生成、消费级 GPU、交互式应用。 | 基于官方模型族描述。 |
合理归纳从产品分层看,FLUX.2 的训练链路很可能是 large base -> 高质量对齐 -> size distillation -> step distillation -> 多产品线部署。但官方没有公开完整 recipe,因此这不是可当作论文事实引用的训练配方。
Qwen-Image 的关键不是“顺便会写字”,而是围绕 text rendering、中文、多语言排版、编辑一致性和 VLM 语义条件编码构建数据工程与训练策略。
自然场景文字、海报、文档、中文排版、英文排版、多语言混排、UI、商品包装、标牌、漫画对白和信息图。
过滤低质量、OCR 不可靠、压缩严重、文字不可读、安全风险高或图文不匹配的样本。
加入 OCR 文本、文字位置、语言、字体风格、版式结构、语义描述和图片内容 caption。
合成罕见汉字、长尾词、多语言混排、小字号、段落级文本、复杂海报和 PPT 布局。
平衡中文 / 英文、短文本 / 长文本、大标题 / 小字、自然场景 / 设计图、简单排版 / 复杂排版。
文字不是普通纹理。它同时要求语义正确、字形正确、布局正确、局部清晰和跨语言稳定。课程学习让模型先学基础字形和短文本,再学多行排版与段落级语义。
prompt -> target image
text instruction + input image -> edited image
input image -> reconstructed image
VLM branch 理解人、物体、动作关系、空间关系和文字内容;VAE branch 保留颜色、纹理、字体、边缘、材质、人脸细节和产品形状。MMDiT 融合语义、外观、文本指令和目标 latent。
I2I reconstruction 不是单纯复制图片,而是让模型学习哪些信息应该保留,哪些信息应该修改。它缓解编辑任务中的全图漂移、身份漂移、字体漂移、产品形状漂移和局部修图引发的全局重绘。
Qwen-Image 的能力集合必须按文字和编辑任务来理解,而不是只按“画面审美”评价。它覆盖中文文字渲染、English text rendering、多语言混排、多行文本、段落级文字、海报 / PPT / 信息图,以及精确图像编辑。
Qwen-Image-2.0 使用 Qwen3-VL 作为 condition encoder,并用 Multimodal Diffusion Transformer 做 joint condition-target modeling,目标是 slides、posters、infographics、comics 等 text-rich 视觉内容。
Qwen-Image-2.0 的数据不只是普通自然图文对,而需要大量 PPT 页面、海报、信息图、漫画分镜、UI / mockup、图文混排、多语言排版和长 instruction -> image 配对样本。模型用 Qwen3-VL 作为 condition encoder,并以 MMDiT / Multimodal Diffusion Transformer 做 joint condition-target modeling;核心变化是从“生成一张图”升级为“按长指令生成图文复合视觉作品”。
支持最长约 1K token 指令,面向专业级排版和统一生成 / 编辑。训练依赖 large-scale data curation 与 customized multi-stage training pipeline。
文字、logo、UI、小字、细线、产品边缘失败,不一定只来自 DiT 主干,也可能来自 latent tokenizer / VAE 不够保真。
VAE metrics ready
高压缩降低 token 成本,但如果没有 text-rich 与 synthetic rendering 数据,OCR correctness 和小字可读性会先掉。
扩展到 billions of images,并加入 synthetic rendering engine 来增强 text-rich 场景重建。
使用 semantic alignment strategy,让 latent space 更适合 diffusion modeling。
用 OCR-based evaluation metrics 评估文档和文字场景,关注 reconstruction fidelity 与 diffusability。
general images、text-rich documents、posters / PPT / UI、synthetic rendered text、small-font OCR、logos / packaging / diagrams。
奖励模型来自 fine-tuned VLM,采用 pointwise scoring 与 chain-of-thought reasoning。T2I 奖励覆盖 alignment、aesthetics、portrait fidelity;编辑任务覆盖 instruction-following accuracy 和 face identity preservation。
训练技巧包括 GRPO、hybrid CFG、prompt curation / prompt filtering、intra-group reward range filtering、per-category reward weight calibration 和 on-policy distillation。它说明图像模型训练正在 LLM 化:base model 之后需要 SFT、reward model、RL 和 distillation 才能可靠满足偏好、指令跟随和生产约束。
Z-Image 的价值不是单点性能,而是公开展示了一套高效训练 recipe:6B 单流 S3-DiT、动态数据基础设施、双语多粒度 caption、SFT 分布收窄、model merging、few-step distillation、RLHF 和 prompt enhancer。
Z-Image 的核心原则是 maximizes information gain per computing unit。同样的 GPU-hour,不要喂重复低质量图,而要喂高信息增益、覆盖长尾、caption 可靠、符合当前训练阶段的样本。
提取低层物理属性和高层语义属性,包括分辨率、宽高比、文件大小、pHash、technical quality、compression artifacts、语义类别、语言、OCR / text richness 和复杂度。
基于 billions of embeddings 做大规模语义去重、跨模态检索和相似样本发现。
组织知识层级,发现概念空洞,重平衡概念分布,维护长尾概念覆盖。
通过自动采样发现 hard cases,驱动闭环标注、补数据和下一阶段重采样。
{
"image_path": "...",
"source": "...",
"width": 1024,
"height": 1024,
"aspect_ratio": "1:1",
"pHash": "...",
"quality_score": 0.92,
"compression_score": 0.07,
"aesthetic_score": 0.88,
"language": ["zh", "en"],
"has_text": true,
"ocr_text": "...",
"text_density": "medium",
"semantic_categories": ["poster", "portrait", "birthday"],
"style_tags": ["minimal", "warm lighting"],
"long_caption": "...",
"medium_caption": "...",
"short_caption": "...",
"simulated_user_prompt": "...",
"rarity_score": 0.73,
"curriculum_complexity_score": 0.61
}
Z-Captioner 生成 bilingual、multi-level synthetic captions:long descriptions、medium descriptions、short descriptions、tags 和 simulated user prompts。long caption 学完整视觉描述和细节绑定;medium / short caption 学真实用户 prompt;tags 学风格、类别和属性;simulated user prompt 学口语化、不完整、只关注局部的输入。原始 textual metadata 也会以小概率加入训练,以帮助模型吸收 world knowledge。
difference caption 是从 source image 到 target image 的简洁编辑指令。流程是:分别生成包含 OCR 的 source / target 详细 caption,做差异分析,最后合成明确“改什么、保留什么”的简洁编辑指令。
source: 白色杯子放在桌上,杯子上写着 “COFFEE”。
target: 黑色杯子放在桌上,杯子上写着 “QWEN”。
difference caption:
Change the cup color from white to black and replace the text "COFFEE" with "QWEN"; keep the table, lighting, and composition unchanged.
用低分辨率学习基础视觉语义对齐、构图、颜色、常见物体和基础中文文字能力。低分辨率 token 数少、batch 大、吞吐高,适合高效学习世界知识;公开报告称该阶段消耗超过一半 pretraining compute,很多 foundational visual knowledge 包括中文文字渲染是在这一阶段获得的。
任意分辨率训练,T2I / I2I 联合训练,双语多粒度 caption,初始化 image-conditioned generation / editing 能力。
curated images 与 super detailed grounded captions,把分布从 diversity-maximizing 收窄到 high-fidelity sub-manifold。SFT 如果只用高质量数据,可能导致概念覆盖变窄、长尾遗忘、风格变单一;需要 concept balancing with tagged resampling、BM25-based retrieval、rarity scores、target prior,并对 rare entities / specific artistic styles 上调采样权重。
训练多个偏向 instruction、aesthetic、realism、style diversity 的 SFT variants,再做参数空间线性插值。
从 50 / 100 NFE + CFG teacher 蒸馏到 8-step no-CFG Turbo student,包含 Decoupled DMD、DMDR、teacher denoising dynamics imitation 和 8-step real-time inference。
先 DPO offline alignment,再 GRPO online refinement,奖励关注 instruction-following、AI-content detection perception、realism、aesthetic quality、text rendering、object counting 和 layout correctness。DPO 适合从文字渲染、物体计数、颜色和空间关系等可验证客观维度冷启动,GRPO 再优化审美、真实感和更主观偏好。
在 base / turbo 能力基础上继续训练编辑任务,得到 Z-Image-Edit。
固定 VLM 与 system prompt 构造 PE,在 SFT 阶段让 DiT 适配 PE 输出的 structured reasoning chain。
| 模型 | 训练阶段 | 推理步数 | CFG | 特点 | 适用场景 |
|---|---|---|---|---|---|
| Z-Image Base | pretraining + SFT | 50 steps | 使用 CFG | 多样性更好,可 fine-tune | 研究、LoRA、通用基础模型 |
| Z-Image-Turbo | pretraining + SFT + RL + distillation | 8 steps | no CFG | 速度快,视觉质量高,多样性较低 | 实时交互、本地部署、产品原型 |
| Z-Image-Edit | continued editing training | 视实现而定 | 视实现而定 | 图像编辑能力 | 指令编辑、局部修改、参考图编辑 |
Z-Image 使用 FSDP2 shard optimizer states and gradients、gradient checkpointing、torch.compile、sequence length-aware batch construction、similar resolution / sequence length batching,并按 long sequence small batch、short sequence large batch 减少 padding 和 OOM。公开训练 compute 约 314K H800 GPU-hours:low-res pretraining 147.5K,omni-pretraining 142.5K,post-training 24K。
真正的差异不只在模型大小,而在数据公开度、caption 形态、编辑数据、VAE、条件编码、后训练和速度策略。
| 维度 | FLUX / FLUX.1 | FLUX.2 | Qwen-Image / 2.0 | Z-Image |
|---|---|---|---|---|
| 路线 | 工业级 latent rectified flow transformer | 生产级多参考 flow matching transformer | 文字 / 中文 / 图文设计 MMDiT | 高效开源 6B 单流 S3-DiT |
| 数据公开度 | 低,官方高层披露 | 低,产品能力导向披露 | 中,强调 text rendering pipeline | 高,公开数据基础设施和多阶段训练 |
| 数据核心 | 专有混合图文、合成、标注、使用数据 | 多参考、品牌、4MP 编辑、结构化 prompt | OCR、text-rich、中文、多语言、编辑对、图文排版 | profile、vector engine、知识图谱、active curation、双语 caption |
| Caption | 未公开细节 | prompt upsampling 强 | OCR-inclusive、复杂文字、段落级 | long / medium / short / tags / simulated prompt |
| 编辑数据 | Kontext 公开 source + instruction + target 路线 | single / multi-reference editing | T2I + TI2I + I2I reconstruction | difference caption + continued editing training |
| VAE | 从头训练 autoencoder,16-channel latent | 改进 autoencoder,重训 latent space | Qwen-Image-VAE / VAE-2.0 专项 text-rich | VAE tokens 作为统一序列输入 |
| 条件编码 | text/image token 混合,细节有限 | Mistral VLM + flow transformer | Qwen2.5-VL / Qwen3-VL + VAE 双编码 | prompt enhancer + semantic / VAE tokens |
| 后训练 | guidance distillation | size / step distillation,Klein | RLHF、GRPO、OPD | DPO、GRPO、D-DMD、DMDR、model merging |
| 速度策略 | dev / schnell | Klein 4-step / 9B variants | distillation / RL / unified student | Turbo 8-step no-CFG |
| 核心优势 | 高质量、prompt following、开放生态 | 生产级多参考控制和长上下文 | 中文文字、排版、精确编辑 | 低成本、高效率、开源可复现 |
工业闭源数据 + 大模型 + flow matching + 安全过滤 + 多产品线蒸馏。重点是高质量、多参考图、一致性和生产级工作流。
production workflowmulti-referencedistillation专项文字/OCR/中文/排版数据 + VLM 条件编码 + I2I reconstruction + RLHF。重点是模型真正会写字、懂图、会改图。
OCR dataQwen-VLRLHF数据效率最大化 + 单流小模型 + 动态采样 + 多粒度 caption + prompt enhancer + RL/蒸馏。重点是在 6B 和低成本条件下逼近大模型体验。
data efficiencyprompt enhancer8-step Turbo自训练路线的第一步不是选最大 DiT,而是把数据 schema、VAE 数据、caption 数据、编辑数据、SFT、RL 和蒸馏边界定义清楚。
{
"image_path": "...",
"source": "...",
"license_type": "...",
"width": 1024,
"height": 1024,
"aspect_ratio": "1:1",
"pHash": "...",
"quality_score": 0.92,
"aesthetic_score": 0.88,
"compression_score": 0.05,
"safety_labels": ["safe"],
"language": ["zh", "en"],
"has_text": true,
"ocr_text": "...",
"text_density": "medium",
"semantic_categories": ["poster", "product", "portrait"],
"style_tags": ["minimal", "cinematic"],
"long_caption": "...",
"medium_caption": "...",
"short_caption": "...",
"simulated_user_prompt": "...",
"rarity_score": 0.73,
"curriculum_complexity_score": 0.61
}
{
"source_image": "...",
"target_image": "...",
"instruction": "...",
"source_caption_with_ocr": "...",
"target_caption_with_ocr": "...",
"difference_caption": "...",
"edit_type": "text_edit | local_edit | global_edit | style_reference | character_reference",
"preserve_regions": ["face", "background", "lighting"],
"identity_similarity_score": 0.94,
"text_edit_correctness": 0.98
}
不要低估 VAE。文字、logo、UI、小字、细线、产品边缘,很多失败不是 DiT 单独造成的,而是 latent tokenizer 不保真。VAE 数据应覆盖 general images、text-rich documents、posters / PPT / UI、synthetic rendered text、small-font OCR samples、logos / packaging / diagrams。评估应包含 reconstruction FID / LPIPS、OCR correctness after reconstruction、small text readability、logo reconstruction、line / edge preservation、latent diffusability 和 semantic alignment。
pretraining 要大规模、多样、弱噪声可接受、多分辨率、多比例、多语言,目标是 world knowledge 和 mode coverage。SFT 用高质量 curated 数据、super detailed grounded captions、强审美、强真实感、强指令跟随,把分布收窄到 high-fidelity sub-manifold;如果不做 balancing,会变漂亮但变窄,导致长尾概念遗忘、风格单一、特殊对象和非英语能力下降。
无文字图 -> 单词 / logo -> 短句 -> 多行文字 -> 中英混排 -> 小字 -> 长段落 -> PPT / 海报 / 信息图。评估用 OCR exact match、character error rate、word error rate、layout correctness、font/style preservation、small text readability 和 multi-language consistency。
只用 before-after edit pair 容易全图漂移。任务组合应包含 T2I、TI2I、I2I reconstruction、multi-reference 和 text-editing,显式告诉模型没有要求改的地方要保持不变。
图像 RL 最怕 reward hacking。先从文字正确性、物体计数、颜色、空间关系、身份保持、产品形状保持和局部编辑正确性做 DPO / preference,再用 GRPO / online RL 优化审美、真实感、人像保真、构图和品牌一致性。
不要指望一个 checkpoint 同时最高质量、最快速度、最高多样性、最好微调和最低显存。Base 保留 50 steps + CFG + 多样性;Dev / Pro 做高质量和高控制;Turbo / Klein 做 4-8 steps 和 no/low CFG。
过去 prompt 像许愿;现在 prompt 更像程序。未来最强的图像模型,不一定只是最会画图的模型,而是最会把人类意图编译成稳定视觉结果的系统。
调节奖励强度、蒸馏步数和保留多样性的权重,观察 alignment、speed、diversity 和 artifact risk 的相互牵制。
trade-off ready
Z-Image 式动态数据基础设施 + Qwen-Image 式文字/OCR/编辑专项数据 + FLUX.2 式多参考图和生产工作流 + Qwen/Z-Image 式 RLHF、GRPO、OPD、few-step distillation。
工业闭源数据 + 大模型 + flow matching + 多参考图 + 生产级工作流。
文字/OCR/中文/排版专项数据 + VLM 条件编码 + I2I reconstruction + RLHF。
数据效率最大化 + 单流小模型 + 动态采样 + 多粒度 caption + prompt enhancer + RL/蒸馏。
如果只看架构,它们都属于 latent DiT / flow / MMDiT 这条大路线;真正拉开差距的是数据工程、后训练和生产工作流。
后续最值得系统研究的问题包括 VAE 的文字与细节保真、OCR reward 的鲁棒性、多参考一致性、few-step distillation 的多样性损失、以及图像 RL reward hacking 的诊断与约束。
现代图像生成的主线不是“prompt 变 image”,而是“用户意图 -> 结构化视觉规格 -> 多模态生成模型 -> VLM / reward 评估 -> 自动修正 -> 可交付视觉资产”。
本页优先使用官方页面、模型卡、技术报告和基础论文;对未公开训练配方保留未知。