Lance logo

Lance: Unified Multimodal Modeling by Multi-Task Synergy

Fengyi Fu*, Mengqi Huang*,✉, Shaojin Wu*, Yunsheng Jiang*, Yufei Huo, Jianzhu Guo✉,§
Hao Li, Yinghang Song, Fei Ding, Qian He, Zheren Fu, Zhendong Mao, Yongdong Zhang
ByteDance
* 共同一作    通讯作者    § 项目负责人

Homepage arXiv GitHub
English | 简体中文

## 🌟 亮点 Lance 是一个轻量级、原生统一的多模态模型,在单一框架下同时支持 **图像与视频的理解、生成和编辑**。 - **3B 规模高效强大。** 仅使用 **3B active parameters**,Lance 即可在图像生成、图像编辑和视频生成等基准上取得强劲表现。 - **从零训练。** Lance 采用分阶段多任务训练配方,在 **128 张 A100 GPU** 的预算内从零完成训练。
Lance benchmark overview across image generation, image editing, video generation, and video understanding
## 🎨 演示 ### 文生视频
### 视频编辑
### 多轮一致性编辑
### 智能视频生成
### 视频理解

问题: How many times did the person launch objects on the table? Options: (A) 3 (B) 2 (C) 4

回答: (A) 3

问题: The person makes sets of repeated actions. How many distinct repeated actions did the person do? Options: (A) 2 (B) 3 (C) 4

回答: (A) 2

问题: In which direction does the purple sphere move in the video? Options: (A) Down and to the right. (B) Up and to the left. (C) Up and to the right. (D) The object is stationary.

回答: (A) Down and to the right.

问题: What is the unrealistic phenomenon displayed in the video? Options: (A) The man can manipulate time via phone. (B) Man grabs an object through a phone screen. (C) Chocolate transforms into different objects. (D) Visible means of propulsion enables flight.

回答: (B) Man grabs an object through a phone screen.

问题: Offer a succinct account of the culinary process shown in this video.

回答: Add tomato puree and mix it well with chicken pieces.

问题: Provide a detailed description of the given video, capturing its key moments.

回答: In a sunlit meadow, a small tortoiseshell butterfly rests on a purple flower. A bee, with black and yellow stripes, lands on the same flower. The butterfly flaps its wings gently, while the bee busies itself, collecting nectar. The flower sways slightly in the breeze. The butterfly then takes off, and the bee follows, both heading to the next flower. The scene is a vivid display of insect interaction in a natural setting, with the colors of the butterfly and the bee contrasting against the green background of the meadow. The video captures this peaceful moment in a short 6-second duration.

### 文生图
Lance text-to-image generation examples
### 图像编辑
Lance image editing examples
### 图像理解
Pie chart reasoning case

问题: Is the largest segment greater than sum of all the other segments?

回答: Yes, the largest segment in the pie chart is the blue one, which is the most populous segment.

Survey chart about border security priorities

问题: What percentage of respondents want better border security?

回答: 29%

License plate recognition case

问题: What is the license plate number of the car?

回答: The license plate number of the car is BX62 BFY.

Market research chart reasoning case

问题: According to the data from the proprietary market research, how much amount was spent on the promotional meetings and events during 1998?

回答: According to the data from the proprietary market research, the total amount spent on the promotional meetings and events during 1998 was approximately $1.3 billion.

Colosseum description case

问题: What is the appearance of the Colosseum in Rome, Italy?

回答: The Colosseum in Rome, Italy is a magnificent ancient amphitheater made of stone and concrete. It is characterized by its large, arched openings and its semi-circular shape. The Colosseum has been partially restored, and its original color has faded, but the architectural details, like the columns and the semi-circular arches, are still visible. The lighting in the image highlights the grandeur and historical significance of the Colosseum, making it stand out against the backdrop of the evening sky.

Total solar eclipse case

问题: How does a total solar eclipse look like from Earth?

