Duplicate from bytedance-research/Lance
Browse filesCo-authored-by: Fengyi <ffy2000@users.noreply.huggingface.co>
This view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +91 -0
- Lance_3B/generation_config.json +12 -0
- Lance_3B/llm_config.json +61 -0
- Lance_3B/merges.txt +0 -0
- Lance_3B/model.safetensors +3 -0
- Lance_3B/tokenizer.json +0 -0
- Lance_3B/vocab.json +0 -0
- Lance_3B_Video/generation_config.json +12 -0
- Lance_3B_Video/llm_config.json +61 -0
- Lance_3B_Video/merges.txt +0 -0
- Lance_3B_Video/model.safetensors +3 -0
- Lance_3B_Video/tokenizer.json +0 -0
- Lance_3B_Video/tokenizer_config.json +207 -0
- Lance_3B_Video/vocab.json +0 -0
- Qwen2.5-VL-ViT/config.json +21 -0
- Qwen2.5-VL-ViT/vit.safetensors +3 -0
- README.md +664 -0
- README_zh.md +665 -0
- Wan2.2_VAE.pth +3 -0
- assets/benchmarks/benchmark-overview.png +3 -0
- assets/docs/.DS_Store +0 -0
- assets/docs/changelog/2026-05-26.md +18 -0
- assets/docs/changelog/demo-05-26.webp +3 -0
- assets/image-editing/image-editing-overview.webp +3 -0
- assets/image-understanding/cases/image-understanding-case-01.png +3 -0
- assets/image-understanding/cases/image-understanding-case-02.png +0 -0
- assets/image-understanding/cases/image-understanding-case-03.png +3 -0
- assets/image-understanding/cases/image-understanding-case-04.png +3 -0
- assets/image-understanding/cases/image-understanding-case-05.png +3 -0
- assets/image-understanding/cases/image-understanding-case-06.png +3 -0
- assets/intelligent-video/previews/intelligent-video-demo-01.gif +0 -0
- assets/intelligent-video/previews/intelligent-video-demo-02.gif +0 -0
- assets/intelligent-video/previews/intelligent-video-demo-03.gif +0 -0
- assets/intelligent-video/previews/intelligent-video-demo-04.gif +0 -0
- assets/intelligent-video/videos/intelligent-video-demo-01.mp4 +0 -0
- assets/intelligent-video/videos/intelligent-video-demo-02.mp4 +0 -0
- assets/intelligent-video/videos/intelligent-video-demo-03.mp4 +0 -0
- assets/intelligent-video/videos/intelligent-video-demo-04.mp4 +0 -0
- assets/logo/lance-logo.webp +3 -0
- assets/multi-turn-editing/previews/multi-turn-editing-demo-01.gif +3 -0
- assets/multi-turn-editing/videos/multi-turn-editing-demo-01.mp4 +3 -0
- assets/text-to-image/text-to-image-overview.webp +3 -0
- assets/text-to-video/previews/text-to-video-demo-01.gif +3 -0
- assets/text-to-video/previews/text-to-video-demo-02.gif +3 -0
- assets/text-to-video/previews/text-to-video-demo-03.gif +3 -0
- assets/text-to-video/previews/text-to-video-demo-04.gif +3 -0
- assets/text-to-video/previews/text-to-video-demo-05.gif +3 -0
- assets/text-to-video/previews/text-to-video-demo-06.gif +3 -0
- assets/text-to-video/previews/text-to-video-demo-07.gif +3 -0
- assets/text-to-video/previews/text-to-video-demo-08.gif +3 -0
.gitattributes
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
assets/benchmarks/benchmark-overview.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
assets/image-editing/image-editing-overview.webp filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
assets/image-understanding/cases/image-understanding-case-01.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
assets/image-understanding/cases/image-understanding-case-03.png filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
assets/image-understanding/cases/image-understanding-case-04.png filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
assets/image-understanding/cases/image-understanding-case-05.png filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
assets/image-understanding/cases/image-understanding-case-06.png filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
assets/logo/lance-logo.webp filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
assets/multi-turn-editing/previews/multi-turn-editing-demo-01.gif filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
assets/multi-turn-editing/videos/multi-turn-editing-demo-01.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
assets/text-to-image/text-to-image-overview.webp filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
assets/text-to-video/previews/text-to-video-demo-01.gif filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
assets/text-to-video/previews/text-to-video-demo-02.gif filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
assets/text-to-video/previews/text-to-video-demo-03.gif filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
assets/text-to-video/previews/text-to-video-demo-04.gif filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
assets/text-to-video/previews/text-to-video-demo-05.gif filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
assets/text-to-video/previews/text-to-video-demo-06.gif filter=lfs diff=lfs merge=lfs -text
|
| 53 |
+
assets/text-to-video/previews/text-to-video-demo-07.gif filter=lfs diff=lfs merge=lfs -text
|
| 54 |
+
assets/text-to-video/previews/text-to-video-demo-08.gif filter=lfs diff=lfs merge=lfs -text
|
| 55 |
+
assets/text-to-video/videos/text-to-video-demo-01.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 56 |
+
assets/text-to-video/videos/text-to-video-demo-02.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 57 |
+
assets/text-to-video/videos/text-to-video-demo-03.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 58 |
+
assets/text-to-video/videos/text-to-video-demo-04.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 59 |
+
assets/text-to-video/videos/text-to-video-demo-05.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
+
assets/text-to-video/videos/text-to-video-demo-06.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
assets/text-to-video/videos/text-to-video-demo-07.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
assets/text-to-video/videos/text-to-video-demo-08.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
assets/video-editing/previews/video-editing-demo-01.gif filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
assets/video-editing/previews/video-editing-demo-02.gif filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
assets/video-editing/previews/video-editing-demo-03.gif filter=lfs diff=lfs merge=lfs -text
|
| 66 |
+
assets/video-editing/previews/video-editing-demo-04.gif filter=lfs diff=lfs merge=lfs -text
|
| 67 |
+
assets/video-editing/previews/video-editing-demo-05.gif filter=lfs diff=lfs merge=lfs -text
|
| 68 |
+
assets/video-editing/previews/video-editing-demo-06.gif filter=lfs diff=lfs merge=lfs -text
|
| 69 |
+
assets/video-editing/previews/video-editing-demo-07.gif filter=lfs diff=lfs merge=lfs -text
|
| 70 |
+
assets/video-editing/previews/video-editing-demo-08.gif filter=lfs diff=lfs merge=lfs -text
|
| 71 |
+
assets/video-editing/videos/video-editing-demo-01.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 72 |
+
assets/video-editing/videos/video-editing-demo-02.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 73 |
+
assets/video-editing/videos/video-editing-demo-03.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 74 |
+
assets/video-editing/videos/video-editing-demo-04.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 75 |
+
assets/video-editing/videos/video-editing-demo-05.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 76 |
+
assets/video-editing/videos/video-editing-demo-06.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 77 |
+
assets/video-editing/videos/video-editing-demo-07.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 78 |
+
assets/video-editing/videos/video-editing-demo-08.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 79 |
+
assets/video-understanding/previews/video-understanding-caption-long-01.gif filter=lfs diff=lfs merge=lfs -text
|
| 80 |
+
assets/video-understanding/previews/video-understanding-caption-short-01.gif filter=lfs diff=lfs merge=lfs -text
|
| 81 |
+
assets/video-understanding/previews/video-understanding-vqa-01.gif filter=lfs diff=lfs merge=lfs -text
|
| 82 |
+
assets/video-understanding/previews/video-understanding-vqa-02.gif filter=lfs diff=lfs merge=lfs -text
|
| 83 |
+
assets/video-understanding/previews/video-understanding-vqa-03.gif filter=lfs diff=lfs merge=lfs -text
|
| 84 |
+
assets/video-understanding/previews/video-understanding-vqa-04.gif filter=lfs diff=lfs merge=lfs -text
|
| 85 |
+
assets/video-understanding/videos/video-understanding-caption-long-01.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 86 |
+
assets/video-understanding/videos/video-understanding-caption-short-01.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 87 |
+
assets/video-understanding/videos/video-understanding-vqa-01.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 88 |
+
assets/video-understanding/videos/video-understanding-vqa-02.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 89 |
+
assets/video-understanding/videos/video-understanding-vqa-03.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 90 |
+
assets/video-understanding/videos/video-understanding-vqa-04.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 91 |
+
assets/docs/changelog/demo-05-26.webp filter=lfs diff=lfs merge=lfs -text
|
Lance_3B/generation_config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 151643,
|
| 3 |
+
"pad_token_id": 151643,
|
| 4 |
+
"do_sample": true,
|
| 5 |
+
"eos_token_id": [
|
| 6 |
+
151645,
|
| 7 |
+
151643
|
| 8 |
+
],
|
| 9 |
+
"repetition_penalty": 1.05,
|
| 10 |
+
"temperature": 0.000001,
|
| 11 |
+
"transformers_version": "4.49.0"
|
| 12 |
+
}
|
Lance_3B/llm_config.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen2_5_VLForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"attention_dropout": 0.0,
|
| 6 |
+
"bos_token_id": 151643,
|
| 7 |
+
"eos_token_id": 151645,
|
| 8 |
+
"vision_start_token_id": 151652,
|
| 9 |
+
"vision_end_token_id": 151653,
|
| 10 |
+
"vision_token_id": 151654,
|
| 11 |
+
"image_token_id": 151655,
|
| 12 |
+
"video_token_id": 151656,
|
| 13 |
+
"hidden_act": "silu",
|
| 14 |
+
"hidden_size": 2048,
|
| 15 |
+
"initializer_range": 0.02,
|
| 16 |
+
"intermediate_size": 11008,
|
| 17 |
+
"max_position_embeddings": 128000,
|
| 18 |
+
"max_window_layers": 70,
|
| 19 |
+
"model_type": "qwen2_5_vl",
|
| 20 |
+
"num_attention_heads": 16,
|
| 21 |
+
"num_hidden_layers": 36,
|
| 22 |
+
"num_key_value_heads": 2,
|
| 23 |
+
"rms_norm_eps": 1e-06,
|
| 24 |
+
"rope_theta": 1000000.0,
|
| 25 |
+
"sliding_window": 32768,
|
| 26 |
+
"tie_word_embeddings": true,
|
| 27 |
+
"torch_dtype": "bfloat16",
|
| 28 |
+
"transformers_version": "4.41.2",
|
| 29 |
+
"use_cache": true,
|
| 30 |
+
"use_sliding_window": false,
|
| 31 |
+
"vision_config": {
|
| 32 |
+
"depth": 32,
|
| 33 |
+
"hidden_act": "silu",
|
| 34 |
+
"hidden_size": 1280,
|
| 35 |
+
"intermediate_size": 3420,
|
| 36 |
+
"num_heads": 16,
|
| 37 |
+
"in_chans": 3,
|
| 38 |
+
"out_hidden_size": 2048,
|
| 39 |
+
"patch_size": 14,
|
| 40 |
+
"spatial_merge_size": 2,
|
| 41 |
+
"spatial_patch_size": 14,
|
| 42 |
+
"window_size": 112,
|
| 43 |
+
"fullatt_block_indexes": [
|
| 44 |
+
7,
|
| 45 |
+
15,
|
| 46 |
+
23,
|
| 47 |
+
31
|
| 48 |
+
],
|
| 49 |
+
"tokens_per_second": 2,
|
| 50 |
+
"temporal_patch_size": 2
|
| 51 |
+
},
|
| 52 |
+
"rope_scaling": {
|
| 53 |
+
"type": "mrope",
|
| 54 |
+
"mrope_section": [
|
| 55 |
+
16,
|
| 56 |
+
24,
|
| 57 |
+
24
|
| 58 |
+
]
|
| 59 |
+
},
|
| 60 |
+
"vocab_size": 151936
|
| 61 |
+
}
|
Lance_3B/merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
Lance_3B/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a2cfed3992486699aa550c1ea9b3519bd19dde475a0992daf2249f2486b268a3
|
| 3 |
+
size 12370547752
|
Lance_3B/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
Lance_3B/vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
Lance_3B_Video/generation_config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 151643,
|
| 3 |
+
"pad_token_id": 151643,
|
| 4 |
+
"do_sample": true,
|
| 5 |
+
"eos_token_id": [
|
| 6 |
+
151645,
|
| 7 |
+
151643
|
| 8 |
+
],
|
| 9 |
+
"repetition_penalty": 1.05,
|
| 10 |
+
"temperature": 0.000001,
|
| 11 |
+
"transformers_version": "4.49.0"
|
| 12 |
+
}
|
Lance_3B_Video/llm_config.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen2_5_VLForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"attention_dropout": 0.0,
|
| 6 |
+
"bos_token_id": 151643,
|
| 7 |
+
"eos_token_id": 151645,
|
| 8 |
+
"vision_start_token_id": 151652,
|
| 9 |
+
"vision_end_token_id": 151653,
|
| 10 |
+
"vision_token_id": 151654,
|
| 11 |
+
"image_token_id": 151655,
|
| 12 |
+
"video_token_id": 151656,
|
| 13 |
+
"hidden_act": "silu",
|
| 14 |
+
"hidden_size": 2048,
|
| 15 |
+
"initializer_range": 0.02,
|
| 16 |
+
"intermediate_size": 11008,
|
| 17 |
+
"max_position_embeddings": 128000,
|
| 18 |
+
"max_window_layers": 70,
|
| 19 |
+
"model_type": "qwen2_5_vl",
|
| 20 |
+
"num_attention_heads": 16,
|
| 21 |
+
"num_hidden_layers": 36,
|
| 22 |
+
"num_key_value_heads": 2,
|
| 23 |
+
"rms_norm_eps": 1e-06,
|
| 24 |
+
"rope_theta": 1000000.0,
|
| 25 |
+
"sliding_window": 32768,
|
| 26 |
+
"tie_word_embeddings": true,
|
| 27 |
+
"torch_dtype": "bfloat16",
|
| 28 |
+
"transformers_version": "4.41.2",
|
| 29 |
+
"use_cache": true,
|
| 30 |
+
"use_sliding_window": false,
|
| 31 |
+
"vision_config": {
|
| 32 |
+
"depth": 32,
|
| 33 |
+
"hidden_act": "silu",
|
| 34 |
+
"hidden_size": 1280,
|
| 35 |
+
"intermediate_size": 3420,
|
| 36 |
+
"num_heads": 16,
|
| 37 |
+
"in_chans": 3,
|
| 38 |
+
"out_hidden_size": 2048,
|
| 39 |
+
"patch_size": 14,
|
| 40 |
+
"spatial_merge_size": 2,
|
| 41 |
+
"spatial_patch_size": 14,
|
| 42 |
+
"window_size": 112,
|
| 43 |
+
"fullatt_block_indexes": [
|
| 44 |
+
7,
|
| 45 |
+
15,
|
| 46 |
+
23,
|
| 47 |
+
31
|
| 48 |
+
],
|
| 49 |
+
"tokens_per_second": 2,
|
| 50 |
+
"temporal_patch_size": 2
|
| 51 |
+
},
|
| 52 |
+
"rope_scaling": {
|
| 53 |
+
"type": "mrope",
|
| 54 |
+
"mrope_section": [
|
| 55 |
+
16,
|
| 56 |
+
24,
|
| 57 |
+
24
|
| 58 |
+
]
|
| 59 |
+
},
|
| 60 |
+
"vocab_size": 151936
|
| 61 |
+
}
|
Lance_3B_Video/merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
Lance_3B_Video/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7f0550e1d1511b29a4740a67c1e18e176302a4ecb3177c8a5850ff5fe6447c25
|
| 3 |
+
size 14211277144
|
Lance_3B_Video/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
Lance_3B_Video/tokenizer_config.json
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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 |
+
"added_tokens_decoder": {
|
| 4 |
+
"151643": {
|
| 5 |
+
"content": "<|endoftext|>",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": false,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"special": true
|
| 11 |
+
},
|
| 12 |
+
"151644": {
|
| 13 |
+
"content": "<|im_start|>",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": false,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false,
|
| 18 |
+
"special": true
|
| 19 |
+
},
|
| 20 |
+
"151645": {
|
| 21 |
+
"content": "<|im_end|>",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": false,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false,
|
| 26 |
+
"special": true
|
| 27 |
+
},
|
| 28 |
+
"151646": {
|
| 29 |
+
"content": "<|object_ref_start|>",
|
| 30 |
+
"lstrip": false,
|
| 31 |
+
"normalized": false,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"single_word": false,
|
| 34 |
+
"special": true
|
| 35 |
+
},
|
| 36 |
+
"151647": {
|
| 37 |
+
"content": "<|object_ref_end|>",
|
| 38 |
+
"lstrip": false,
|
| 39 |
+
"normalized": false,
|
| 40 |
+
"rstrip": false,
|
| 41 |
+
"single_word": false,
|
| 42 |
+
"special": true
|
| 43 |
+
},
|
| 44 |
+
"151648": {
|
| 45 |
+
"content": "<|box_start|>",
|
| 46 |
+
"lstrip": false,
|
| 47 |
+
"normalized": false,
|
| 48 |
+
"rstrip": false,
|
| 49 |
+
"single_word": false,
|
| 50 |
+
"special": true
|
| 51 |
+
},
|
| 52 |
+
"151649": {
|
| 53 |
+
"content": "<|box_end|>",
|
| 54 |
+
"lstrip": false,
|
| 55 |
+
"normalized": false,
|
| 56 |
+
"rstrip": false,
|
| 57 |
+
"single_word": false,
|
| 58 |
+
"special": true
|
| 59 |
+
},
|
| 60 |
+
"151650": {
|
| 61 |
+
"content": "<|quad_start|>",
|
| 62 |
+
"lstrip": false,
|
| 63 |
+
"normalized": false,
|
| 64 |
+
"rstrip": false,
|
| 65 |
+
"single_word": false,
|
| 66 |
+
"special": true
|
| 67 |
+
},
|
| 68 |
+
"151651": {
|
| 69 |
+
"content": "<|quad_end|>",
|
| 70 |
+
"lstrip": false,
|
| 71 |
+
"normalized": false,
|
| 72 |
+
"rstrip": false,
|
| 73 |
+
"single_word": false,
|
| 74 |
+
"special": true
|
| 75 |
+
},
|
| 76 |
+
"151652": {
|
| 77 |
+
"content": "<|vision_start|>",
|
| 78 |
+
"lstrip": false,
|
| 79 |
+
"normalized": false,
|
| 80 |
+
"rstrip": false,
|
| 81 |
+
"single_word": false,
|
| 82 |
+
"special": true
|
| 83 |
+
},
|
| 84 |
+
"151653": {
|
| 85 |
+
"content": "<|vision_end|>",
|
| 86 |
+
"lstrip": false,
|
| 87 |
+
"normalized": false,
|
| 88 |
+
"rstrip": false,
|
| 89 |
+
"single_word": false,
|
| 90 |
+
"special": true
|
| 91 |
+
},
|
| 92 |
+
"151654": {
|
| 93 |
+
"content": "<|vision_pad|>",
|
| 94 |
+
"lstrip": false,
|
| 95 |
+
"normalized": false,
|
| 96 |
+
"rstrip": false,
|
| 97 |
+
"single_word": false,
|
| 98 |
+
"special": true
|
| 99 |
+
},
|
| 100 |
+
"151655": {
|
| 101 |
+
"content": "<|image_pad|>",
|
| 102 |
+
"lstrip": false,
|
| 103 |
+
"normalized": false,
|
| 104 |
+
"rstrip": false,
|
| 105 |
+
"single_word": false,
|
| 106 |
+
"special": true
|
| 107 |
+
},
|
| 108 |
+
"151656": {
|
| 109 |
+
"content": "<|video_pad|>",
|
| 110 |
+
"lstrip": false,
|
| 111 |
+
"normalized": false,
|
| 112 |
+
"rstrip": false,
|
| 113 |
+
"single_word": false,
|
| 114 |
+
"special": true
|
| 115 |
+
},
|
| 116 |
+
"151657": {
|
| 117 |
+
"content": "<tool_call>",
|
| 118 |
+
"lstrip": false,
|
| 119 |
+
"normalized": false,
|
| 120 |
+
"rstrip": false,
|
| 121 |
+
"single_word": false,
|
| 122 |
+
"special": false
|
| 123 |
+
},
|
| 124 |
+
"151658": {
|
| 125 |
+
"content": "</tool_call>",
|
| 126 |
+
"lstrip": false,
|
| 127 |
+
"normalized": false,
|
| 128 |
+
"rstrip": false,
|
| 129 |
+
"single_word": false,
|
| 130 |
+
"special": false
|
| 131 |
+
},
|
| 132 |
+
"151659": {
|
| 133 |
+
"content": "<|fim_prefix|>",
|
| 134 |
+
"lstrip": false,
|
| 135 |
+
"normalized": false,
|
| 136 |
+
"rstrip": false,
|
| 137 |
+
"single_word": false,
|
| 138 |
+
"special": false
|
| 139 |
+
},
|
| 140 |
+
"151660": {
|
| 141 |
+
"content": "<|fim_middle|>",
|
| 142 |
+
"lstrip": false,
|
| 143 |
+
"normalized": false,
|
| 144 |
+
"rstrip": false,
|
| 145 |
+
"single_word": false,
|
| 146 |
+
"special": false
|
| 147 |
+
},
|
| 148 |
+
"151661": {
|
| 149 |
+
"content": "<|fim_suffix|>",
|
| 150 |
+
"lstrip": false,
|
| 151 |
+
"normalized": false,
|
| 152 |
+
"rstrip": false,
|
| 153 |
+
"single_word": false,
|
| 154 |
+
"special": false
|
| 155 |
+
},
|
| 156 |
+
"151662": {
|
| 157 |
+
"content": "<|fim_pad|>",
|
| 158 |
+
"lstrip": false,
|
| 159 |
+
"normalized": false,
|
| 160 |
+
"rstrip": false,
|
| 161 |
+
"single_word": false,
|
| 162 |
+
"special": false
|
| 163 |
+
},
|
| 164 |
+
"151663": {
|
| 165 |
+
"content": "<|repo_name|>",
|
| 166 |
+
"lstrip": false,
|
| 167 |
+
"normalized": false,
|
| 168 |
+
"rstrip": false,
|
| 169 |
+
"single_word": false,
|
| 170 |
+
"special": false
|
| 171 |
+
},
|
| 172 |
+
"151664": {
|
| 173 |
+
"content": "<|file_sep|>",
|
| 174 |
+
"lstrip": false,
|
| 175 |
+
"normalized": false,
|
| 176 |
+
"rstrip": false,
|
| 177 |
+
"single_word": false,
|
| 178 |
+
"special": false
|
| 179 |
+
}
|
| 180 |
+
},
|
| 181 |
+
"additional_special_tokens": [
|
| 182 |
+
"<|im_start|>",
|
| 183 |
+
"<|im_end|>",
|
| 184 |
+
"<|object_ref_start|>",
|
| 185 |
+
"<|object_ref_end|>",
|
| 186 |
+
"<|box_start|>",
|
| 187 |
+
"<|box_end|>",
|
| 188 |
+
"<|quad_start|>",
|
| 189 |
+
"<|quad_end|>",
|
| 190 |
+
"<|vision_start|>",
|
| 191 |
+
"<|vision_end|>",
|
| 192 |
+
"<|vision_pad|>",
|
| 193 |
+
"<|image_pad|>",
|
| 194 |
+
"<|video_pad|>"
|
| 195 |
+
],
|
| 196 |
+
"bos_token": null,
|
| 197 |
+
"chat_template": "{% set image_count = namespace(value=0) %}{% set video_count = namespace(value=0) %}{% for message in messages %}{% if loop.first and message['role'] != 'system' %}<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n{% endif %}<|im_start|>{{ message['role'] }}\n{% if message['content'] is string %}{{ message['content'] }}<|im_end|>\n{% else %}{% for content in message['content'] %}{% if content['type'] == 'image' or 'image' in content or 'image_url' in content %}{% set image_count.value = image_count.value + 1 %}{% if add_vision_id %}Picture {{ image_count.value }}: {% endif %}<|vision_start|><|image_pad|><|vision_end|>{% elif content['type'] == 'video' or 'video' in content %}{% set video_count.value = video_count.value + 1 %}{% if add_vision_id %}Video {{ video_count.value }}: {% endif %}<|vision_start|><|video_pad|><|vision_end|>{% elif 'text' in content %}{{ content['text'] }}{% endif %}{% endfor %}<|im_end|>\n{% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant\n{% endif %}",
|
| 198 |
+
"clean_up_tokenization_spaces": false,
|
| 199 |
+
"eos_token": "<|im_end|>",
|
| 200 |
+
"errors": "replace",
|
| 201 |
+
"model_max_length": 131072,
|
| 202 |
+
"pad_token": "<|endoftext|>",
|
| 203 |
+
"split_special_tokens": false,
|
| 204 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 205 |
+
"unk_token": null,
|
| 206 |
+
"add_bos_token": false
|
| 207 |
+
}
|
Lance_3B_Video/vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
Qwen2.5-VL-ViT/config.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_attn_implementation": "flash_attention_2",
|
| 3 |
+
"depth": 32,
|
| 4 |
+
"fullatt_block_indexes": [7, 15, 23, 31],
|
| 5 |
+
"hidden_act": "silu",
|
| 6 |
+
"hidden_size": 1280,
|
| 7 |
+
"in_channels": 3,
|
| 8 |
+
"in_chans": 3,
|
| 9 |
+
"intermediate_size": 3420,
|
| 10 |
+
"model_type": "qwen2_5_vl",
|
| 11 |
+
"num_heads": 16,
|
| 12 |
+
"out_hidden_size": 2048,
|
| 13 |
+
"patch_size": 14,
|
| 14 |
+
"spatial_merge_size": 2,
|
| 15 |
+
"spatial_patch_size": 14,
|
| 16 |
+
"temporal_patch_size": 2,
|
| 17 |
+
"tokens_per_second": 2,
|
| 18 |
+
"torch_dtype": "bfloat16",
|
| 19 |
+
"transformers_version": "4.49.0",
|
| 20 |
+
"window_size": 112
|
| 21 |
+
}
|
Qwen2.5-VL-ViT/vit.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:78714e560781576a00c030e60383db3c71698083d0c5d493dc628c10dc1a9094
|
| 3 |
+
size 1337407560
|
README.md
ADDED
|
@@ -0,0 +1,664 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 10 |
+
- video-generation
|
| 11 |
+
- image-editing
|
| 12 |
+
- video-understanding
|
| 13 |
+
- any-to-any
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
<div align="center">
|
| 17 |
+
<img src="assets/logo/lance-logo.webp" alt="Lance logo" width="450">
|
| 18 |
+
|
| 19 |
+
<h1 align="center">
|
| 20 |
+
Lance: Unified Multimodal Modeling by Multi-Task Synergy
|
| 21 |
+
</h1>
|
| 22 |
+
|
| 23 |
+
<p style="line-height: 1.5; margin: 0;">
|
| 24 |
+
<span>
|
| 25 |
+
<a href="https://scholar.google.com.hk/citations?user=FXxoQlsAAAAJ&hl=zh-CN&oi=ao" style="text-decoration: none; color: inherit; font-weight: 700 !important; display: inline;">Fengyi Fu</a><sup>*</sup>,
|
| 26 |
+
<a href="https://corleone-huang.github.io/" style="text-decoration: none; color: inherit; font-weight: 700 !important; display: inline;">Mengqi Huang</a><sup>*,✉</sup>,
|
| 27 |
+
<a href="https://scholar.google.com.hk/citations?user=9ER6nVkAAAAJ&hl=zh-CN&oi=ao" style="text-decoration: none; color: inherit; font-weight: 700 !important; display: inline;">Shaojin Wu</a><sup>*</sup>,
|
| 28 |
+
<span style="font-weight: 700 !important;">Yunsheng Jiang</span><sup>*</sup>,
|
| 29 |
+
<span style="font-weight: 700 !important;">Yufei Huo</span>,
|
| 30 |
+
<a href="https://guojianzhu.com/" style="text-decoration: none; color: inherit; font-weight: 700 !important; display: inline;">Jianzhu Guo</a><sup>✉,§</sup>
|
| 31 |
+
</span>
|
| 32 |
+
<br>
|
| 33 |
+
|
| 34 |
+
<span style="display: inline-block; margin-top: 0.4em;">
|
| 35 |
+
Hao Li,
|
| 36 |
+
Yinghang Song,
|
| 37 |
+
Fei Ding,
|
| 38 |
+
Qian He,
|
| 39 |
+
Zheren Fu,
|
| 40 |
+
Zhendong Mao,
|
| 41 |
+
Yongdong Zhang
|
| 42 |
+
</span>
|
| 43 |
+
<br>
|
| 44 |
+
<em>ByteDance</em>
|
| 45 |
+
<br>
|
| 46 |
+
<sup>*</sup> Equal contribution
|
| 47 |
+
<sup>✉</sup> Corresponding authors
|
| 48 |
+
<sup>§</sup> Project lead
|
| 49 |
+
</p>
|
| 50 |
+
<p>
|
| 51 |
+
<a href="https://lance-project.github.io/" style="text-decoration: none; margin: 0 8px;"><img src="https://img.shields.io/badge/Homepage-Lance-blue?style=flat" alt="Homepage"></a>
|
| 52 |
+
<a href="http://arxiv.org/abs/2605.18678" style="text-decoration: none; margin: 0 8px;"><img src="https://img.shields.io/badge/Paper-arXiv-red?style=flat&logo=arxiv" alt="arXiv"></a>
|
| 53 |
+
<a href="https://github.com/bytedance/Lance" style="text-decoration: none; margin: 0 8px;"><img src="https://img.shields.io/badge/Code-GitHub-536af5?color=536af5&logo=github" alt="GitHub"></a>
|
| 54 |
+
<a href="https://huggingface.co/spaces/bytedance-research/Lance" style="text-decoration: none; margin: 0 8px;"><img src="https://img.shields.io/badge/Demo-HuggingFace-40bfe6?style=flat&logo=huggingface" alt="Demo"></a>
|
| 55 |
+
<br>
|
| 56 |
+
English | <a href="./Lance/blob/main/README_zh.md"><ins>简体中文</ins></a>
|
| 57 |
+
</p>
|
| 58 |
+
</div>
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
> **Note:** Lance is a research project rather than a polished product model. The released checkpoint was trained with up to 128 A100 GPUs, with training conducted up to 768x768 image generation and 480p, 12 FPS video generation. Our goal is to share a research artifact for studying unified image/video understanding, generation, and editing under a relatively small model and limited compute budget. Output quality may vary across prompts, resolutions, duration, motion complexity, and editing scenarios, and we see further opportunities to improve the post-training recipe. We appreciate constructive feedback from the community as we continue improving the project.
|
| 62 |
+
|
| 63 |
+
## 🔥 Updates
|
| 64 |
+
|
| 65 |
+
- **`2026/05/26`**: 🎨 The Gradio interface now supports image and video generation, editing, and understanding. [Try it out](assets/docs/changelog/2026-05-26.md)!
|
| 66 |
+
- **`2026/05/25`**: ✨ The [Hugging Face Space](https://huggingface.co/spaces/bytedance-research/Lance) is now live, thanks to the HF team!
|
| 67 |
+
- **`2026/05/19`**: 🤗 The technical report is now available on [arXiv](http://arxiv.org/abs/2605.18678).
|
| 68 |
+
- **`2026/05/18`**: 🔥 We launched the [project homepage](https://lance-project.github.io/) and released the initial inference code and model weights on [GitHub](https://github.com/bytedance/Lance/) and [Hugging Face](https://huggingface.co/bytedance-research/Lance).
|
| 69 |
+
|
| 70 |
+
## 🌟 Highlights
|
| 71 |
+
|
| 72 |
+
**Lance** is a 3B native unified multimodal model that supports **image and video understanding, generation, and editing** within a single framework.
|
| 73 |
+
|
| 74 |
+
- **Efficient at 3B scale.** With only **3B active parameters**, Lance achieves competitive performance across image generation, image editing, and video generation benchmarks.
|
| 75 |
+
- **Training from scratch.** Lance is trained from scratch with a staged multi-task recipe and within a budget of **up to 128 A100 GPUs**.
|
| 76 |
+
|
| 77 |
+
We are actively updating and improving this repository. If you find any bugs or have suggestions, please feel free to open an issue or submit a pull request (PR) 💖.
|
| 78 |
+
|
| 79 |
+
<div align="center">
|
| 80 |
+
<img src="assets/benchmarks/benchmark-overview.png" alt="Lance benchmark overview across image generation, image editing, video generation, and video understanding" width="980">
|
| 81 |
+
</div>
|
| 82 |
+
|
| 83 |
+
## 📅 Roadmap
|
| 84 |
+
|
| 85 |
+
- [ ] Release the fine-tuning code.
|
| 86 |
+
- [ ] Add support for image-to-video generation code.
|
| 87 |
+
|
| 88 |
+
## 🎨 Demo
|
| 89 |
+
|
| 90 |
+
<details>
|
| 91 |
+
<summary><strong>Show demo results</strong></summary>
|
| 92 |
+
|
| 93 |
+
<div align="center">
|
| 94 |
+
<strong>🔥 We recommend visiting our <a href="https://lance-project.github.io/">homepage</a> for more visual results. 🔥</strong>
|
| 95 |
+
</div>
|
| 96 |
+
|
| 97 |
+
<h3 align="center">Text-to-Video</h3>
|
| 98 |
+
|
| 99 |
+
<table align="center">
|
| 100 |
+
<tr>
|
| 101 |
+
<td><a href="assets/text-to-video/videos/text-to-video-demo-01.mp4"><img src="assets/text-to-video/previews/text-to-video-demo-01.gif" width="100%"></a></td>
|
| 102 |
+
<td><a href="assets/text-to-video/videos/text-to-video-demo-02.mp4"><img src="assets/text-to-video/previews/text-to-video-demo-02.gif" width="100%"></a></td>
|
| 103 |
+
<td><a href="assets/text-to-video/videos/text-to-video-demo-03.mp4"><img src="assets/text-to-video/previews/text-to-video-demo-03.gif" width="100%"></a></td>
|
| 104 |
+
<td><a href="assets/text-to-video/videos/text-to-video-demo-04.mp4"><img src="assets/text-to-video/previews/text-to-video-demo-04.gif" width="100%"></a></td>
|
| 105 |
+
</tr>
|
| 106 |
+
<tr>
|
| 107 |
+
<td><a href="assets/text-to-video/videos/text-to-video-demo-05.mp4"><img src="assets/text-to-video/previews/text-to-video-demo-05.gif" width="100%"></a></td>
|
| 108 |
+
<td><a href="assets/text-to-video/videos/text-to-video-demo-06.mp4"><img src="assets/text-to-video/previews/text-to-video-demo-06.gif" width="100%"></a></td>
|
| 109 |
+
<td><a href="assets/text-to-video/videos/text-to-video-demo-07.mp4"><img src="assets/text-to-video/previews/text-to-video-demo-07.gif" width="100%"></a></td>
|
| 110 |
+
<td><a href="assets/text-to-video/videos/text-to-video-demo-08.mp4"><img src="assets/text-to-video/previews/text-to-video-demo-08.gif" width="100%"></a></td>
|
| 111 |
+
</tr>
|
| 112 |
+
</table>
|
| 113 |
+
|
| 114 |
+
<h3 align="center">Video Editing</h3>
|
| 115 |
+
|
| 116 |
+
<table align="center">
|
| 117 |
+
<tr>
|
| 118 |
+
<td><a href="assets/video-editing/videos/video-editing-demo-01.mp4"><img src="assets/video-editing/previews/video-editing-demo-01.gif" width="100%"></a></td>
|
| 119 |
+
<td><a href="assets/video-editing/videos/video-editing-demo-02.mp4"><img src="assets/video-editing/previews/video-editing-demo-02.gif" width="100%"></a></td>
|
| 120 |
+
<td><a href="assets/video-editing/videos/video-editing-demo-03.mp4"><img src="assets/video-editing/previews/video-editing-demo-03.gif" width="100%"></a></td>
|
| 121 |
+
<td><a href="assets/video-editing/videos/video-editing-demo-04.mp4"><img src="assets/video-editing/previews/video-editing-demo-04.gif" width="100%"></a></td>
|
| 122 |
+
</tr>
|
| 123 |
+
<tr>
|
| 124 |
+
<td><a href="assets/video-editing/videos/video-editing-demo-05.mp4"><img src="assets/video-editing/previews/video-editing-demo-05.gif" width="100%"></a></td>
|
| 125 |
+
<td><a href="assets/video-editing/videos/video-editing-demo-06.mp4"><img src="assets/video-editing/previews/video-editing-demo-06.gif" width="100%"></a></td>
|
| 126 |
+
<td><a href="assets/video-editing/videos/video-editing-demo-07.mp4"><img src="assets/video-editing/previews/video-editing-demo-07.gif" width="100%"></a></td>
|
| 127 |
+
<td><a href="assets/video-editing/videos/video-editing-demo-08.mp4"><img src="assets/video-editing/previews/video-editing-demo-08.gif" width="100%"></a></td>
|
| 128 |
+
</tr>
|
| 129 |
+
</table>
|
| 130 |
+
|
| 131 |
+
<h3 align="center">Multi-turn Consistency Editing</h3>
|
| 132 |
+
|
| 133 |
+
<div align="center">
|
| 134 |
+
<a href="assets/multi-turn-editing/videos/multi-turn-editing-demo-01.mp4">
|
| 135 |
+
<img src="assets/multi-turn-editing/previews/multi-turn-editing-demo-01.gif" width="100%">
|
| 136 |
+
</a>
|
| 137 |
+
</div>
|
| 138 |
+
|
| 139 |
+
<h3 align="center">Intelligent Video Generation</h3>
|
| 140 |
+
|
| 141 |
+
<table align="center">
|
| 142 |
+
<tr>
|
| 143 |
+
<td><a href="assets/intelligent-video/videos/intelligent-video-demo-01.mp4"><img src="assets/intelligent-video/previews/intelligent-video-demo-01.gif" width="100%"></a></td>
|
| 144 |
+
<td><a href="assets/intelligent-video/videos/intelligent-video-demo-02.mp4"><img src="assets/intelligent-video/previews/intelligent-video-demo-02.gif" width="100%"></a></td>
|
| 145 |
+
<td><a href="assets/intelligent-video/videos/intelligent-video-demo-03.mp4"><img src="assets/intelligent-video/previews/intelligent-video-demo-03.gif" width="100%"></a></td>
|
| 146 |
+
<td><a href="assets/intelligent-video/videos/intelligent-video-demo-04.mp4"><img src="assets/intelligent-video/previews/intelligent-video-demo-04.gif" width="100%"></a></td>
|
| 147 |
+
</tr>
|
| 148 |
+
</table>
|
| 149 |
+
|
| 150 |
+
</details>
|
| 151 |
+
|
| 152 |
+
## 🚀 Installation
|
| 153 |
+
|
| 154 |
+
### Recommended Environment
|
| 155 |
+
|
| 156 |
+
- **Software:** Python 3.10+, CUDA 12.4+ (required)
|
| 157 |
+
- **Hardware:** A GPU with at least 40GB VRAM is required for inference
|
| 158 |
+
|
| 159 |
+
We have tested the following dependency combinations on NVIDIA A100:
|
| 160 |
+
|
| 161 |
+
- PyTorch 2.8.0 + cu126 + flash-attn 2.8.3
|
| 162 |
+
- PyTorch 2.5.1 + cu124 + flash-attn 2.6.3
|
| 163 |
+
|
| 164 |
+
The default installation commands use the PyTorch 2.8.0 + cu126 setup. For other GPU models, please choose and validate a PyTorch build and a matching `flash-attn` version according to your driver, CUDA runtime, Python version, and GPU architecture.
|
| 165 |
+
|
| 166 |
+
### Installation Steps
|
| 167 |
+
|
| 168 |
+
First, clone the repository:
|
| 169 |
+
|
| 170 |
+
```bash
|
| 171 |
+
git clone https://github.com/bytedance/Lance.git
|
| 172 |
+
cd Lance
|
| 173 |
+
```
|
| 174 |
+
|
| 175 |
+
Then, set up the environment:
|
| 176 |
+
|
| 177 |
+
```bash
|
| 178 |
+
conda create -n Lance python=3.11 -y
|
| 179 |
+
conda activate Lance
|
| 180 |
+
pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu126
|
| 181 |
+
pip install -r requirements.txt
|
| 182 |
+
pip install flash-attn==2.8.3 --no-build-isolation
|
| 183 |
+
```
|
| 184 |
+
|
| 185 |
+
> **Note:** If installing `flash-attn` from source fails, you can install a prebuilt wheel instead. The wheelhouse below is from a third-party repository and is provided for **reference only**; please verify that any wheel you install matches your Python, PyTorch and CUDA versions.
|
| 186 |
+
|
| 187 |
+
> ```bash
|
| 188 |
+
> pip install --no-cache-dir --no-deps --force-reinstall \
|
| 189 |
+
> "https://huggingface.co/strangertoolshf/flash_attention_2_wheelhouse/resolve/main/wheelhouse-flash_attn-2.8.3/linux_x86_64/torch2.8/cu12/abiTRUE/cp311/flash_attn-2.8.3+cu12torch2.8cxx11abiTRUE-cp311-cp311-linux_x86_64.whl"
|
| 190 |
+
> ```
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
Then, download the model weights from [Lance-3B on Hugging Face](https://huggingface.co/bytedance-research/Lance) and place them in the `downloads/` directory:
|
| 194 |
+
|
| 195 |
+
```bash
|
| 196 |
+
from huggingface_hub import snapshot_download
|
| 197 |
+
|
| 198 |
+
save_dir = "./downloads/"
|
| 199 |
+
repo_id = "bytedance-research/Lance"
|
| 200 |
+
cache_dir = save_dir + "/cache"
|
| 201 |
+
|
| 202 |
+
snapshot_download(cache_dir=cache_dir,
|
| 203 |
+
local_dir=save_dir,
|
| 204 |
+
repo_id=repo_id,
|
| 205 |
+
local_dir_use_symlinks=False,
|
| 206 |
+
resume_download=True,
|
| 207 |
+
allow_patterns=["*.json", "*.safetensors", "*.bin", "*.py", "*.md", "*.txt","*.pth",],
|
| 208 |
+
)
|
| 209 |
+
```
|
| 210 |
+
|
| 211 |
+
|
| 212 |
+
## 📚 Usage
|
| 213 |
+
|
| 214 |
+
### Inference
|
| 215 |
+
|
| 216 |
+
#### Basic Usage
|
| 217 |
+
|
| 218 |
+
```bash
|
| 219 |
+
bash inference_lance.sh
|
| 220 |
+
```
|
| 221 |
+
|
| 222 |
+
- Before running, please configure the inference parameters at the top of `inference_lance.sh`.
|
| 223 |
+
- **Supported tasks:** `t2i`, `t2v`, `image_edit`, `video_edit`, `x2t_image`, and `x2t_video`. You can modify `TASK_DEFAULT_CONFIGS` in `inference_lance.py` to customize the default data samples for each task.
|
| 224 |
+
- **Note:** For all tasks, we recommend following the `prompt` format used in the provided examples when writing input prompts, as this typically leads to better generation quality.
|
| 225 |
+
|
| 226 |
+
#### Task Examples
|
| 227 |
+
|
| 228 |
+
##### Text-to-Video
|
| 229 |
+
|
| 230 |
+
```bash
|
| 231 |
+
bash inference_lance.sh \
|
| 232 |
+
--TASK_NAME t2v \
|
| 233 |
+
--MODEL_PATH downloads/Lance_3B_Video \
|
| 234 |
+
--RESOLUTION video_480p \
|
| 235 |
+
--NUM_FRAMES 121 \
|
| 236 |
+
--VIDEO_HEIGHT 480 \
|
| 237 |
+
--VIDEO_WIDTH 848 \
|
| 238 |
+
--SAVE_PATH_GEN results/t2v
|
| 239 |
+
```
|
| 240 |
+
|
| 241 |
+
##### Text-to-Image
|
| 242 |
+
|
| 243 |
+
```bash
|
| 244 |
+
bash inference_lance.sh \
|
| 245 |
+
--TASK_NAME t2i \
|
| 246 |
+
--MODEL_PATH downloads/Lance_3B \
|
| 247 |
+
--RESOLUTION image_768res \
|
| 248 |
+
--VIDEO_HEIGHT 768 \
|
| 249 |
+
--VIDEO_WIDTH 768 \
|
| 250 |
+
--SAVE_PATH_GEN results/t2i
|
| 251 |
+
```
|
| 252 |
+
|
| 253 |
+
##### Video Editing
|
| 254 |
+
|
| 255 |
+
```bash
|
| 256 |
+
bash inference_lance.sh \
|
| 257 |
+
--TASK_NAME video_edit \
|
| 258 |
+
--MODEL_PATH downloads/Lance_3B_Video \
|
| 259 |
+
--RESOLUTION video_480p \
|
| 260 |
+
--SAVE_PATH_GEN results/video_edit
|
| 261 |
+
```
|
| 262 |
+
|
| 263 |
+
##### Image Editing
|
| 264 |
+
|
| 265 |
+
```bash
|
| 266 |
+
bash inference_lance.sh \
|
| 267 |
+
--TASK_NAME image_edit \
|
| 268 |
+
--MODEL_PATH downloads/Lance_3B \
|
| 269 |
+
--RESOLUTION image_768res \
|
| 270 |
+
--SAVE_PATH_GEN results/image_edit
|
| 271 |
+
```
|
| 272 |
+
|
| 273 |
+
##### Video Understanding
|
| 274 |
+
|
| 275 |
+
```bash
|
| 276 |
+
bash inference_lance.sh \
|
| 277 |
+
--TASK_NAME x2t_video \
|
| 278 |
+
--MODEL_PATH downloads/Lance_3B_Video \
|
| 279 |
+
--RESOLUTION video_480p \
|
| 280 |
+
--NUM_FRAMES 50 \
|
| 281 |
+
--SAVE_PATH_GEN results/x2t_video
|
| 282 |
+
```
|
| 283 |
+
|
| 284 |
+
##### Image Understanding
|
| 285 |
+
|
| 286 |
+
```bash
|
| 287 |
+
bash inference_lance.sh \
|
| 288 |
+
--TASK_NAME x2t_image \
|
| 289 |
+
--MODEL_PATH downloads/Lance_3B \
|
| 290 |
+
--RESOLUTION image_768res \
|
| 291 |
+
--SAVE_PATH_GEN results/x2t_image
|
| 292 |
+
```
|
| 293 |
+
|
| 294 |
+
<details>
|
| 295 |
+
<summary><strong>Show task and parameter reference</strong></summary>
|
| 296 |
+
|
| 297 |
+
#### Available Tasks
|
| 298 |
+
|
| 299 |
+
| Task Name | Description | Example JSON |
|
| 300 |
+
|------------------------|--------------------------------------------------|----------------------------------------------|
|
| 301 |
+
| `t2v` | Text-to-Video generation | `config/examples/t2v_example.json` |
|
| 302 |
+
| `t2i` | Text-to-Image generation | `config/examples/t2i_example.json` |
|
| 303 |
+
| `image_edit` | Image editing | `config/examples/image_edit_example.json` |
|
| 304 |
+
| `video_edit` | Video editing | `config/examples/video_edit_example.json` |
|
| 305 |
+
| `x2t_image` | Image understanding | `config/examples/x2t_image_example.json` |
|
| 306 |
+
| `x2t_video` | Video understanding | `config/examples/x2t_video_example.json` |
|
| 307 |
+
|
| 308 |
+
For understanding examples:
|
| 309 |
+
|
| 310 |
+
- `config/examples/x2t_image_example.json`: image understanding examples for visual question answering and image-based reasoning.
|
| 311 |
+
- `config/examples/x2t_video_example.json`: video understanding examples for video question answering and video captioning.
|
| 312 |
+
|
| 313 |
+
#### Parameters
|
| 314 |
+
|
| 315 |
+
You can configure the following hyperparameters at the top of the `inference_lance.sh` script:
|
| 316 |
+
|
| 317 |
+
| Parameter | Default Value | Description |
|
| 318 |
+
| --- | --- | --- |
|
| 319 |
+
| `MODEL_PATH` | `"downloads/Lance_3B"` | Path to the downloaded Lance model weights (`Lance_3B` or `Lance_3B_Video`). |
|
| 320 |
+
| `NUM_GPUS` | `1` | Number of GPUs to use for inference. |
|
| 321 |
+
| `VALIDATION_NUM_TIMESTEPS` | `30` | Number of denoising steps (e.g., 30 or 50). |
|
| 322 |
+
| `VALIDATION_TIMESTEP_SHIFT` | `3.5` | Timestep shift parameter for flow matching scheduling. |
|
| 323 |
+
| `CFG_TEXT_SCALE` | `4.0` | Classifier-Free Guidance (CFG) scale for text conditioning. |
|
| 324 |
+
| `VALIDATION_DATA_SEED` | `42` | Random seed for generation reproducibility. |
|
| 325 |
+
| `NUM_FRAMES` | `50` | Number of frames for video generation (Max: 121). *Unused for image tasks.* |
|
| 326 |
+
| `VIDEO_HEIGHT` / `VIDEO_WIDTH`| `768` | Spatial resolution. *Unused for editing tasks (determined by input image/video).* |
|
| 327 |
+
| `RESOLUTION` | `"video_480p"` | Base resolution preset (`image_768res` or `video_480p`). |
|
| 328 |
+
|
| 329 |
+
</details>
|
| 330 |
+
|
| 331 |
+
### 🖥️ Gradio
|
| 332 |
+
|
| 333 |
+
You can launch the local Gradio demo for video/image generation, editing, and understanding:
|
| 334 |
+
|
| 335 |
+
```bash
|
| 336 |
+
python lance_gradio.py --server-name 0.0.0.0 --server-port 7860
|
| 337 |
+
```
|
| 338 |
+
|
| 339 |
+
### Benchmarks
|
| 340 |
+
|
| 341 |
+
<details>
|
| 342 |
+
<summary><strong>DPG-Bench Evaluation</strong></summary>
|
| 343 |
+
|
| 344 |
+
<div align="center">
|
| 345 |
+
<table align="center">
|
| 346 |
+
<thead>
|
| 347 |
+
<tr>
|
| 348 |
+
<th align="left">Models</th>
|
| 349 |
+
<th align="center"># Params.</th>
|
| 350 |
+
<th align="center">Global</th>
|
| 351 |
+
<th align="center">Entity</th>
|
| 352 |
+
<th align="center">Attribute</th>
|
| 353 |
+
<th align="center">Relation</th>
|
| 354 |
+
<th align="center">Other</th>
|
| 355 |
+
<th align="center">Overall</th>
|
| 356 |
+
</tr>
|
| 357 |
+
</thead>
|
| 358 |
+
<tbody>
|
| 359 |
+
<tr>
|
| 360 |
+
<td align="center" colspan="8"><i>Generation-only Models</i></td>
|
| 361 |
+
</tr>
|
| 362 |
+
<tr>
|
| 363 |
+
<td align="left">SDXL</td><td align="center">3.5B</td><td align="center">83.27</td><td align="center">82.43</td><td align="center">80.91</td><td align="center">86.76</td><td align="center">80.41</td><td align="center">74.65</td>
|
| 364 |
+
</tr>
|
| 365 |
+
<tr>
|
| 366 |
+
<td align="left">DALL-E 3</td><td align="center">-</td><td align="center">90.97</td><td align="center">89.61</td><td align="center">88.39</td><td align="center">90.58</td><td align="center">89.83</td><td align="center">83.50</td>
|
| 367 |
+
</tr>
|
| 368 |
+
<tr>
|
| 369 |
+
<td align="left">SD3-Medium</td><td align="center">2B</td><td align="center">87.90</td><td align="center">91.01</td><td align="center">88.83</td><td align="center">80.70</td><td align="center">88.68</td><td align="center">84.08</td>
|
| 370 |
+
</tr>
|
| 371 |
+
<tr>
|
| 372 |
+
<td align="left">FLUX.1-dev</td><td align="center">12B</td><td align="center">74.35</td><td align="center">90.00</td><td align="center">88.96</td><td align="center">90.87</td><td align="center">88.33</td><td align="center">83.84</td>
|
| 373 |
+
</tr>
|
| 374 |
+
<tr>
|
| 375 |
+
<td align="left">Qwen-Image</td><td align="center">20B</td><td align="center">91.32</td><td align="center">91.56</td><td align="center">92.02</td><td align="center">94.31</td><td align="center">92.73</td><td align="center">88.32</td>
|
| 376 |
+
</tr>
|
| 377 |
+
<tr>
|
| 378 |
+
<td align="center" colspan="8"><i>Unified Models</i></td>
|
| 379 |
+
</tr>
|
| 380 |
+
<tr>
|
| 381 |
+
<td align="left">Janus-Pro-7B</td><td align="center">7B</td><td align="center">86.90</td><td align="center">88.90</td><td align="center">89.40</td><td align="center">89.32</td><td align="center">89.48</td><td align="center">84.19</td>
|
| 382 |
+
</tr>
|
| 383 |
+
<tr>
|
| 384 |
+
<td align="left">OmniGen2</td><td align="center">4B</td><td align="center">88.81</td><td align="center">88.83</td><td align="center">90.18</td><td align="center">89.37</td><td align="center">90.27</td><td align="center">83.57</td>
|
| 385 |
+
</tr>
|
| 386 |
+
<tr>
|
| 387 |
+
<td align="left">Show-o2</td><td align="center">7B</td><td align="center">89.00</td><td align="center"><b>91.78</b></td><td align="center">89.96</td><td align="center">91.81</td><td align="center"><b>91.64</b></td><td align="center">86.14</td>
|
| 388 |
+
</tr>
|
| 389 |
+
<tr>
|
| 390 |
+
<td align="left">BAGEL<sup>†</sup></td><td align="center">7B</td><td align="center">88.94</td><td align="center">90.37</td><td align="center"><u>91.29</u></td><td align="center">90.82</td><td align="center">88.67</td><td align="center">85.07</td>
|
| 391 |
+
</tr>
|
| 392 |
+
<tr>
|
| 393 |
+
<td align="left">InternVL-U</td><td align="center">1.7B</td><td align="center"><u>90.39</u></td><td align="center">90.78</td><td align="center">90.68</td><td align="center">90.29</td><td align="center">88.77</td><td align="center">85.18</td>
|
| 394 |
+
</tr>
|
| 395 |
+
<tr>
|
| 396 |
+
<td align="left">TUNA</td><td align="center">7B</td><td align="center"><b>90.42</b></td><td align="center"><u>91.68</u></td><td align="center">90.94</td><td align="center"><u>91.87</u></td><td align="center"><u>90.73</u></td><td align="center"><b>86.76</b></td>
|
| 397 |
+
</tr>
|
| 398 |
+
<tr>
|
| 399 |
+
<td align="left">TUNA-2</td><td align="center">7B</td><td align="center">89.50</td><td align="center">91.40</td><td align="center"><b>92.07</b></td><td align="center">91.91</td><td align="center">88.81</td><td align="center"><u>86.54</u></td>
|
| 400 |
+
</tr>
|
| 401 |
+
<tr>
|
| 402 |
+
<td align="left">🌟 <b>Lance (Ours)</b></td><td align="center"><b>3B</b></td><td align="center"><b>83.89</b></td><td align="center"><b>91.07</b></td><td align="center"><b>89.36</b></td><td align="center"><b>93.38</b></td><td align="center"><b>80.80</b></td><td align="center"><b>84.67</b></td>
|
| 403 |
+
</tr>
|
| 404 |
+
</tbody>
|
| 405 |
+
</table>
|
| 406 |
+
</div>
|
| 407 |
+
|
| 408 |
+
<p align="center"><em><sup>†</sup> indicates methods that use LLM rewriters for prompt rewriting before generation.</em></p>
|
| 409 |
+
|
| 410 |
+
</details>
|
| 411 |
+
|
| 412 |
+
<details>
|
| 413 |
+
<summary><strong>GenEval Evaluation</strong></summary>
|
| 414 |
+
|
| 415 |
+
<div align="center">
|
| 416 |
+
<table align="center">
|
| 417 |
+
<thead>
|
| 418 |
+
<tr>
|
| 419 |
+
<th align="left">Models</th>
|
| 420 |
+
<th align="center"># Params.</th>
|
| 421 |
+
<th align="center">1-Obj.</th>
|
| 422 |
+
<th align="center">2-Obj.</th>
|
| 423 |
+
<th align="center">Count</th>
|
| 424 |
+
<th align="center">Colors</th>
|
| 425 |
+
<th align="center">Position</th>
|
| 426 |
+
<th align="center">Attr.</th>
|
| 427 |
+
<th align="center">Overall</th>
|
| 428 |
+
</tr>
|
| 429 |
+
</thead>
|
| 430 |
+
<tbody>
|
| 431 |
+
<tr>
|
| 432 |
+
<td align="center" colspan="9"><i>Generation-only Models</i></td>
|
| 433 |
+
</tr>
|
| 434 |
+
<tr>
|
| 435 |
+
<td align="left">SDXL</td><td align="center">3.5B</td><td align="center">0.98</td><td align="center">0.74</td><td align="center">0.39</td><td align="center">0.85</td><td align="center">0.15</td><td align="center">0.23</td><td align="center">0.55</td>
|
| 436 |
+
</tr>
|
| 437 |
+
<tr>
|
| 438 |
+
<td align="left">DALL-E 3</td><td align="center">-</td><td align="center">0.96</td><td align="center">0.87</td><td align="center">0.47</td><td align="center">0.83</td><td align="center">0.43</td><td align="center">0.45</td><td align="center">0.67</td>
|
| 439 |
+
</tr>
|
| 440 |
+
<tr>
|
| 441 |
+
<td align="left">SD3-Medium</td><td align="center">2B</td><td align="center">0.99</td><td align="center">0.94</td><td align="center">0.72</td><td align="center">0.89</td><td align="center">0.33</td><td align="center">0.60</td><td align="center">0.74</td>
|
| 442 |
+
</tr>
|
| 443 |
+
<tr>
|
| 444 |
+
<td align="left">FLUX.1-dev</td><td align="center">12B</td><td align="center">0.98</td><td align="center">0.93</td><td align="center">0.75</td><td align="center">0.93</td><td align="center">0.68</td><td align="center">0.65</td><td align="center">0.82</td>
|
| 445 |
+
</tr>
|
| 446 |
+
<tr>
|
| 447 |
+
<td align="left">Qwen-Image</td><td align="center">20B</td><td align="center">0.99</td><td align="center">0.92</td><td align="center">0.89</td><td align="center">0.88</td><td align="center">0.76</td><td align="center">0.77</td><td align="center">0.87</td>
|
| 448 |
+
</tr>
|
| 449 |
+
<tr>
|
| 450 |
+
<td align="center" colspan="9"><i>Unified Models</i></td>
|
| 451 |
+
</tr>
|
| 452 |
+
<tr>
|
| 453 |
+
<td align="left">Janus-Pro-7B</td><td align="center">7B</td><td align="center"><u>0.99</u></td><td align="center">0.89</td><td align="center">0.59</td><td align="center">0.90</td><td align="center">0.79</td><td align="center">0.66</td><td align="center">0.80</td>
|
| 454 |
+
</tr>
|
| 455 |
+
<tr>
|
| 456 |
+
<td align="left">OmniGen2</td><td align="center">4B</td><td align="center"><b>1.00</b></td><td align="center">0.95</td><td align="center">0.64</td><td align="center">0.88</td><td align="center">0.55</td><td align="center">0.76</td><td align="center">0.80</td>
|
| 457 |
+
</tr>
|
| 458 |
+
<tr>
|
| 459 |
+
<td align="left">Show-o2</td><td align="center">7B</td><td align="center"><b>1.00</b></td><td align="center">0.87</td><td align="center">0.58</td><td align="center">0.92</td><td align="center">0.52</td><td align="center">0.62</td><td align="center">0.76</td>
|
| 460 |
+
</tr>
|
| 461 |
+
<tr>
|
| 462 |
+
<td align="left">BAGEL<sup>†</sup></td><td align="center">7B</td><td align="center">0.98</td><td align="center">0.95</td><td align="center"><b>0.84</b></td><td align="center"><u>0.95</u></td><td align="center">0.78</td><td align="center">0.77</td><td align="center">0.88</td>
|
| 463 |
+
</tr>
|
| 464 |
+
<tr>
|
| 465 |
+
<td align="left">Mogao</td><td align="center">7B</td><td align="center"><b>1.00</b></td><td align="center"><b>0.97</b></td><td align="center"><u>0.83</u></td><td align="center">0.93</td><td align="center">0.84</td><td align="center">0.80</td><td align="center"><u>0.89</u></td>
|
| 466 |
+
</tr>
|
| 467 |
+
<tr>
|
| 468 |
+
<td align="left">InternVL-U</td><td align="center">1.7B</td><td align="center"><u>0.99</u></td><td align="center">0.94</td><td align="center">0.74</td><td align="center">0.91</td><td align="center">0.77</td><td align="center">0.74</td><td align="center">0.85</td>
|
| 469 |
+
</tr>
|
| 470 |
+
<tr>
|
| 471 |
+
<td align="left">TUNA</td><td align="center">7B</td><td align="center"><b>1.00</b></td><td align="center"><b>0.97</b></td><td align="center">0.81</td><td align="center">0.91</td><td align="center"><b>0.88</b></td><td align="center"><b>0.83</b></td><td align="center"><b>0.90</b></td>
|
| 472 |
+
</tr>
|
| 473 |
+
<tr>
|
| 474 |
+
<td align="left">TUNA-2</td><td align="center">7B</td><td align="center"><u>0.99</u></td><td align="center"><u>0.96</u></td><td align="center">0.80</td><td align="center">0.91</td><td align="center">0.84</td><td align="center">0.76</td><td align="center">0.87</td>
|
| 475 |
+
</tr>
|
| 476 |
+
<tr>
|
| 477 |
+
<td align="left">🌟 <b>Lance (Ours)</b></td><td align="center"><b>3B</b></td><td align="center"><b>1.00</b></td><td align="center"><b>0.94</b></td><td align="center"><b>0.84</b></td><td align="center"><b>0.97</b></td><td align="center"><b>0.87</b></td><td align="center"><b>0.81</b></td><td align="center"><b>0.90</b></td>
|
| 478 |
+
</tr>
|
| 479 |
+
</tbody>
|
| 480 |
+
</table>
|
| 481 |
+
</div>
|
| 482 |
+
|
| 483 |
+
<p align="center"><em><sup>†</sup> indicates methods that use LLM rewriters for prompt rewriting before generation.</em></p>
|
| 484 |
+
|
| 485 |
+
</details>
|
| 486 |
+
|
| 487 |
+
<details>
|
| 488 |
+
<summary><strong>GEdit-Bench Evaluation</strong></summary>
|
| 489 |
+
|
| 490 |
+
<div align="center">
|
| 491 |
+
<table align="center">
|
| 492 |
+
<thead>
|
| 493 |
+
<tr>
|
| 494 |
+
<th align="left">Models</th>
|
| 495 |
+
<th align="center"># Params.</th>
|
| 496 |
+
<th align="center">BC</th>
|
| 497 |
+
<th align="center">CA</th>
|
| 498 |
+
<th align="center">MM</th>
|
| 499 |
+
<th align="center">MC</th>
|
| 500 |
+
<th align="center">PB</th>
|
| 501 |
+
<th align="center">ST</th>
|
| 502 |
+
<th align="center">SA</th>
|
| 503 |
+
<th align="center">SR</th>
|
| 504 |
+
<th align="center">SRp</th>
|
| 505 |
+
<th align="center">TM</th>
|
| 506 |
+
<th align="center">TT</th>
|
| 507 |
+
<th align="center">Avg/G_O</th>
|
| 508 |
+
</tr>
|
| 509 |
+
</thead>
|
| 510 |
+
<tbody>
|
| 511 |
+
<tr>
|
| 512 |
+
<td align="center" colspan="14"><i>Generation-only Models</i></td>
|
| 513 |
+
</tr>
|
| 514 |
+
<tr>
|
| 515 |
+
<td align="left">Gemini 2.0</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">6.32</td>
|
| 516 |
+
</tr>
|
| 517 |
+
<tr>
|
| 518 |
+
<td align="left">GPT Image 1</td><td align="center">-</td><td align="center">6.96</td><td align="center">6.85</td><td align="center">7.10</td><td align="center">5.41</td><td align="center">6.74</td><td align="center">7.44</td><td align="center">7.51</td><td align="center">8.73</td><td align="center">8.55</td><td align="center">8.45</td><td align="center">8.69</td><td align="center">7.49</td>
|
| 519 |
+
</tr>
|
| 520 |
+
<tr>
|
| 521 |
+
<td align="left">Qwen-Image-Edit</td><td align="center">20B</td><td align="center">8.23</td><td align="center">8.30</td><td align="center">7.33</td><td align="center">8.05</td><td align="center">7.49</td><td align="center">6.74</td><td align="center">8.57</td><td align="center">8.09</td><td align="center">8.29</td><td align="center">8.48</td><td align="center">8.50</td><td align="center">8.01</td>
|
| 522 |
+
</tr>
|
| 523 |
+
<tr>
|
| 524 |
+
<td align="center" colspan="14"><i>Unified Models</i></td>
|
| 525 |
+
</tr>
|
| 526 |
+
<tr>
|
| 527 |
+
<td align="left">Lumina-DiMOO</td><td align="center">8B</td><td align="center">3.43</td><td align="center">4.27</td><td align="center">3.08</td><td align="center">2.77</td><td align="center">4.74</td><td align="center">5.19</td><td align="center">4.44</td><td align="center">3.80</td><td align="center">4.38</td><td align="center">2.68</td><td align="center">4.20</td><td align="center">3.91</td>
|
| 528 |
+
</tr>
|
| 529 |
+
<tr>
|
| 530 |
+
<td align="left">Ovis-U1</td><td align="center">1.2B</td><td align="center"><u>7.49</u></td><td align="center">6.88</td><td align="center">6.21</td><td align="center">4.79</td><td align="center">5.98</td><td align="center"><u>6.46</u></td><td align="center">7.49</td><td align="center"><u>7.25</u></td><td align="center"><u>7.27</u></td><td align="center">4.48</td><td align="center">6.31</td><td align="center">6.42</td>
|
| 531 |
+
</tr>
|
| 532 |
+
<tr>
|
| 533 |
+
<td align="left">BAGEL</td><td align="center">7B</td><td align="center">7.32</td><td align="center">6.91</td><td align="center">6.38</td><td align="center">4.75</td><td align="center">4.57</td><td align="center">6.15</td><td align="center"><b>7.90</b></td><td align="center">7.16</td><td align="center">7.02</td><td align="center"><u>7.32</u></td><td align="center">6.22</td><td align="center">6.52</td>
|
| 534 |
+
</tr>
|
| 535 |
+
<tr>
|
| 536 |
+
<td align="left">InternVL-U</td><td align="center">1.7B</td><td align="center">7.08</td><td align="center">7.05</td><td align="center">6.38</td><td align="center"><u>7.02</u></td><td align="center"><u>6.03</u></td><td align="center">6.27</td><td align="center">7.13</td><td align="center">6.55</td><td align="center">6.33</td><td align="center">6.59</td><td align="center"><u>6.85</u></td><td align="center">6.66</td>
|
| 537 |
+
</tr>
|
| 538 |
+
<tr>
|
| 539 |
+
<td align="left">InternVL-U (w/ CoT)</td><td align="center">1.7B</td><td align="center">7.05</td><td align="center"><b>7.87</b></td><td align="center"><u>6.50</u></td><td align="center">6.99</td><td align="center">5.77</td><td align="center">6.10</td><td align="center">7.33</td><td align="center">7.16</td><td align="center">7.12</td><td align="center"><b>7.36</b></td><td align="center">6.46</td><td align="center"><u>6.88</u></td>
|
| 540 |
+
</tr>
|
| 541 |
+
<tr>
|
| 542 |
+
<td align="left">🌟 <b>Lance (Ours)</b></td><td align="center"><b>3B</b></td><td align="center"><b>7.73</b></td><td align="center"><u>7.74</u></td><td align="center"><b>7.28</b></td><td align="center"><b>7.83</b></td><td align="center"><b>7.50</b></td><td align="center"><b>7.03</b></td><td align="center"><u>7.64</u></td><td align="center"><b>7.85</b></td><td align="center"><b>7.71</b></td><td align="center">4.46</td><td align="center"><b>7.57</b></td><td align="center"><b>7.30</b></td>
|
| 543 |
+
</tr>
|
| 544 |
+
</tbody>
|
| 545 |
+
</table>
|
| 546 |
+
</div>
|
| 547 |
+
|
| 548 |
+
</details>
|
| 549 |
+
|
| 550 |
+
<details>
|
| 551 |
+
<summary><strong>VBench Evaluation (Video Generation)</strong></summary>
|
| 552 |
+
|
| 553 |
+
<div align="center">
|
| 554 |
+
<table align="center">
|
| 555 |
+
<thead>
|
| 556 |
+
<tr>
|
| 557 |
+
<th align="left">Type</th>
|
| 558 |
+
<th align="left">Model</th>
|
| 559 |
+
<th align="center"># Params.</th>
|
| 560 |
+
<th align="center">Total Score ↑</th>
|
| 561 |
+
</tr>
|
| 562 |
+
</thead>
|
| 563 |
+
<tbody>
|
| 564 |
+
<tr>
|
| 565 |
+
<td align="center" rowspan="12"><i>Gen. Only</i></td>
|
| 566 |
+
<td align="left">ModelScope</td><td align="center">1.7B</td><td align="center">75.75</td>
|
| 567 |
+
</tr>
|
| 568 |
+
<tr>
|
| 569 |
+
<td align="left">LaVie</td><td align="center">3B</td><td align="center">77.08</td>
|
| 570 |
+
</tr>
|
| 571 |
+
<tr>
|
| 572 |
+
<td align="left">Show-1</td><td align="center">6B</td><td align="center">78.93</td>
|
| 573 |
+
</tr>
|
| 574 |
+
<tr>
|
| 575 |
+
<td align="left">AnimateDiff-V2</td><td align="center">-</td><td align="center">80.27</td>
|
| 576 |
+
</tr>
|
| 577 |
+
<tr>
|
| 578 |
+
<td align="left">VideoCrafter-2.0</td><td align="center">-</td><td align="center">80.44</td>
|
| 579 |
+
</tr>
|
| 580 |
+
<tr>
|
| 581 |
+
<td align="left">CogVideoX</td><td align="center">5B</td><td align="center">81.61</td>
|
| 582 |
+
</tr>
|
| 583 |
+
<tr>
|
| 584 |
+
<td align="left">Kling</td><td align="center">-</td><td align="center">81.85</td>
|
| 585 |
+
</tr>
|
| 586 |
+
<tr>
|
| 587 |
+
<td align="left">Open-Sora-2.0</td><td align="center">-</td><td align="center">81.71</td>
|
| 588 |
+
</tr>
|
| 589 |
+
<tr>
|
| 590 |
+
<td align="left">Gen-3</td><td align="center">-</td><td align="center">82.32</td>
|
| 591 |
+
</tr>
|
| 592 |
+
<tr>
|
| 593 |
+
<td align="left">Step-Video-T2V</td><td align="center">30B</td><td align="center">81.83</td>
|
| 594 |
+
</tr>
|
| 595 |
+
<tr>
|
| 596 |
+
<td align="left">Hunyuan Video</td><td align="center">-</td><td align="center">83.43</td>
|
| 597 |
+
</tr>
|
| 598 |
+
<tr>
|
| 599 |
+
<td align="left">Wan2.1-T2V</td><td align="center">14B</td><td align="center">83.69</td>
|
| 600 |
+
</tr>
|
| 601 |
+
<tr>
|
| 602 |
+
<td align="center" rowspan="6"><i>Unified</i></td>
|
| 603 |
+
<td align="left">HaproOmni</td><td align="center">7B</td><td align="center">78.10</td>
|
| 604 |
+
</tr>
|
| 605 |
+
<tr>
|
| 606 |
+
<td align="left">Emu3</td><td align="center">8B</td><td align="center">80.96</td>
|
| 607 |
+
</tr>
|
| 608 |
+
<tr>
|
| 609 |
+
<td align="left">VILA-U</td><td align="center">7B</td><td align="center">74.01</td>
|
| 610 |
+
</tr>
|
| 611 |
+
<tr>
|
| 612 |
+
<td align="left">Show-o2</td><td align="center">2B</td><td align="center">81.34</td>
|
| 613 |
+
</tr>
|
| 614 |
+
<tr>
|
| 615 |
+
<td align="left">TUNA</td><td align="center">1.5B</td><td align="center"><u>84.06</u></td>
|
| 616 |
+
</tr>
|
| 617 |
+
<tr>
|
| 618 |
+
<td align="left">🌟 <b>Lance (Ours)</b></td><td align="center"><b>3B</b></td><td align="center"><b>85.11</b></td>
|
| 619 |
+
</tr>
|
| 620 |
+
</tbody>
|
| 621 |
+
</table>
|
| 622 |
+
</div>
|
| 623 |
+
|
| 624 |
+
</details>
|
| 625 |
+
|
| 626 |
+
#### Running Benchmarks
|
| 627 |
+
|
| 628 |
+
Ready-to-run benchmark scripts are provided under `benchmarks/`:
|
| 629 |
+
|
| 630 |
+
| Benchmark | Modality | Script |
|
| 631 |
+
|------------------------|----------|---------------------------------------------------------------|
|
| 632 |
+
| GenEVAL (image gen) | Image | `benchmarks/image_gen/GenEVAL/sample_GenEVAL.sh` |
|
| 633 |
+
| DPG (image gen) | Image | `benchmarks/image_gen/DPG/sample_DPG.sh` |
|
| 634 |
+
| GEdit (image edit) | Image | `benchmarks/image_gen/GEdit/sample_GEdit.sh` |
|
| 635 |
+
| VBench (video gen) | Video | `benchmarks/video_gen/Vbench/sample_vbench.sh` |
|
| 636 |
+
|
| 637 |
+
|
| 638 |
+
## 📄 License
|
| 639 |
+
|
| 640 |
+
Copyright 2025 ByteDance Ltd. and/or its affiliates.
|
| 641 |
+
|
| 642 |
+
## 🙏 Acknowledgements
|
| 643 |
+
|
| 644 |
+
We would like to thank the contributors of [BAGEL](https://github.com/ByteDance-Seed/bagel), [Qwen2.5-VL-3B-Instruct](https://huggingface.co/Qwen/Qwen2.5-VL-3B-Instruct), and [Wan2.2](https://github.com/Wan-Video/Wan2.2) for their open research and contributions.
|
| 645 |
+
|
| 646 |
+
## 💖 Citation
|
| 647 |
+
|
| 648 |
+
If you find **Lance** useful for your project or research, welcome to 🌟 this repo and cite our work using the following BibTeX:
|
| 649 |
+
|
| 650 |
+
```bibtex
|
| 651 |
+
@misc{fu2026lanceunifiedmultimodalmodeling,
|
| 652 |
+
title = {Lance: Unified Multimodal Modeling by Multi-Task Synergy},
|
| 653 |
+
author = {Fengyi Fu and Mengqi Huang and Shaojin Wu and Yunsheng Jiang and Yufei Huo and Hao Li and Yinghang Song and Fei Ding and Jianzhu Guo and Qian He and Zheren Fu and Zhendong Mao and Yongdong Zhang},
|
| 654 |
+
year = {2026},
|
| 655 |
+
eprint = {2605.18678},
|
| 656 |
+
archivePrefix = {arXiv},
|
| 657 |
+
primaryClass = {cs.CV},
|
| 658 |
+
url = {https://arxiv.org/abs/2605.18678},
|
| 659 |
+
}
|
| 660 |
+
```
|
| 661 |
+
|
| 662 |
+
## 📞 Contact
|
| 663 |
+
|
| 664 |
+
For questions, issues, or collaborations, please contact [Mengqi Huang](https://corleone-huang.github.io/) and [Jianzhu Guo](https://guojianzhu.com/).
|
README_zh.md
ADDED
|
@@ -0,0 +1,665 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<div align="center">
|
| 2 |
+
<img src="assets/logo/lance-logo.webp" alt="Lance logo" width="450">
|
| 3 |
+
|
| 4 |
+
<h1 align="center">
|
| 5 |
+
Lance: Unified Multimodal Modeling by Multi-Task Synergy
|
| 6 |
+
</h1>
|
| 7 |
+
|
| 8 |
+
<p style="line-height: 1.5; margin: 0;">
|
| 9 |
+
<span>
|
| 10 |
+
<a href="https://scholar.google.com.hk/citations?user=FXxoQlsAAAAJ&hl=zh-CN&oi=ao" style="text-decoration: none; color: inherit; font-weight: 700 !important; display: inline;">Fengyi Fu</a><sup>*</sup>,
|
| 11 |
+
<a href="https://corleone-huang.github.io/" style="text-decoration: none; color: inherit; font-weight: 700 !important; display: inline;">Mengqi Huang</a><sup>*,✉</sup>,
|
| 12 |
+
<a href="https://scholar.google.com.hk/citations?user=9ER6nVkAAAAJ&hl=zh-CN&oi=ao" style="text-decoration: none; color: inherit; font-weight: 700 !important; display: inline;">Shaojin Wu</a><sup>*</sup>,
|
| 13 |
+
<span style="font-weight: 700 !important;">Yunsheng Jiang</span><sup>*</sup>,
|
| 14 |
+
<span style="font-weight: 700 !important;">Yufei Huo</span>,
|
| 15 |
+
<a href="https://guojianzhu.com/" style="text-decoration: none; color: inherit; font-weight: 700 !important; display: inline;">Jianzhu Guo</a><sup>✉,§</sup>
|
| 16 |
+
</span>
|
| 17 |
+
<br>
|
| 18 |
+
|
| 19 |
+
<span style="display: inline-block; margin-top: 0.4em;">
|
| 20 |
+
Hao Li,
|
| 21 |
+
Yinghang Song,
|
| 22 |
+
Fei Ding,
|
| 23 |
+
Qian He,
|
| 24 |
+
Zheren Fu,
|
| 25 |
+
Zhendong Mao,
|
| 26 |
+
Yongdong Zhang
|
| 27 |
+
</span>
|
| 28 |
+
<br>
|
| 29 |
+
<em>ByteDance</em>
|
| 30 |
+
<br>
|
| 31 |
+
<sup>*</sup> 共同一作
|
| 32 |
+
<sup>✉</sup> 通讯作者
|
| 33 |
+
<sup>§</sup> 项目负责人
|
| 34 |
+
</p>
|
| 35 |
+
<p>
|
| 36 |
+
<a href="https://lance-project.github.io/" style="text-decoration: none; margin: 0 8px;"><img src="https://img.shields.io/badge/Homepage-Lance-blue?style=flat" alt="Homepage"></a>
|
| 37 |
+
<a href="http://arxiv.org/abs/2605.18678" style="text-decoration: none; margin: 0 8px;"><img src="https://img.shields.io/badge/Paper-arXiv-red?style=flat&logo=arxiv" alt="arXiv"></a>
|
| 38 |
+
<a href="https://github.com/bytedance/Lance" style="text-decoration: none; margin: 0 8px;"><img src="https://img.shields.io/badge/Code-GitHub-536af5?color=536af5&logo=github" alt="GitHub"></a>
|
| 39 |
+
<br>
|
| 40 |
+
<a href="./README.md"><ins>English</ins></a> | 简体中文
|
| 41 |
+
</p>
|
| 42 |
+
</div>
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
> **注意:** Lance 是一个研究项目,而不是经过充分产品化打磨的模型。当前开源 checkpoint 使用不超过 128 张 A100 GPU 训练,训练阶段覆盖到 768x768 图像生成和 480p、12 FPS 视频生成。我们希望将 Lance 作为一个研究参考,分享在较小模型规模和相对有限算力下统一图像/视频理解、生成和编辑的建模思路、训练流程和推理代码。模型效果可能会随 prompt、分辨率、时长、运动复杂度和编辑场景而波动,post-training recipe 仍有进一步改进空间。我们欢迎社区提供建设性反馈,帮助项目持续改进。
|
| 46 |
+
|
| 47 |
+
## 🔥 更新
|
| 48 |
+
|
| 49 |
+
- **`2026/05/26`**: 🎨 Gradio 界面现已支持图像和视频生成、编辑与理解任务。[欢迎体验](assets/docs/changelog/2026-05-26.md)!
|
| 50 |
+
- **`2026/05/25`**: ✨ [Hugging Face Space](https://huggingface.co/spaces/bytedance-research/Lance) 已上线,感谢 HF 团队的支持!
|
| 51 |
+
- **`2026/05/19`**: 🤗 技术报告现已发布于 [arXiv](http://arxiv.org/abs/2605.18678)。
|
| 52 |
+
- **`2026/05/18`**: 🔥 我们发布了 [项目主页](https://lance-project.github.io/),并在 [GitHub](https://github.com/bytedance/Lance/) 和 [Hugging Face](https://huggingface.co/bytedance-research/Lance) 上开源了初版推理代码和模型权重。
|
| 53 |
+
|
| 54 |
+
## 🌟 亮点
|
| 55 |
+
|
| 56 |
+
**Lance** 是一个3B参数、原生统一的多模态模型,在单一框架下同时支持 **图像与视频的理解、生成和编辑**。
|
| 57 |
+
|
| 58 |
+
- **3B 规模高效。** 仅使用 **3B active parameters**,Lance 即可在图像生成、图像编辑和视频生成等基准上取得有竞争力的表现。
|
| 59 |
+
- **从零训练。** Lance 采用分阶段多任务训练配方从零训练,并在 **不超过 128 张 A100 GPU** 的预算内完成训练。
|
| 60 |
+
|
| 61 |
+
我们正在持续更新和改进本仓库。如果你发现任何问题或有改进建议,欢迎提出 issue 或提交 pull request(PR)💖。
|
| 62 |
+
|
| 63 |
+
<div align="center">
|
| 64 |
+
<img src="assets/benchmarks/benchmark-overview.png" alt="Lance benchmark overview across image generation, image editing, video generation, and video understanding" width="980">
|
| 65 |
+
</div>
|
| 66 |
+
|
| 67 |
+
## 📅 路线图
|
| 68 |
+
|
| 69 |
+
- [ ] 发布 fine-tuning 代码。
|
| 70 |
+
- [ ] 增加 image-to-video generation 代码支持。
|
| 71 |
+
|
| 72 |
+
## 🎨 演示
|
| 73 |
+
|
| 74 |
+
<details>
|
| 75 |
+
<summary><strong>展开查看演示结果</strong></summary>
|
| 76 |
+
|
| 77 |
+
<div align="center">
|
| 78 |
+
<strong>🔥 建议浏览我们的 <a href="https://lance-project.github.io/">主页</a> 查看更多效果。🔥</strong>
|
| 79 |
+
</div>
|
| 80 |
+
|
| 81 |
+
<h3 align="center">文生视频</h3>
|
| 82 |
+
|
| 83 |
+
<table align="center">
|
| 84 |
+
<tr>
|
| 85 |
+
<td><a href="assets/text-to-video/videos/text-to-video-demo-01.mp4"><img src="assets/text-to-video/previews/text-to-video-demo-01.gif" width="100%"></a></td>
|
| 86 |
+
<td><a href="assets/text-to-video/videos/text-to-video-demo-02.mp4"><img src="assets/text-to-video/previews/text-to-video-demo-02.gif" width="100%"></a></td>
|
| 87 |
+
<td><a href="assets/text-to-video/videos/text-to-video-demo-03.mp4"><img src="assets/text-to-video/previews/text-to-video-demo-03.gif" width="100%"></a></td>
|
| 88 |
+
<td><a href="assets/text-to-video/videos/text-to-video-demo-04.mp4"><img src="assets/text-to-video/previews/text-to-video-demo-04.gif" width="100%"></a></td>
|
| 89 |
+
</tr>
|
| 90 |
+
<tr>
|
| 91 |
+
<td><a href="assets/text-to-video/videos/text-to-video-demo-05.mp4"><img src="assets/text-to-video/previews/text-to-video-demo-05.gif" width="100%"></a></td>
|
| 92 |
+
<td><a href="assets/text-to-video/videos/text-to-video-demo-06.mp4"><img src="assets/text-to-video/previews/text-to-video-demo-06.gif" width="100%"></a></td>
|
| 93 |
+
<td><a href="assets/text-to-video/videos/text-to-video-demo-07.mp4"><img src="assets/text-to-video/previews/text-to-video-demo-07.gif" width="100%"></a></td>
|
| 94 |
+
<td><a href="assets/text-to-video/videos/text-to-video-demo-08.mp4"><img src="assets/text-to-video/previews/text-to-video-demo-08.gif" width="100%"></a></td>
|
| 95 |
+
</tr>
|
| 96 |
+
</table>
|
| 97 |
+
|
| 98 |
+
<h3 align="center">视频编辑</h3>
|
| 99 |
+
|
| 100 |
+
<table align="center">
|
| 101 |
+
<tr>
|
| 102 |
+
<td><a href="assets/video-editing/videos/video-editing-demo-01.mp4"><img src="assets/video-editing/previews/video-editing-demo-01.gif" width="100%"></a></td>
|
| 103 |
+
<td><a href="assets/video-editing/videos/video-editing-demo-02.mp4"><img src="assets/video-editing/previews/video-editing-demo-02.gif" width="100%"></a></td>
|
| 104 |
+
<td><a href="assets/video-editing/videos/video-editing-demo-03.mp4"><img src="assets/video-editing/previews/video-editing-demo-03.gif" width="100%"></a></td>
|
| 105 |
+
<td><a href="assets/video-editing/videos/video-editing-demo-04.mp4"><img src="assets/video-editing/previews/video-editing-demo-04.gif" width="100%"></a></td>
|
| 106 |
+
</tr>
|
| 107 |
+
<tr>
|
| 108 |
+
<td><a href="assets/video-editing/videos/video-editing-demo-05.mp4"><img src="assets/video-editing/previews/video-editing-demo-05.gif" width="100%"></a></td>
|
| 109 |
+
<td><a href="assets/video-editing/videos/video-editing-demo-06.mp4"><img src="assets/video-editing/previews/video-editing-demo-06.gif" width="100%"></a></td>
|
| 110 |
+
<td><a href="assets/video-editing/videos/video-editing-demo-07.mp4"><img src="assets/video-editing/previews/video-editing-demo-07.gif" width="100%"></a></td>
|
| 111 |
+
<td><a href="assets/video-editing/videos/video-editing-demo-08.mp4"><img src="assets/video-editing/previews/video-editing-demo-08.gif" width="100%"></a></td>
|
| 112 |
+
</tr>
|
| 113 |
+
</table>
|
| 114 |
+
|
| 115 |
+
<h3 align="center">多轮一致性编辑</h3>
|
| 116 |
+
|
| 117 |
+
<div align="center">
|
| 118 |
+
<a href="assets/multi-turn-editing/videos/multi-turn-editing-demo-01.mp4">
|
| 119 |
+
<img src="assets/multi-turn-editing/previews/multi-turn-editing-demo-01.gif" width="100%">
|
| 120 |
+
</a>
|
| 121 |
+
</div>
|
| 122 |
+
|
| 123 |
+
<h3 align="center">智能视频生成</h3>
|
| 124 |
+
|
| 125 |
+
<table align="center">
|
| 126 |
+
<tr>
|
| 127 |
+
<td><a href="assets/intelligent-video/videos/intelligent-video-demo-01.mp4"><img src="assets/intelligent-video/previews/intelligent-video-demo-01.gif" width="100%"></a></td>
|
| 128 |
+
<td><a href="assets/intelligent-video/videos/intelligent-video-demo-02.mp4"><img src="assets/intelligent-video/previews/intelligent-video-demo-02.gif" width="100%"></a></td>
|
| 129 |
+
<td><a href="assets/intelligent-video/videos/intelligent-video-demo-03.mp4"><img src="assets/intelligent-video/previews/intelligent-video-demo-03.gif" width="100%"></a></td>
|
| 130 |
+
<td><a href="assets/intelligent-video/videos/intelligent-video-demo-04.mp4"><img src="assets/intelligent-video/previews/intelligent-video-demo-04.gif" width="100%"></a></td>
|
| 131 |
+
</tr>
|
| 132 |
+
</table>
|
| 133 |
+
|
| 134 |
+
</details>
|
| 135 |
+
|
| 136 |
+
## 🚀 安装
|
| 137 |
+
|
| 138 |
+
### 推荐环境
|
| 139 |
+
|
| 140 |
+
- **软件环境:** Python 3.10+,CUDA 12.4+(必需)
|
| 141 |
+
- **硬件环境:** 推理至少需要一张显存不低于 40GB 的 GPU
|
| 142 |
+
|
| 143 |
+
我们在 NVIDIA A100 上测试通过了以下依赖组合:
|
| 144 |
+
|
| 145 |
+
- PyTorch 2.8.0 + cu126 + flash-attn 2.8.3
|
| 146 |
+
- PyTorch 2.5.1 + cu124 + flash-attn 2.6.3
|
| 147 |
+
|
| 148 |
+
默认安装命令使用 PyTorch 2.8.0 + cu126 环境。对于其他 GPU 型号,请根据驱动版本、CUDA runtime、Python 版本和 GPU 架构自行选择并验证匹配的 PyTorch 与 `flash-attn` 版本组合。
|
| 149 |
+
|
| 150 |
+
|
| 151 |
+
### 安装步骤
|
| 152 |
+
|
| 153 |
+
首先,克隆代码仓库:
|
| 154 |
+
|
| 155 |
+
```bash
|
| 156 |
+
git clone https://github.com/bytedance/Lance.git
|
| 157 |
+
cd Lance
|
| 158 |
+
```
|
| 159 |
+
|
| 160 |
+
然后,配置环境:
|
| 161 |
+
|
| 162 |
+
```bash
|
| 163 |
+
conda create -n Lance python=3.11 -y
|
| 164 |
+
conda activate Lance
|
| 165 |
+
pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu126
|
| 166 |
+
pip install -r requirements.txt
|
| 167 |
+
pip install flash-attn==2.8.3 --no-build-isolation
|
| 168 |
+
```
|
| 169 |
+
|
| 170 |
+
> **注意:** 如果从源码安装 `flash-attn` 失败,可以改为安装预编译 wheel。下面的 wheelhouse 来自第三方仓库,仅作为**参考提供**;请在安装前确认 wheel 与当前 Python、PyTorch 和 CUDA 版本匹配:
|
| 171 |
+
>
|
| 172 |
+
> ```bash
|
| 173 |
+
> pip install --no-cache-dir --no-deps --force-reinstall \
|
| 174 |
+
> "https://huggingface.co/strangertoolshf/flash_attention_2_wheelhouse/resolve/main/wheelhouse-flash_attn-2.8.3/linux_x86_64/torch2.8/cu12/abiTRUE/cp311/flash_attn-2.8.3+cu12torch2.8cxx11abiTRUE-cp311-cp311-linux_x86_64.whl"
|
| 175 |
+
> ```
|
| 176 |
+
|
| 177 |
+
然后���从 [Hugging Face 上的 Lance-3B](https://huggingface.co/bytedance-research/Lance) 下载所需的全部模型权重,并放置到 `downloads/` 目录下:
|
| 178 |
+
|
| 179 |
+
```bash
|
| 180 |
+
from huggingface_hub import snapshot_download
|
| 181 |
+
|
| 182 |
+
save_dir = "./downloads/"
|
| 183 |
+
repo_id = "bytedance-research/Lance"
|
| 184 |
+
cache_dir = save_dir + "/cache"
|
| 185 |
+
|
| 186 |
+
snapshot_download(cache_dir=cache_dir,
|
| 187 |
+
local_dir=save_dir,
|
| 188 |
+
repo_id=repo_id,
|
| 189 |
+
local_dir_use_symlinks=False,
|
| 190 |
+
resume_download=True,
|
| 191 |
+
allow_patterns=["*.json", "*.safetensors", "*.bin", "*.py", "*.md", "*.txt","*.pth",],
|
| 192 |
+
)
|
| 193 |
+
```
|
| 194 |
+
|
| 195 |
+
## 📚 使用方法
|
| 196 |
+
|
| 197 |
+
### 推理
|
| 198 |
+
|
| 199 |
+
#### 基本用法
|
| 200 |
+
|
| 201 |
+
```bash
|
| 202 |
+
bash inference_lance.sh
|
| 203 |
+
```
|
| 204 |
+
|
| 205 |
+
- 运行前,请先在 `inference_lance.sh` 顶部配置推理参数。
|
| 206 |
+
- **支持任务:** `t2i`、`t2v`、`image_edit`、`video_edit`、`x2t_image` 和 `x2t_video`。你也可以在 `inference_lance.py` 中修改 `TASK_DEFAULT_CONFIGS`,自定义每个任务默认使用的数据样例。
|
| 207 |
+
- **注意:** 对于所有任务,建议在编写输入 prompt 时参考提供示例中的 `prompt` 格式,这通常有助于获得更好的生成效果。
|
| 208 |
+
|
| 209 |
+
|
| 210 |
+
#### 任务示例
|
| 211 |
+
|
| 212 |
+
##### 文生视频
|
| 213 |
+
|
| 214 |
+
```bash
|
| 215 |
+
bash inference_lance.sh \
|
| 216 |
+
--TASK_NAME t2v \
|
| 217 |
+
--MODEL_PATH downloads/Lance_3B_Video \
|
| 218 |
+
--RESOLUTION video_480p \
|
| 219 |
+
--NUM_FRAMES 121 \
|
| 220 |
+
--VIDEO_HEIGHT 480 \
|
| 221 |
+
--VIDEO_WIDTH 848 \
|
| 222 |
+
--SAVE_PATH_GEN results/t2v
|
| 223 |
+
```
|
| 224 |
+
|
| 225 |
+
##### 文生图
|
| 226 |
+
|
| 227 |
+
```bash
|
| 228 |
+
bash inference_lance.sh \
|
| 229 |
+
--TASK_NAME t2i \
|
| 230 |
+
--MODEL_PATH downloads/Lance_3B \
|
| 231 |
+
--RESOLUTION image_768res \
|
| 232 |
+
--VIDEO_HEIGHT 768 \
|
| 233 |
+
--VIDEO_WIDTH 768 \
|
| 234 |
+
--SAVE_PATH_GEN results/t2i
|
| 235 |
+
```
|
| 236 |
+
|
| 237 |
+
##### 视频编辑
|
| 238 |
+
|
| 239 |
+
```bash
|
| 240 |
+
bash inference_lance.sh \
|
| 241 |
+
--TASK_NAME video_edit \
|
| 242 |
+
--MODEL_PATH downloads/Lance_3B_Video \
|
| 243 |
+
--RESOLUTION video_480p \
|
| 244 |
+
--SAVE_PATH_GEN results/video_edit
|
| 245 |
+
```
|
| 246 |
+
|
| 247 |
+
##### 图像编辑
|
| 248 |
+
|
| 249 |
+
```bash
|
| 250 |
+
bash inference_lance.sh \
|
| 251 |
+
--TASK_NAME image_edit \
|
| 252 |
+
--MODEL_PATH downloads/Lance_3B \
|
| 253 |
+
--RESOLUTION image_768res \
|
| 254 |
+
--SAVE_PATH_GEN results/image_edit
|
| 255 |
+
```
|
| 256 |
+
|
| 257 |
+
##### 视频理解
|
| 258 |
+
|
| 259 |
+
```bash
|
| 260 |
+
bash inference_lance.sh \
|
| 261 |
+
--TASK_NAME x2t_video \
|
| 262 |
+
--MODEL_PATH downloads/Lance_3B_Video \
|
| 263 |
+
--RESOLUTION video_480p \
|
| 264 |
+
--NUM_FRAMES 50 \
|
| 265 |
+
--SAVE_PATH_GEN results/x2t_video
|
| 266 |
+
```
|
| 267 |
+
|
| 268 |
+
##### 图像理解
|
| 269 |
+
|
| 270 |
+
```bash
|
| 271 |
+
bash inference_lance.sh \
|
| 272 |
+
--TASK_NAME x2t_image \
|
| 273 |
+
--MODEL_PATH downloads/Lance_3B \
|
| 274 |
+
--RESOLUTION image_768res \
|
| 275 |
+
--SAVE_PATH_GEN results/x2t_image
|
| 276 |
+
```
|
| 277 |
+
|
| 278 |
+
#### 文本-图像到视频生成
|
| 279 |
+
bash inference_lance.sh \
|
| 280 |
+
--TASK_NAME ti2v \
|
| 281 |
+
--MODEL_PATH downloads/Lance_3B_Video \
|
| 282 |
+
--RESOLUTION video_480p \
|
| 283 |
+
--SAVE_PATH_GEN results/ti2v_test/idip
|
| 284 |
+
|
| 285 |
+
|
| 286 |
+
#### 文本-图像到视频生成
|
| 287 |
+
bash inference_lance.sh \
|
| 288 |
+
--TASK_NAME ff2v \
|
| 289 |
+
--MODEL_PATH downloads/Lance_3B_Video \
|
| 290 |
+
--RESOLUTION video_480p \
|
| 291 |
+
--SAVE_PATH_GEN results/ti2v_test/ff2v
|
| 292 |
+
|
| 293 |
+
|
| 294 |
+
config/examples/ti2v_example.json
|
| 295 |
+
|
| 296 |
+
<details>
|
| 297 |
+
<summary><strong>展开任务和参数参考</strong></summary>
|
| 298 |
+
|
| 299 |
+
#### 可用任务
|
| 300 |
+
|
| 301 |
+
| 任务名 | 说明 | 示例 JSON |
|
| 302 |
+
|------------------------|--------------------------------------------------|----------------------------------------------|
|
| 303 |
+
| `t2v` | 文生视频 | `config/examples/t2v_example.json` |
|
| 304 |
+
| `t2i` | 文生图 | `config/examples/t2i_example.json` |
|
| 305 |
+
| `image_edit` | 图像编辑 | `config/examples/image_edit_example.json` |
|
| 306 |
+
| `video_edit` | 视频编辑 | `config/examples/video_edit_example.json` |
|
| 307 |
+
| `x2t_image` | 图像理解 | `config/examples/x2t_image_example.json` |
|
| 308 |
+
| `x2t_video` | 视频理解 | `config/examples/x2t_video_example.json` |
|
| 309 |
+
|
| 310 |
+
关于理解任务的示例文件:
|
| 311 |
+
|
| 312 |
+
- `config/examples/x2t_image_example.json`:用于图像理解示例,包括视觉问答和基于图像的推理。
|
| 313 |
+
- `config/examples/x2t_video_example.json`:用于视频理解示例,包括视频问答和视频描述。
|
| 314 |
+
|
| 315 |
+
#### 参数说明
|
| 316 |
+
|
| 317 |
+
你可以在 `inference_lance.sh` 顶部配置以下超参数:
|
| 318 |
+
|
| 319 |
+
| 参数 | 默认值 | 说明 |
|
| 320 |
+
| --- | --- | --- |
|
| 321 |
+
| `MODEL_PATH` | `"downloads/Lance_3B"` | 下载后的 Lance 模型权重路径(如 `Lance_3B` 或 `Lance_3B_Video`)。 |
|
| 322 |
+
| `NUM_GPUS` | `1` | 用于推理的 GPU 数量。 |
|
| 323 |
+
| `VALIDATION_NUM_TIMESTEPS` | `30` | 去噪步数(例如 30 或 50)。 |
|
| 324 |
+
| `VALIDATION_TIMESTEP_SHIFT` | `3.5` | Flow matching 调度中的 timestep shift 参数。 |
|
| 325 |
+
| `CFG_TEXT_SCALE` | `4.0` | 文本条件的 CFG(Classifier-Free Guidance)系数。 |
|
| 326 |
+
| `VALIDATION_DATA_SEED` | `42` | 用于复现实验的随机种子。 |
|
| 327 |
+
| `NUM_FRAMES` | `50` | 视频生成帧数(最大 121)。*图像任务不使用该参数。* |
|
| 328 |
+
| `VIDEO_HEIGHT` / `VIDEO_WIDTH`| `768` | 空间分辨率。*编辑任务不使用该参数(由输入图像/视频决定)。* |
|
| 329 |
+
| `RESOLUTION` | `"video_480p"` | 基础分辨率预设(如 `image_768res` 或 `video_480p`)。 |
|
| 330 |
+
|
| 331 |
+
</details>
|
| 332 |
+
|
| 333 |
+
### 🖥️ Gradio
|
| 334 |
+
|
| 335 |
+
你可以启动本地 Gradio demo,体验视频/图像生成、编辑和理解:
|
| 336 |
+
|
| 337 |
+
```bash
|
| 338 |
+
python lance_gradio.py --server-name 0.0.0.0 --server-port 7860
|
| 339 |
+
|
| 340 |
+
### 基准评测
|
| 341 |
+
|
| 342 |
+
<details>
|
| 343 |
+
<summary><strong>DPG-Bench ���测</strong></summary>
|
| 344 |
+
|
| 345 |
+
<div align="center">
|
| 346 |
+
<table align="center">
|
| 347 |
+
<thead>
|
| 348 |
+
<tr>
|
| 349 |
+
<th align="left">模型</th>
|
| 350 |
+
<th align="center"># Params.</th>
|
| 351 |
+
<th align="center">Global</th>
|
| 352 |
+
<th align="center">Entity</th>
|
| 353 |
+
<th align="center">Attribute</th>
|
| 354 |
+
<th align="center">Relation</th>
|
| 355 |
+
<th align="center">Other</th>
|
| 356 |
+
<th align="center">Overall</th>
|
| 357 |
+
</tr>
|
| 358 |
+
</thead>
|
| 359 |
+
<tbody>
|
| 360 |
+
<tr>
|
| 361 |
+
<td align="center" colspan="8"><i>仅生成模型</i></td>
|
| 362 |
+
</tr>
|
| 363 |
+
<tr>
|
| 364 |
+
<td align="left">SDXL</td><td align="center">3.5B</td><td align="center">83.27</td><td align="center">82.43</td><td align="center">80.91</td><td align="center">86.76</td><td align="center">80.41</td><td align="center">74.65</td>
|
| 365 |
+
</tr>
|
| 366 |
+
<tr>
|
| 367 |
+
<td align="left">DALL-E 3</td><td align="center">-</td><td align="center">90.97</td><td align="center">89.61</td><td align="center">88.39</td><td align="center">90.58</td><td align="center">89.83</td><td align="center">83.50</td>
|
| 368 |
+
</tr>
|
| 369 |
+
<tr>
|
| 370 |
+
<td align="left">SD3-Medium</td><td align="center">2B</td><td align="center">87.90</td><td align="center">91.01</td><td align="center">88.83</td><td align="center">80.70</td><td align="center">88.68</td><td align="center">84.08</td>
|
| 371 |
+
</tr>
|
| 372 |
+
<tr>
|
| 373 |
+
<td align="left">FLUX.1-dev</td><td align="center">12B</td><td align="center">74.35</td><td align="center">90.00</td><td align="center">88.96</td><td align="center">90.87</td><td align="center">88.33</td><td align="center">83.84</td>
|
| 374 |
+
</tr>
|
| 375 |
+
<tr>
|
| 376 |
+
<td align="left">Qwen-Image</td><td align="center">20B</td><td align="center">91.32</td><td align="center">91.56</td><td align="center">92.02</td><td align="center">94.31</td><td align="center">92.73</td><td align="center">88.32</td>
|
| 377 |
+
</tr>
|
| 378 |
+
<tr>
|
| 379 |
+
<td align="center" colspan="8"><i>统一模型</i></td>
|
| 380 |
+
</tr>
|
| 381 |
+
<tr>
|
| 382 |
+
<td align="left">Janus-Pro-7B</td><td align="center">7B</td><td align="center">86.90</td><td align="center">88.90</td><td align="center">89.40</td><td align="center">89.32</td><td align="center">89.48</td><td align="center">84.19</td>
|
| 383 |
+
</tr>
|
| 384 |
+
<tr>
|
| 385 |
+
<td align="left">OmniGen2</td><td align="center">4B</td><td align="center">88.81</td><td align="center">88.83</td><td align="center">90.18</td><td align="center">89.37</td><td align="center">90.27</td><td align="center">83.57</td>
|
| 386 |
+
</tr>
|
| 387 |
+
<tr>
|
| 388 |
+
<td align="left">Show-o2</td><td align="center">7B</td><td align="center">89.00</td><td align="center"><b>91.78</b></td><td align="center">89.96</td><td align="center">91.81</td><td align="center"><b>91.64</b></td><td align="center">86.14</td>
|
| 389 |
+
</tr>
|
| 390 |
+
<tr>
|
| 391 |
+
<td align="left">BAGEL<sup>†</sup></td><td align="center">7B</td><td align="center">88.94</td><td align="center">90.37</td><td align="center"><u>91.29</u></td><td align="center">90.82</td><td align="center">88.67</td><td align="center">85.07</td>
|
| 392 |
+
</tr>
|
| 393 |
+
<tr>
|
| 394 |
+
<td align="left">InternVL-U</td><td align="center">1.7B</td><td align="center"><u>90.39</u></td><td align="center">90.78</td><td align="center">90.68</td><td align="center">90.29</td><td align="center">88.77</td><td align="center">85.18</td>
|
| 395 |
+
</tr>
|
| 396 |
+
<tr>
|
| 397 |
+
<td align="left">TUNA</td><td align="center">7B</td><td align="center"><b>90.42</b></td><td align="center"><u>91.68</u></td><td align="center">90.94</td><td align="center"><u>91.87</u></td><td align="center"><u>90.73</u></td><td align="center"><b>86.76</b></td>
|
| 398 |
+
</tr>
|
| 399 |
+
<tr>
|
| 400 |
+
<td align="left">TUNA-2</td><td align="center">7B</td><td align="center">89.50</td><td align="center">91.40</td><td align="center"><b>92.07</b></td><td align="center">91.91</td><td align="center">88.81</td><td align="center"><u>86.54</u></td>
|
| 401 |
+
</tr>
|
| 402 |
+
<tr>
|
| 403 |
+
<td align="left">🌟 <b>Lance (Ours)</b></td><td align="center"><b>3B</b></td><td align="center"><b>83.89</b></td><td align="center"><b>91.07</b></td><td align="center"><b>89.36</b></td><td align="center"><b>93.38</b></td><td align="center"><b>80.80</b></td><td align="center"><b>84.67</b></td>
|
| 404 |
+
</tr>
|
| 405 |
+
</tbody>
|
| 406 |
+
</table>
|
| 407 |
+
</div>
|
| 408 |
+
|
| 409 |
+
<p align="center"><em><sup>†</sup> 表示该方法在生成前使用 LLM rewriter 进行提示词改写。</em></p>
|
| 410 |
+
|
| 411 |
+
</details>
|
| 412 |
+
|
| 413 |
+
<details>
|
| 414 |
+
<summary><strong>GenEval 评测</strong></summary>
|
| 415 |
+
|
| 416 |
+
<div align="center">
|
| 417 |
+
<table align="center">
|
| 418 |
+
<thead>
|
| 419 |
+
<tr>
|
| 420 |
+
<th align="left">模型</th>
|
| 421 |
+
<th align="center"># Params.</th>
|
| 422 |
+
<th align="center">1-Obj.</th>
|
| 423 |
+
<th align="center">2-Obj.</th>
|
| 424 |
+
<th align="center">Count</th>
|
| 425 |
+
<th align="center">Colors</th>
|
| 426 |
+
<th align="center">Position</th>
|
| 427 |
+
<th align="center">Attr.</th>
|
| 428 |
+
<th align="center">Overall</th>
|
| 429 |
+
</tr>
|
| 430 |
+
</thead>
|
| 431 |
+
<tbody>
|
| 432 |
+
<tr>
|
| 433 |
+
<td align="center" colspan="9"><i>仅生成模型</i></td>
|
| 434 |
+
</tr>
|
| 435 |
+
<tr>
|
| 436 |
+
<td align="left">SDXL</td><td align="center">3.5B</td><td align="center">0.98</td><td align="center">0.74</td><td align="center">0.39</td><td align="center">0.85</td><td align="center">0.15</td><td align="center">0.23</td><td align="center">0.55</td>
|
| 437 |
+
</tr>
|
| 438 |
+
<tr>
|
| 439 |
+
<td align="left">DALL-E 3</td><td align="center">-</td><td align="center">0.96</td><td align="center">0.87</td><td align="center">0.47</td><td align="center">0.83</td><td align="center">0.43</td><td align="center">0.45</td><td align="center">0.67</td>
|
| 440 |
+
</tr>
|
| 441 |
+
<tr>
|
| 442 |
+
<td align="left">SD3-Medium</td><td align="center">2B</td><td align="center">0.99</td><td align="center">0.94</td><td align="center">0.72</td><td align="center">0.89</td><td align="center">0.33</td><td align="center">0.60</td><td align="center">0.74</td>
|
| 443 |
+
</tr>
|
| 444 |
+
<tr>
|
| 445 |
+
<td align="left">FLUX.1-dev</td><td align="center">12B</td><td align="center">0.98</td><td align="center">0.93</td><td align="center">0.75</td><td align="center">0.93</td><td align="center">0.68</td><td align="center">0.65</td><td align="center">0.82</td>
|
| 446 |
+
</tr>
|
| 447 |
+
<tr>
|
| 448 |
+
<td align="left">Qwen-Image</td><td align="center">20B</td><td align="center">0.99</td><td align="center">0.92</td><td align="center">0.89</td><td align="center">0.88</td><td align="center">0.76</td><td align="center">0.77</td><td align="center">0.87</td>
|
| 449 |
+
</tr>
|
| 450 |
+
<tr>
|
| 451 |
+
<td align="center" colspan="9"><i>统一模型</i></td>
|
| 452 |
+
</tr>
|
| 453 |
+
<tr>
|
| 454 |
+
<td align="left">Janus-Pro-7B</td><td align="center">7B</td><td align="center"><u>0.99</u></td><td align="center">0.89</td><td align="center">0.59</td><td align="center">0.90</td><td align="center">0.79</td><td align="center">0.66</td><td align="center">0.80</td>
|
| 455 |
+
</tr>
|
| 456 |
+
<tr>
|
| 457 |
+
<td align="left">OmniGen2</td><td align="center">4B</td><td align="center"><b>1.00</b></td><td align="center">0.95</td><td align="center">0.64</td><td align="center">0.88</td><td align="center">0.55</td><td align="center">0.76</td><td align="center">0.80</td>
|
| 458 |
+
</tr>
|
| 459 |
+
<tr>
|
| 460 |
+
<td align="left">Show-o2</td><td align="center">7B</td><td align="center"><b>1.00</b></td><td align="center">0.87</td><td align="center">0.58</td><td align="center">0.92</td><td align="center">0.52</td><td align="center">0.62</td><td align="center">0.76</td>
|
| 461 |
+
</tr>
|
| 462 |
+
<tr>
|
| 463 |
+
<td align="left">BAGEL<sup>†</sup></td><td align="center">7B</td><td align="center">0.98</td><td align="center">0.95</td><td align="center"><b>0.84</b></td><td align="center"><u>0.95</u></td><td align="center">0.78</td><td align="center">0.77</td><td align="center">0.88</td>
|
| 464 |
+
</tr>
|
| 465 |
+
<tr>
|
| 466 |
+
<td align="left">Mogao</td><td align="center">7B</td><td align="center"><b>1.00</b></td><td align="center"><b>0.97</b></td><td align="center"><u>0.83</u></td><td align="center">0.93</td><td align="center">0.84</td><td align="center">0.80</td><td align="center"><u>0.89</u></td>
|
| 467 |
+
</tr>
|
| 468 |
+
<tr>
|
| 469 |
+
<td align="left">InternVL-U</td><td align="center">1.7B</td><td align="center"><u>0.99</u></td><td align="center">0.94</td><td align="center">0.74</td><td align="center">0.91</td><td align="center">0.77</td><td align="center">0.74</td><td align="center">0.85</td>
|
| 470 |
+
</tr>
|
| 471 |
+
<tr>
|
| 472 |
+
<td align="left">TUNA</td><td align="center">7B</td><td align="center"><b>1.00</b></td><td align="center"><b>0.97</b></td><td align="center">0.81</td><td align="center">0.91</td><td align="center"><b>0.88</b></td><td align="center"><b>0.83</b></td><td align="center"><b>0.90</b></td>
|
| 473 |
+
</tr>
|
| 474 |
+
<tr>
|
| 475 |
+
<td align="left">TUNA-2</td><td align="center">7B</td><td align="center"><u>0.99</u></td><td align="center"><u>0.96</u></td><td align="center">0.80</td><td align="center">0.91</td><td align="center">0.84</td><td align="center">0.76</td><td align="center">0.87</td>
|
| 476 |
+
</tr>
|
| 477 |
+
<tr>
|
| 478 |
+
<td align="left">🌟 <b>Lance (Ours)</b></td><td align="center"><b>3B</b></td><td align="center"><b>1.00</b></td><td align="center"><b>0.94</b></td><td align="center"><b>0.84</b></td><td align="center"><b>0.97</b></td><td align="center"><b>0.87</b></td><td align="center"><b>0.81</b></td><td align="center"><b>0.90</b></td>
|
| 479 |
+
</tr>
|
| 480 |
+
</tbody>
|
| 481 |
+
</table>
|
| 482 |
+
</div>
|
| 483 |
+
|
| 484 |
+
<p align="center"><em><sup>†</sup> 表示该方法在生成前使用 LLM rewriter 进行提示词改写。</em></p>
|
| 485 |
+
|
| 486 |
+
</details>
|
| 487 |
+
|
| 488 |
+
<details>
|
| 489 |
+
<summary><strong>GEdit-Bench 评测</strong></summary>
|
| 490 |
+
|
| 491 |
+
<div align="center">
|
| 492 |
+
<table align="center">
|
| 493 |
+
<thead>
|
| 494 |
+
<tr>
|
| 495 |
+
<th align="left">模型</th>
|
| 496 |
+
<th align="center"># Params.</th>
|
| 497 |
+
<th align="center">BC</th>
|
| 498 |
+
<th align="center">CA</th>
|
| 499 |
+
<th align="center">MM</th>
|
| 500 |
+
<th align="center">MC</th>
|
| 501 |
+
<th align="center">PB</th>
|
| 502 |
+
<th align="center">ST</th>
|
| 503 |
+
<th align="center">SA</th>
|
| 504 |
+
<th align="center">SR</th>
|
| 505 |
+
<th align="center">SRp</th>
|
| 506 |
+
<th align="center">TM</th>
|
| 507 |
+
<th align="center">TT</th>
|
| 508 |
+
<th align="center">Avg/G_O</th>
|
| 509 |
+
</tr>
|
| 510 |
+
</thead>
|
| 511 |
+
<tbody>
|
| 512 |
+
<tr>
|
| 513 |
+
<td align="center" colspan="14"><i>仅生成模型</i></td>
|
| 514 |
+
</tr>
|
| 515 |
+
<tr>
|
| 516 |
+
<td align="left">Gemini 2.0</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">-</td><td align="center">6.32</td>
|
| 517 |
+
</tr>
|
| 518 |
+
<tr>
|
| 519 |
+
<td align="left">GPT Image 1</td><td align="center">-</td><td align="center">6.96</td><td align="center">6.85</td><td align="center">7.10</td><td align="center">5.41</td><td align="center">6.74</td><td align="center">7.44</td><td align="center">7.51</td><td align="center">8.73</td><td align="center">8.55</td><td align="center">8.45</td><td align="center">8.69</td><td align="center">7.49</td>
|
| 520 |
+
</tr>
|
| 521 |
+
<tr>
|
| 522 |
+
<td align="left">Qwen-Image-Edit</td><td align="center">20B</td><td align="center">8.23</td><td align="center">8.30</td><td align="center">7.33</td><td align="center">8.05</td><td align="center">7.49</td><td align="center">6.74</td><td align="center">8.57</td><td align="center">8.09</td><td align="center">8.29</td><td align="center">8.48</td><td align="center">8.50</td><td align="center">8.01</td>
|
| 523 |
+
</tr>
|
| 524 |
+
<tr>
|
| 525 |
+
<td align="center" colspan="14"><i>统一模型</i></td>
|
| 526 |
+
</tr>
|
| 527 |
+
<tr>
|
| 528 |
+
<td align="left">Lumina-DiMOO</td><td align="center">8B</td><td align="center">3.43</td><td align="center">4.27</td><td align="center">3.08</td><td align="center">2.77</td><td align="center">4.74</td><td align="center">5.19</td><td align="center">4.44</td><td align="center">3.80</td><td align="center">4.38</td><td align="center">2.68</td><td align="center">4.20</td><td align="center">3.91</td>
|
| 529 |
+
</tr>
|
| 530 |
+
<tr>
|
| 531 |
+
<td align="left">Ovis-U1</td><td align="center">1.2B</td><td align="center"><u>7.49</u></td><td align="center">6.88</td><td align="center">6.21</td><td align="center">4.79</td><td align="center">5.98</td><td align="center"><u>6.46</u></td><td align="center">7.49</td><td align="center"><u>7.25</u></td><td align="center"><u>7.27</u></td><td align="center">4.48</td><td align="center">6.31</td><td align="center">6.42</td>
|
| 532 |
+
</tr>
|
| 533 |
+
<tr>
|
| 534 |
+
<td align="left">BAGEL</td><td align="center">7B</td><td align="center">7.32</td><td align="center">6.91</td><td align="center">6.38</td><td align="center">4.75</td><td align="center">4.57</td><td align="center">6.15</td><td align="center"><b>7.90</b></td><td align="center">7.16</td><td align="center">7.02</td><td align="center"><u>7.32</u></td><td align="center">6.22</td><td align="center">6.52</td>
|
| 535 |
+
</tr>
|
| 536 |
+
<tr>
|
| 537 |
+
<td align="left">InternVL-U</td><td align="center">1.7B</td><td align="center">7.08</td><td align="center">7.05</td><td align="center">6.38</td><td align="center"><u>7.02</u></td><td align="center"><u>6.03</u></td><td align="center">6.27</td><td align="center">7.13</td><td align="center">6.55</td><td align="center">6.33</td><td align="center">6.59</td><td align="center"><u>6.85</u></td><td align="center">6.66</td>
|
| 538 |
+
</tr>
|
| 539 |
+
<tr>
|
| 540 |
+
<td align="left">InternVL-U (w/ CoT)</td><td align="center">1.7B</td><td align="center">7.05</td><td align="center"><b>7.87</b></td><td align="center"><u>6.50</u></td><td align="center">6.99</td><td align="center">5.77</td><td align="center">6.10</td><td align="center">7.33</td><td align="center">7.16</td><td align="center">7.12</td><td align="center"><b>7.36</b></td><td align="center">6.46</td><td align="center"><u>6.88</u></td>
|
| 541 |
+
</tr>
|
| 542 |
+
<tr>
|
| 543 |
+
<td align="left">🌟 <b>Lance (Ours)</b></td><td align="center"><b>3B</b></td><td align="center"><b>7.73</b></td><td align="center"><u>7.74</u></td><td align="center"><b>7.28</b></td><td align="center"><b>7.83</b></td><td align="center"><b>7.50</b></td><td align="center"><b>7.03</b></td><td align="center"><u>7.64</u></td><td align="center"><b>7.85</b></td><td align="center"><b>7.71</b></td><td align="center">4.46</td><td align="center"><b>7.57</b></td><td align="center"><b>7.30</b></td>
|
| 544 |
+
</tr>
|
| 545 |
+
</tbody>
|
| 546 |
+
</table>
|
| 547 |
+
</div>
|
| 548 |
+
|
| 549 |
+
</details>
|
| 550 |
+
|
| 551 |
+
<details>
|
| 552 |
+
<summary><strong>VBench 评测(视频生成)</strong></summary>
|
| 553 |
+
|
| 554 |
+
<div align="center">
|
| 555 |
+
<table align="center">
|
| 556 |
+
<thead>
|
| 557 |
+
<tr>
|
| 558 |
+
<th align="left">类型</th>
|
| 559 |
+
<th align="left">Model</th>
|
| 560 |
+
<th align="center"># Params.</th>
|
| 561 |
+
<th align="center">Total Score ↑</th>
|
| 562 |
+
</tr>
|
| 563 |
+
</thead>
|
| 564 |
+
<tbody>
|
| 565 |
+
<tr>
|
| 566 |
+
<td align="center" rowspan="12"><i>Gen. Only</i></td>
|
| 567 |
+
<td align="left">ModelScope</td><td align="center">1.7B</td><td align="center">75.75</td>
|
| 568 |
+
</tr>
|
| 569 |
+
<tr>
|
| 570 |
+
<td align="left">LaVie</td><td align="center">3B</td><td align="center">77.08</td>
|
| 571 |
+
</tr>
|
| 572 |
+
<tr>
|
| 573 |
+
<td align="left">Show-1</td><td align="center">6B</td><td align="center">78.93</td>
|
| 574 |
+
</tr>
|
| 575 |
+
<tr>
|
| 576 |
+
<td align="left">AnimateDiff-V2</td><td align="center">-</td><td align="center">80.27</td>
|
| 577 |
+
</tr>
|
| 578 |
+
<tr>
|
| 579 |
+
<td align="left">VideoCrafter-2.0</td><td align="center">-</td><td align="center">80.44</td>
|
| 580 |
+
</tr>
|
| 581 |
+
<tr>
|
| 582 |
+
<td align="left">CogVideoX</td><td align="center">5B</td><td align="center">81.61</td>
|
| 583 |
+
</tr>
|
| 584 |
+
<tr>
|
| 585 |
+
<td align="left">Kling</td><td align="center">-</td><td align="center">81.85</td>
|
| 586 |
+
</tr>
|
| 587 |
+
<tr>
|
| 588 |
+
<td align="left">Open-Sora-2.0</td><td align="center">-</td><td align="center">81.71</td>
|
| 589 |
+
</tr>
|
| 590 |
+
<tr>
|
| 591 |
+
<td align="left">Gen-3</td><td align="center">-</td><td align="center">82.32</td>
|
| 592 |
+
</tr>
|
| 593 |
+
<tr>
|
| 594 |
+
<td align="left">Step-Video-T2V</td><td align="center">30B</td><td align="center">81.83</td>
|
| 595 |
+
</tr>
|
| 596 |
+
<tr>
|
| 597 |
+
<td align="left">Hunyuan Video</td><td align="center">-</td><td align="center">83.43</td>
|
| 598 |
+
</tr>
|
| 599 |
+
<tr>
|
| 600 |
+
<td align="left">Wan2.1-T2V</td><td align="center">14B</td><td align="center">83.69</td>
|
| 601 |
+
</tr>
|
| 602 |
+
<tr>
|
| 603 |
+
<td align="center" rowspan="6"><i>Unified</i></td>
|
| 604 |
+
<td align="left">HaproOmni</td><td align="center">7B</td><td align="center">78.10</td>
|
| 605 |
+
</tr>
|
| 606 |
+
<tr>
|
| 607 |
+
<td align="left">Emu3</td><td align="center">8B</td><td align="center">80.96</td>
|
| 608 |
+
</tr>
|
| 609 |
+
<tr>
|
| 610 |
+
<td align="left">VILA-U</td><td align="center">7B</td><td align="center">74.01</td>
|
| 611 |
+
</tr>
|
| 612 |
+
<tr>
|
| 613 |
+
<td align="left">Show-o2</td><td align="center">2B</td><td align="center">81.34</td>
|
| 614 |
+
</tr>
|
| 615 |
+
<tr>
|
| 616 |
+
<td align="left">TUNA</td><td align="center">1.5B</td><td align="center"><u>84.06</u></td>
|
| 617 |
+
</tr>
|
| 618 |
+
<tr>
|
| 619 |
+
<td align="left">🌟 <b>Lance (Ours)</b></td><td align="center"><b>3B</b></td><td align="center"><b>85.11</b></td>
|
| 620 |
+
</tr>
|
| 621 |
+
</tbody>
|
| 622 |
+
</table>
|
| 623 |
+
</div>
|
| 624 |
+
|
| 625 |
+
</details>
|
| 626 |
+
|
| 627 |
+
#### 运行基准评测
|
| 628 |
+
|
| 629 |
+
`benchmarks/` 目录下提供了可直接运行的基准评测脚本:
|
| 630 |
+
|
| 631 |
+
| 基准 | 模态 | 脚本 |
|
| 632 |
+
|------------------------|----------|---------------------------------------------------------------|
|
| 633 |
+
| GenEVAL(图像生成) | 图像 | `benchmarks/image_gen/GenEVAL/sample_GenEVAL.sh` |
|
| 634 |
+
| DPG(图像生成) | 图像 | `benchmarks/image_gen/DPG/sample_DPG.sh` |
|
| 635 |
+
| GEdit(图像编辑) | 图像 | `benchmarks/image_gen/GEdit/sample_GEdit.sh` |
|
| 636 |
+
| VBench(视频生成) | 视频 | `benchmarks/video_gen/Vbench/sample_vbench.sh` |
|
| 637 |
+
|
| 638 |
+
|
| 639 |
+
## 📄 许可证
|
| 640 |
+
|
| 641 |
+
Copyright 2025 ByteDance Ltd. and/or its affiliates.
|
| 642 |
+
|
| 643 |
+
## 🙏 致谢
|
| 644 |
+
|
| 645 |
+
我们感谢 [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) 的贡献者,感谢他们开放的研究与社区贡献。
|
| 646 |
+
|
| 647 |
+
## 💖 引用
|
| 648 |
+
|
| 649 |
+
如果 **Lance** 对您的项目或研究有帮助,欢迎 🌟 本仓库,并使用以下 BibTeX 引用我们的工作:
|
| 650 |
+
|
| 651 |
+
```bibtex
|
| 652 |
+
@misc{fu2026lanceunifiedmultimodalmodeling,
|
| 653 |
+
title = {Lance: Unified Multimodal Modeling by Multi-Task Synergy},
|
| 654 |
+
author = {Fengyi Fu and Mengqi Huang and Shaojin Wu and Yunsheng Jiang and Yufei Huo and Hao Li and Yinghang Song and Fei Ding and Jianzhu Guo and Qian He and Zheren Fu and Zhendong Mao and Yongdong Zhang},
|
| 655 |
+
year = {2026},
|
| 656 |
+
eprint = {2605.18678},
|
| 657 |
+
archivePrefix = {arXiv},
|
| 658 |
+
primaryClass = {cs.CV},
|
| 659 |
+
url = {https://arxiv.org/abs/2605.18678},
|
| 660 |
+
}
|
| 661 |
+
```
|
| 662 |
+
|
| 663 |
+
## 📞 联系方式
|
| 664 |
+
|
| 665 |
+
如有问题、反馈或合作需求,请联系 [Mengqi Huang](https://corleone-huang.github.io/) 和 [Jianzhu Guo](https://guojianzhu.com/)。
|
Wan2.2_VAE.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:20eb789667fa5e60e7516bf509512f6cb61f01b0aa0695eadaea930c13892b36
|
| 3 |
+
size 2818839170
|
assets/benchmarks/benchmark-overview.png
ADDED
|
Git LFS Details
|
assets/docs/.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
assets/docs/changelog/2026-05-26.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 2026-05-26
|
| 2 |
+
|
| 3 |
+
### Updates
|
| 4 |
+
|
| 5 |
+
- **Gradio demo support:** We have added a Gradio-based demo for running and testing the model through an interactive web interface.
|
| 6 |
+
- **Multimodal inference tasks:** The Gradio interface now supports **Text-to-Video Generation**, **Video Edit**, **Video Understanding**, **Text-to-Image Generation**, **Image Edit**, and **Image Understanding** in a unified UI.
|
| 7 |
+
- **Local deployment:** The Gradio app can be launched locally with the following command, making it easier to try the model without writing additional inference scripts.
|
| 8 |
+
|
| 9 |
+
```bash
|
| 10 |
+
python3 lance_gradio.py --server-name 0.0.0.0 --server-port 7860
|
| 11 |
+
```
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
<p align="center">
|
| 15 |
+
<img src="./demo-05-26.webp" alt="Lance Gradio Demo" width="960">
|
| 16 |
+
<br>
|
| 17 |
+
Unified Multimodal Inference in the Gradio Interface
|
| 18 |
+
</p>
|
assets/docs/changelog/demo-05-26.webp
ADDED
|
Git LFS Details
|
assets/image-editing/image-editing-overview.webp
ADDED
|
Git LFS Details
|
assets/image-understanding/cases/image-understanding-case-01.png
ADDED
|
Git LFS Details
|
assets/image-understanding/cases/image-understanding-case-02.png
ADDED
|
assets/image-understanding/cases/image-understanding-case-03.png
ADDED
|
Git LFS Details
|
assets/image-understanding/cases/image-understanding-case-04.png
ADDED
|
Git LFS Details
|
assets/image-understanding/cases/image-understanding-case-05.png
ADDED
|
Git LFS Details
|
assets/image-understanding/cases/image-understanding-case-06.png
ADDED
|
Git LFS Details
|
assets/intelligent-video/previews/intelligent-video-demo-01.gif
ADDED
|
assets/intelligent-video/previews/intelligent-video-demo-02.gif
ADDED
|
assets/intelligent-video/previews/intelligent-video-demo-03.gif
ADDED
|
assets/intelligent-video/previews/intelligent-video-demo-04.gif
ADDED
|
assets/intelligent-video/videos/intelligent-video-demo-01.mp4
ADDED
|
Binary file (25 kB). View file
|
|
|
assets/intelligent-video/videos/intelligent-video-demo-02.mp4
ADDED
|
Binary file (28 kB). View file
|
|
|
assets/intelligent-video/videos/intelligent-video-demo-03.mp4
ADDED
|
Binary file (30.6 kB). View file
|
|
|
assets/intelligent-video/videos/intelligent-video-demo-04.mp4
ADDED
|
Binary file (27.5 kB). View file
|
|
|
assets/logo/lance-logo.webp
ADDED
|
Git LFS Details
|
assets/multi-turn-editing/previews/multi-turn-editing-demo-01.gif
ADDED
|
Git LFS Details
|
assets/multi-turn-editing/videos/multi-turn-editing-demo-01.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bf8a36b7a94b0d4769d6ce4c5ccad25e3cf5bb22a000f57e4e5cbb05b7854fb4
|
| 3 |
+
size 1915287
|
assets/text-to-image/text-to-image-overview.webp
ADDED
|
Git LFS Details
|
assets/text-to-video/previews/text-to-video-demo-01.gif
ADDED
|
Git LFS Details
|
assets/text-to-video/previews/text-to-video-demo-02.gif
ADDED
|
Git LFS Details
|
assets/text-to-video/previews/text-to-video-demo-03.gif
ADDED
|
Git LFS Details
|
assets/text-to-video/previews/text-to-video-demo-04.gif
ADDED
|
Git LFS Details
|
assets/text-to-video/previews/text-to-video-demo-05.gif
ADDED
|
Git LFS Details
|
assets/text-to-video/previews/text-to-video-demo-06.gif
ADDED
|
Git LFS Details
|
assets/text-to-video/previews/text-to-video-demo-07.gif
ADDED
|
Git LFS Details
|
assets/text-to-video/previews/text-to-video-demo-08.gif
ADDED
|
Git LFS Details
|