把一种或多种输入模态,转换、补全或生成另一种目标模态的模块。
例如:
text
文本 → 图像
图像 → 文本
文本 → 语音
语音 → 文本
图像 + 文本 → 视频
图像 + 文本 → 机器人动作
图像 → 深度图 / mask / 结构化检测结果
缺失模态 → 伪模态补全
在 sVLM / MLLM / VLA 系统里,模态生成器通常不是单独一个网络,而是由 模态编码器、跨模态对齐层、核心推理模型、目标模态解码器 共同组成。
1. 模态生成器的核心结构
典型结构如下:
text
输入模态 x_m
↓
模态编码器 Encoder_m
↓
语义 latent / token 表示 z_m
↓
跨模态对齐 / 融合模块
↓
统一推理核心:LLM / Transformer / Diffusion / DiT / Flow
↓
目标模态解码器 Decoder_n
↓
输出模态 y_n
可以抽象成:
text
z_m = Encoder_m(x_m)
h = Fusion(z_m, prompt, task)
y_n = Decoder_n(h)
训练目标一般包含:
text
L = L_generation + L_alignment + L_reconstruction + L_instruction + L_contrastive
其中:
| 损失 | 作用 |
|---|---|
L_generation |
让模型生成目标模态,如图像、文本、语音、动作 |
L_alignment |
让不同模态进入同一语义空间 |
L_reconstruction |
用于 VAE / VQ-VAE / diffusion 的重建质量 |
L_instruction |
让模型听懂人类指令 |
L_contrastive |
类似 CLIP / ImageBind 的跨模态相似度约束 |
2. 三类主流技术路线
2.1 路线一:编码器 + 专用解码器
这是最常见、最工程化的路线。
text
文本 Encoder → 图像 Diffusion Decoder
图像 Encoder → 文本 LLM Decoder
文本 Encoder → 语音 TTS Decoder
图像/文本 Encoder → 动作 Policy Decoder
典型例子:
| 方向 | 模态生成 |
|---|---|
| Stable Diffusion | 文本 → 图像 |
| LLaVA / MiniCPM-V | 图像 + 文本 → 文本 |
| Coqui TTS | 文本 → 语音 |
| OpenVLA | 图像 + 语言 → 机器人动作 |
| ControlNet | 图像条件 / 边缘 / 姿态 / mask → 可控图像 |
优点是工程成熟、效果稳定;缺点是不同模态通常要接不同 decoder,系统复杂度较高。
Stable Diffusion 本质上是 CLIP 文本编码器 + latent diffusion 图像生成器,官方仓库也明确说明它是由 CLIP ViT-L/14 文本嵌入条件控制的 latent diffusion 模型。([GitHub][1])
2.2 路线二:统一 token 化,多模态都当成"语言"
这类方法把图像、语音、视频、动作都离散化成 token,然后统一交给 Transformer / LLM 做 next-token prediction。
text
文本 token
图像 token
音频 token
动作 token
bbox token
mask token
↓
统一 Transformer
↓
生成目标模态 token
↓
目标模态 Decoder 还原
代表项目:
| 项目 | 说明 |
|---|---|
| Unified-IO 2 | 统一处理图像、文本、音频、动作、bbox 等输入输出 |
| AnyGPT | 把语音、文本、图像、音乐表示为离散 token,用 LLM 做统一建模 |
| VILA-U | 用单一自回归 next-token 框架统一视觉理解与视觉生成 |
Unified-IO 2 被描述为可以理解并生成 image、text、audio、action 的自回归多模态模型,并把图像、文本、音频、动作、bbox 等统一 token 化到共享空间中。([arXiv][2])
AnyGPT 则强调通过离散表示统一处理 speech、text、image、music,并且尽量不改动现有 LLM 架构和训练范式。([GitHub][3])
这条路线很适合未来 sVLM,因为它可以把"检测框、OCR、mask、动作、商品属性"都统一成 token。
2.3 路线三:多模态生成专家 / Any-to-Any 架构
这类方法不强求所有模态都由一个 decoder 生成,而是:
text
LLM 做中枢调度
图像由 diffusion 生成
音频由 audio generator 生成
视频由 video diffusion 生成
文本由 LLM 生成
典型代表:
| 项目 | 特点 |
|---|---|
| NExT-GPT | 任意模态输入 → 任意模态输出 |
| CoDi | Composable Diffusion,支持任意模态组合生成 |
| ImageBind + 生成器 | 先绑定多模态语义空间,再接不同生成器 |
NExT-GPT 官方说明其通过连接 LLM、多模态适配器和不同 diffusion decoder,实现 text、image、video、audio 的任意输入输出。([next-gpt.github.io][4])
CoDi 的核心是 Composable Diffusion,可以从任意输入模态组合生成语言、图像、视频或音频等输出模态。([codi-gen.github.io][5])
ImageBind 则不是直接生成模型,而是把 image、text、audio、depth、thermal、IMU 六种模态映射到统一 embedding 空间,可作为模态生成器前面的"跨模态语义枢纽"。([GitHub][6])
3. 模态生成器的关键模块
3.1 模态编码器
负责把原始输入变成统一 latent / token。
| 输入模态 | 常见编码器 |
|---|---|
| 图像 | CNN、ViT、CLIP、SigLIP、SAM encoder |
| 文本 | BERT、T5、LLaMA、Qwen、Mistral tokenizer + embedding |
| 音频 | Whisper encoder、HuBERT、Wav2Vec2、EnCodec |
| 视频 | TimeSformer、VideoMAE、3D Conv、ViT + temporal adapter |
| 点云 / 深度 | PointNet、Point-BERT、SparseConv、Voxel encoder |
| 动作 | Action tokenizer、轨迹编码器、VLA policy encoder |
3.2 跨模态对齐层
作用是把不同模态对齐到一个语义空间。
常见方法:
text
1. Contrastive Learning
图像-文本相似度对齐,如 CLIP / SigLIP
2. Projection / Adapter
把视觉特征投影到 LLM token 空间,如 LLaVA projector
3. Q-Former / Resampler
用少量 query token 压缩视觉信息,如 BLIP-2 / Flamingo 类路线
4. Cross-Attention
文本 token 通过 cross-attention 读取视觉 / 音频 / 视频特征
5. Unified Tokenizer
直接把不同模态变成 token 序列
LLaVA 的典型结构就是 视觉编码器 + 投影层 + LLM,通过 visual instruction tuning 让图像输入可以被语言模型理解和回答。([GitHub][7])
3.3 目标模态解码器
这是"生成器"的核心。
| 目标模态 | 常见生成器 |
|---|---|
| 文本 | LLM decoder |
| 图像 | Diffusion / VAE decoder / DiT |
| 视频 | Video Diffusion / 3D U-Net / DiT |
| 语音 | TTS acoustic model + vocoder |
| 音乐 | Audio token autoregressive model |
| 机器人动作 | Policy decoder / diffusion policy / flow policy |
| mask / bbox | Detection head / segmentation decoder |
| 深度图 | Dense prediction decoder |
AudioCraft 是典型音频模态生成器工具,包含 AudioGen 和 MusicGen 的推理与训练代码,用于高质量音频生成。([GitHub][8])
Coqui TTS 则是文本到语音方向的成熟开源工具,提供 1100+ 语言的预训练模型以及训练、微调、数据分析工具。([GitHub][9])
4. 在 sVLM 中,模态生成器主要做什么?
对 sVLM 来说,模态生成器不一定要生成漂亮图片,更重要的是生成 任务有用的中间模态。
5. 推荐开源项目
5.1 通用多模态生成 / Any-to-Any
| 项目 | 推荐指数 | 适合用途 |
|---|---|---|
| NExT-GPT | ★★★★★ | 任意模态输入输出框架,适合研究"LLM + 多模态 decoder"架构 |
| CoDi / i-Code | ★★★★☆ | 任意模态组合生成,适合研究 composable diffusion |
| AnyGPT | ★★★★☆ | 离散 token 统一建模,适合研究统一多模态 LLM |
| Unified-IO 2 | ★★★★☆ | 图像、文本、音频、动作统一建模,适合理论和大一统架构研究 |
| VILA-U | ★★★★☆ | 单一自回归框架统一视觉理解和生成 |
NExT-GPT 适合看"LLM 中枢 + 多个模态解码器"的工程组织方式;AnyGPT 和 Unified-IO 2 更适合看"所有模态 token 化"的统一建模路线。([GitHub][10])
5.2 图像生成 / 图像编辑 / 可控生成
| 项目 | 推荐指数 | 适合用途 |
|---|---|---|
| Hugging Face Diffusers | ★★★★★ | diffusion 模型训练、推理、微调、部署基础库 |
| Stable Diffusion | ★★★★★ | 文本到图像、图像编辑、LoRA 微调 |
| ControlNet | ★★★★★ | 边缘图、深度图、姿态、mask 条件控制生成 |
| ComfyUI | ★★★★☆ | 节点化搭建复杂生成 pipeline |
Diffusers 是目前最常用的 diffusion 工程库之一,官方说明其覆盖图像、音频甚至 3D 分子结构生成模型。([GitHub][11])
ControlNet 的核心价值是给 diffusion 模型加入额外条件,例如边缘、姿态、深度、mask,让生成结果可控。([GitHub][12])
ComfyUI 适合做工程原型,因为它用节点/流程图方式搭建 Stable Diffusion 工作流,不需要大量手写代码。([GitHub][13])
5.3 视觉语言理解生成:图像 / 视频 → 文本
| 项目 | 推荐指数 | 适合用途 |
|---|---|---|
| LLaVA / LLaVA-NeXT | ★★★★★ | VLM 架构学习、visual instruction tuning |
| MiniCPM-V | ★★★★★ | 端侧多模态理解,适合 sVLM / edge VLM |
| VILA | ★★★★☆ | 高效视频、多图理解 |
| SmolVLM | ★★★★☆ | 轻量级 VLM baseline |
MiniCPM-V 系列定位为高性能、可端侧部署的多模态大模型,MiniCPM-o 进一步扩展到实时 video/audio 输入和 text/speech 输出。([GitHub][14])
VILA 是一系列开放 VLM,重点优化高效视频理解和多图理解。([GitHub][15])
5.4 音频 / 语音生成
| 项目 | 推荐指数 | 适合用途 |
|---|---|---|
| Coqui TTS | ★★★★★ | 文本转语音、语音克隆、TTS 微调 |
| AudioCraft / MusicGen / AudioGen | ★★★★★ | 音乐生成、环境音生成、音频 token 生成 |
| Bark / XTTS 类项目 | ★★★★☆ | 多语言语音生成、对话式语音输出 |
AudioCraft 的 MusicGen 是单阶段自回归 Transformer,基于 EnCodec tokenizer 的多 codebook 音频 token 生成。([GitHub][16])
5.5 视频生成
| 项目 | 推荐指数 | 适合用途 |
|---|---|---|
| Open-Sora | ★★★★★ | 文本到视频、图像到视频、开源视频生成研究 |
| Open-Sora-Plan | ★★★★☆ | 文生视频模型组合与训练方案参考 |
| VideoCrafter / ModelScope T2V | ★★★☆☆ | 传统开源文生视频 baseline |
Open-Sora 官方说明其模型优化了 image-to-video,同时也支持 text-to-video,并提供 text-to-image-to-video pipeline。([GitHub][17])
Open-Sora-Plan 中的 Allegro 支持最高 6 秒、15 FPS、720p 的文本到视频生成,是可关注的开源视频生成路线。([GitHub][18])
5.6 机器人动作 / VLA 模态生成
| 项目 | 推荐指数 | 适合用途 |
|---|---|---|
| OpenVLA | ★★★★★ | 图像 + 指令 → 机器人动作 |
| LeRobot | ★★★★★ | 机器人数据、训练、策略部署工具链 |
| openpi | ★★★★★ | flow-based / autoregressive VLA 动作生成 |
| Open X-Embodiment | ★★★★☆ | 大规模机器人轨迹数据 |
OpenVLA 是开源 Vision-Language-Action 模型,面向通用机器人操作,支持训练和微调机器人 manipulation policy。([GitHub][19])
OpenVLA-7B 模型使用 Open X-Embodiment 的 970K 机器人操作 episode 训练,输入语言指令和相机图像,输出机器人动作。([Hugging Face][20])
openpi 仓库包含 π₀ flow-based VLA 和 π₀-FAST autoregressive VLA,后者基于 FAST action tokenizer。([GitHub][21])
LeRobot 提供真实机器人机器学习所需的模型、数据集和工具,目标是降低机器人学习门槛。([Hugging Face][22])
5.7 缺失模态生成 / 模态补全
这个方向对工业落地很重要,例如:
text
摄像头缺失 → 用历史图像 / 结构先验补全
音频缺失 → 用视觉事件估计
图像局部遮挡 → 用语义先验恢复
缺少 OCR → 用商品 embedding + SKU 库补全
推荐项目:
| 项目 | 推荐指数 | 适合用途 |
|---|---|---|
| SMIL | ★★★★☆ | 严重缺失模态场景的多模态学习 |
| MD²N | ★★★★☆ | diffusion 式缺失模态恢复 |
| MissRAG | ★★★★☆ | 用多模态 RAG 解决 MLLM 缺失模态问题 |
| MPLMM / missing-aware prompts | ★★★☆☆ | prompt learning 处理缺失模态 |
SMIL 明确研究训练和测试阶段都可能存在模态缺失的问题,甚至考虑 90% 样本存在不完整模态的严重缺失场景。([GitHub][23])
MD²N 使用 multi-stage duplex diffusion 做缺失模态恢复,通过 global structure generation、modality transfer、local cross-modal refinement 三阶段完成补全。([crystal-punk.github.io][24])
MissRAG 则通过从训练集原型池检索相关模态数据,缓解 MLLM 输入模态缺失问题。([GitHub][25])
8. 最推荐的开源清单
综合工程价值,建议重点跟踪:
text
1. Hugging Face Diffusers
2. Stable Diffusion
3. ControlNet
4. ComfyUI
5. LLaVA / LLaVA-NeXT
6. MiniCPM-V
7. VILA / VILA-U
8. NExT-GPT
9. AnyGPT
10. Unified-IO 2
11. ImageBind
12. Coqui TTS
13. AudioCraft
14. Open-Sora
15. OpenVLA
16. LeRobot
17. openpi
18. SMIL
19. MD²N
20. MissRAG
总结:
模态生成器的本质,是把不同模态统一成可计算的语义表示,再通过目标模态 decoder 生成图像、文本、音频、视频、动作或结构化结果。未来 sVLM 的重点不是单纯"生成图片",而是生成能服务任务决策的中间模态:mask、bbox、OCR、embedding、属性文本、库存差异和动作。
参考链接:
1\]: https://github.com/compvis/stable-diffusion?utm_source=chatgpt.com "CompVis/stable-diffusion: A latent text-to-image ..." \[2\]: https://arxiv.org/abs/2312.17172?utm_source=chatgpt.com "Unified-IO 2: Scaling Autoregressive Multimodal Models ..." \[3\]: https://github.com/OpenMOSS/AnyGPT?utm_source=chatgpt.com "Code for "AnyGPT: Unified Multimodal LLM with Discrete ..." \[4\]: https://next-gpt.github.io/?utm_source=chatgpt.com "NExT-GPT" \[5\]: https://codi-gen.github.io/?utm_source=chatgpt.com "CoDi: Generate Anything from Anything All At Once through ..." \[6\]: https://github.com/facebookresearch/imagebind?utm_source=chatgpt.com "ImageBind One Embedding Space to Bind Them All" \[7\]: https://github.com/haotian-liu/llava?utm_source=chatgpt.com "haotian-liu/LLaVA: \[NeurIPS'23 Oral\] Visual Instruction ..." \[8\]: https://github.com/facebookresearch/audiocraft?utm_source=chatgpt.com "GitHub - facebookresearch/audiocraft" \[9\]: https://github.com/coqui-ai/tts?utm_source=chatgpt.com "coqui-ai/TTS: 🐸💬 - a deep learning toolkit for Text-to- ..." \[10\]: https://github.com/NExT-GPT/NExT-GPT?utm_source=chatgpt.com "NExT-GPT: Any-to-Any Multimodal LLM" \[11\]: https://github.com/huggingface/diffusers?utm_source=chatgpt.com "State-of-the-art diffusion models for image, video, and ..." \[12\]: https://github.com/lllyasviel/controlnet?utm_source=chatgpt.com "lllyasviel/ControlNet: Let us control diffusion models!" \[13\]: https://github.com/Comfy-Org/ComfyUI?utm_source=chatgpt.com "Comfy-Org/ComfyUI: The most powerful and modular ..." \[14\]: https://github.com/OpenBMB/MiniCPM-V?utm_source=chatgpt.com "OpenBMB/MiniCPM-V: A Pocket-Sized MLLM for Ultra- ..." \[15\]: https://github.com/NVlabs/VILA?utm_source=chatgpt.com "VILA is a family of state-of-the-art vision language models ..." \[16\]: https://github.com/facebookresearch/audiocraft/blob/main/docs/MUSICGEN.md?utm_source=chatgpt.com "audiocraft/docs/MUSICGEN.md at main" \[17\]: https://github.com/hpcaitech/Open-Sora?utm_source=chatgpt.com "Open-Sora: Democratizing Efficient Video Production for All" \[18\]: https://github.com/PKU-YuanGroup/Open-Sora-Plan?utm_source=chatgpt.com "PKU-YuanGroup/Open-Sora-Plan" \[19\]: https://github.com/openvla/openvla?utm_source=chatgpt.com "OpenVLA: An Open-Source Vision-Language-Action Model" \[20\]: https://huggingface.co/openvla/openvla-7b?utm_source=chatgpt.com "openvla/openvla-7b" \[21\]: https://github.com/Physical-Intelligence/openpi?utm_source=chatgpt.com "Physical-Intelligence/openpi" \[22\]: https://huggingface.co/lerobot?utm_source=chatgpt.com "LeRobot" \[23\]: https://github.com/deep-real/SMIL?utm_source=chatgpt.com "SMIL: Multimodal Learning with Severely Missing Modality" \[24\]: https://crystal-punk.github.io/?utm_source=chatgpt.com "Unbiased Missing-modality Multimodal Learning" \[25\]: https://github.com/aimagelab/MissRAG?utm_source=chatgpt.com "MissRAG: Addressing the Missing Modality Challenge in ..."