回答: A total solar eclipse looks like a dark circle with a bright, white outer edge. This is a result of the Earth's rotation and the Earth's shadow, which partially obscures the sun's light. The bright white edge of the eclipse is caused by the sun's high energy and its interaction with the Earth's atmosphere, while the dark part of the eclipse is due to the Earth's shadow and the surrounding air currents. The solar eclipse's shape, with its bright white edge and dark center, is similar to the shape of a full moon or a dark disk. It is a natural phenomenon that occurs in the atmosphere of the Earth and is an important part of the solar system.

## 🚀 安装 ### 推荐环境 - **软件环境:** Python 3.10+,CUDA 12.4+(必需) - **硬件环境:** 推理至少需要一张显存不低于 40GB 的 GPU ### 安装步骤 ```bash bash ./setup_env.sh ``` ### 下载模型权重 请从 [Lance-3B(HuggingFace 链接)](https://huggingface.co/bytedance-research/Lance) 下载所需的全部模型权重,并放置到 `downloads/` 目录下。 ## 📚 使用方法 ### 推理 Lance 为生成、编辑和理解任务提供了统一的命令行入口: #### 方式一:配置并运行统一推理脚本 ```bash bash inference_lance.sh ``` - 运行前,请先在 `inference_lance.sh` 顶部配置推理参数。 - **支持任务:** `t2i`、`t2v`、`image_edit`、`video_edit`、`x2t_image` 和 `x2t_video`。你也可以在 `inference_lance.py` 中修改 `TASK_DEFAULT_CONFIGS`,自定义每个任务默认使用的数据样例。 - **注意:** 对于所有任务,建议在编写输入 prompt 时参考提供示例中的 `prompt` 格式,这通常有助于获得更好的生成效果。 #### Option 2: 运行任务专用一键脚本 我们提供了面向不同生成、编辑和理解任务的一键启动命令,便于快速运行指定任务类型。 ##### 文本-视频生成 ```bash bash inference_lance.sh \ --TASK_NAME t2v \ --MODEL_PATH downloads/Lance_3B_Video \ --RESOLUTION video_480p \ --NUM_FRAMES 121 \ --VIDEO_HEIGHT 480 \ --VIDEO_WIDTH 848 \ --SAVE_PATH_GEN results/t2v_121f ``` ##### 文本-图像生成 ```bash bash inference_lance.sh \ --TASK_NAME t2i \ --MODEL_PATH downloads/Lance_3B \ --RESOLUTION image_768res \ --VIDEO_HEIGHT 768 \ --VIDEO_WIDTH 768 \ --SAVE_PATH_GEN results/t2i ``` ##### 视频编辑 ```bash bash inference_lance.sh \ --TASK_NAME video_edit \ --MODEL_PATH downloads/Lance_3B_Video \ --RESOLUTION video_480p \ --SAVE_PATH_GEN results/video_edit ``` ##### 图像编辑 ```bash bash inference_lance.sh \ --TASK_NAME image_edit \ --MODEL_PATH downloads/Lance_3B \ --RESOLUTION image_768res \ --SAVE_PATH_GEN results/image_edit ``` ##### 视频理解 ```bash bash inference_lance.sh \ --TASK_NAME x2t_video \ --MODEL_PATH downloads/Lance_3B_Video \ --RESOLUTION video_480p \ --NUM_FRAMES 50 \ --SAVE_PATH_GEN results/x2t_video ``` ##### 图像理解 ```bash bash inference_lance.sh \ --TASK_NAME x2t_image \ --MODEL_PATH downloads/Lance_3B \ --RESOLUTION image_768res \ --SAVE_PATH_GEN results/x2t_image ``` #### 可用任务 | 任务名 | 说明 | 示例 JSON | |------------------------|--------------------------------------------------|----------------------------------------------| | `t2v` | 文生视频 | `config/examples/t2v_example.json` | | `t2i` | 文生图 | `config/examples/t2i_example.json` | | `image_edit` | 图像编辑 | `config/examples/image_edit_example.json` | | `video_edit` | 视频编辑 | `config/examples/video_edit_example.json` | | `x2t_image` | 图像理解 | `config/examples/x2t_image_example.json` | | `x2t_video` | 视频理解 | `config/examples/x2t_video_example.json` | 关于理解任务的示例文件: - `config/examples/x2t_image_example.json`:用于图像理解示例,包括视觉问答和基于图像的推理。 - `config/examples/x2t_video_example.json`:用于视频理解示例,包括视频问答和视频描述。 #### 参数说明 你可以在 `inference_lance.sh` 顶部配置以下超参数: | 参数 | 默认值 | 说明 | | --- | --- | --- | | `MODEL_PATH` | `"downloads/lance_3b"` | 下载后的 Lance 模型权重路径。 | | `NUM_GPUS` | `1` | 用于推理的 GPU 数量。 | | `VALIDATION_NUM_TIMESTEPS` | `30` | 去噪步数(例如 30 或 50)。 | | `VALIDATION_TIMESTEP_SHIFT` | `3.5` | Flow matching 调度中的 timestep shift 参数。 | | `CFG_TEXT_SCALE` | `4.0` | 文本条件的 CFG(Classifier-Free Guidance)系数。 | | `VALIDATION_DATA_SEED` | `42` | 用于复现实验的随机种子。 | | `NUM_FRAMES` | `50` | 视频生成帧数(最大 121)。*图像任务不使用该参数。* | | `VIDEO_HEIGHT` / `VIDEO_WIDTH`| `768` | 空间分辨率。*编辑任务不使用该参数(由输入图像/视频决定)。* | | `RESOLUTION` | `"video_480p"` | 基础分辨率预设(如 `image_768res` 或 `video_480p`)。 | ### Gradio ```python python lance_gradio_t2v_v2t.py --gpus 0 --server-port 7860 ``` ### 基准评测 #### DPG-Bench 评测
模型 # Params. Global Entity Attribute Relation Other Overall
仅生成模型
SDXL3.5B83.2782.4380.9186.7680.4174.65
DALL-E 3-90.9789.6188.3990.5889.8383.50
SD3-Medium2B87.9091.0188.8380.7088.6884.08
FLUX.1-dev12B74.3590.0088.9690.8788.3383.84
Qwen-Image20B91.3291.5692.0294.3192.7388.32
统一模型
Janus-Pro-7B7B86.9088.9089.4089.3289.4884.19
OmniGen24B88.8188.8390.1889.3790.2783.57
Show-o27B89.0091.7889.9691.8191.6486.14
BAGEL7B88.9490.3791.2990.8288.6785.07
InternVL-U1.7B90.3990.7890.6890.2988.7785.18
TUNA7B90.4291.6890.9491.8790.7386.76
TUNA-27B89.5091.4092.0791.9188.8186.54
🌟 Lance (Ours)3B83.8991.0789.3693.3880.8084.67

表示该方法在生成前使用 LLM rewriter 进行 prompt rewriting。

#### GenEval 评测
模型 # Params. 1-Obj. 2-Obj. Count Colors Position Attr. Overall
仅生成模型
SDXL3.5B0.980.740.390.850.150.230.55
DALL-E 3-0.960.870.470.830.430.450.67
SD3-Medium2B0.990.940.720.890.330.600.74
FLUX.1-dev12B0.980.930.750.930.680.650.82
Qwen-Image20B0.990.920.890.880.760.770.87
统一模型
Janus-Pro-7B7B0.990.890.590.900.790.660.80
OmniGen24B1.000.950.640.880.550.760.80
Show-o27B1.000.870.580.920.520.620.76
BAGEL7B0.980.950.840.950.780.770.88
Mogao7B1.000.970.830.930.840.800.89
InternVL-U1.7B0.990.940.740.910.770.740.85
TUNA7B1.000.970.810.910.880.830.90
TUNA-27B0.990.960.800.910.840.760.87
🌟 Lance (Ours)3B1.000.940.840.970.870.810.90

表示该方法在生成前使用 LLM rewriter 进行 prompt rewriting。

#### GEdit-Bench 评测
模型 # Params. BC CA MM MC PB ST SA SR SRp TM TT Avg/G_O
仅生成模型
Gemini 2.0------------6.32
GPT Image 1-6.966.857.105.416.747.447.518.738.558.458.697.49
Qwen-Image-Edit20B8.238.307.338.057.496.748.578.098.298.488.508.01
统一模型
Lumina-DiMOO8B3.434.273.082.774.745.194.443.804.382.684.203.91
Ovis-U11.2B7.496.886.214.795.986.467.497.257.274.486.316.42
BAGEL7B7.326.916.384.754.576.157.907.167.027.326.226.52
InternVL-U1.7B7.087.056.387.026.036.277.136.556.336.596.856.66
InternVL-U (w/ CoT)1.7B7.057.876.506.995.776.107.337.167.127.366.466.88
🌟 Lance (Ours)3B7.737.747.287.837.507.037.647.857.714.467.577.30
#### VBench 评测(视频生成)
类型 Model # Params. Total Score ↑
Gen. Only ModelScope1.7B75.75
LaVie3B77.08
Show-16B78.93
AnimateDiff-V2-80.27
VideoCrafter-2.0-80.44
CogVideoX5B81.61
Kling-81.85
Open-Sora-2.0-81.71
Gen-3-82.32
Step-Video-T2V30B81.83
Hunyuan Video-83.43
Wan2.1-T2V14B83.69
Unified HaproOmni7B78.10
Emu38B80.96
VILA-U7B74.01
Show-o22B81.34
TUNA1.5B84.06
🌟 Lance (Ours)3B85.11
#### 运行基准评测 `benchmarks/` 目录下提供了可直接运行的基准评测脚本: | 基准 | 模态 | 脚本 | |------------------------|----------|---------------------------------------------------------------| | GenEVAL(图像生成) | 图像 | `benchmarks/image_gen/GenEVAL/sample_GenEVAL.sh` | | DPG(图像生成) | 图像 | `benchmarks/image_gen/DPG/sample_DPG.sh` | | GEdit(图像编辑) | 图像 | `benchmarks/image_gen/GEdit/sample_GEdit.sh` | | VBench(视频生成) | 视频 | `benchmarks/video_gen/Vbench/sample_vbench.sh` | ## 📄 许可证 Copyright 2025 Bytedance Ltd. and/or its affiliates. ## 🙏 致谢 感谢 [BAGEL](https://github.com/ByteDance-Seed/bagel)、[Qwen2.5-VL-3B-Instruct](https://huggingface.co/Qwen/Qwen2.5-VL-3B-Instruct) 和 [Wan2.2](https://github.com/Wan-Video/Wan2.2) 的贡献者们公开研究成果并推动社区发展。 ## 💖 引用 如果 Lance 对您的项目或研究有帮助,欢迎 🌟 本仓库,并使用以下 BibTeX 引用我们的工作: ```bibtex @misc{lance2026, title = {Lance: Unified Multimodal Modeling by Multi-Task Synergy}, author = {Fengyi Fu and Mengqi Huang and Shaojin Wu and Yunsheng Jiang and Yufei Huo and Jianzhu Guo and Hao Li and Yinghang Song and Fei Ding and Qian He and Zheren Fu and Zhendong Mao and Yongdong Zhang}, year = {2026}, note = {Manuscript} } ``` ## 📞 联系方式 如有问题、反馈或合作需求,请联系 [Mengqi Huang](https://corleone-huang.github.io/) 和 [Jianzhu Guo](https://guojianzhu.com/)。