NerdOne123 ffy2000 commited on
Commit
114b02e
·
0 Parent(s):

Duplicate from bytedance-research/Lance

Browse files

Co-authored-by: Fengyi <ffy2000@users.noreply.huggingface.co>

This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +90 -0
  2. Lance_3B/generation_config.json +12 -0
  3. Lance_3B/llm_config.json +61 -0
  4. Lance_3B/merges.txt +0 -0
  5. Lance_3B/model.safetensors +3 -0
  6. Lance_3B/tokenizer.json +0 -0
  7. Lance_3B/vocab.json +0 -0
  8. Lance_3B_Video/generation_config.json +12 -0
  9. Lance_3B_Video/llm_config.json +61 -0
  10. Lance_3B_Video/merges.txt +0 -0
  11. Lance_3B_Video/model.safetensors +3 -0
  12. Lance_3B_Video/tokenizer.json +0 -0
  13. Lance_3B_Video/tokenizer_config.json +207 -0
  14. Lance_3B_Video/vocab.json +0 -0
  15. Qwen2.5-VL-ViT/config.json +21 -0
  16. Qwen2.5-VL-ViT/vit.safetensors +3 -0
  17. README.md +725 -0
  18. README_zh.md +709 -0
  19. Wan2.2_VAE.pth +3 -0
  20. assets/benchmarks/benchmark-overview.png +3 -0
  21. assets/image-editing/image-editing-overview.webp +3 -0
  22. assets/image-understanding/cases/image-understanding-case-01.png +3 -0
  23. assets/image-understanding/cases/image-understanding-case-02.png +0 -0
  24. assets/image-understanding/cases/image-understanding-case-03.png +3 -0
  25. assets/image-understanding/cases/image-understanding-case-04.png +3 -0
  26. assets/image-understanding/cases/image-understanding-case-05.png +3 -0
  27. assets/image-understanding/cases/image-understanding-case-06.png +3 -0
  28. assets/intelligent-video/previews/intelligent-video-demo-01.gif +0 -0
  29. assets/intelligent-video/previews/intelligent-video-demo-02.gif +0 -0
  30. assets/intelligent-video/previews/intelligent-video-demo-03.gif +0 -0
  31. assets/intelligent-video/previews/intelligent-video-demo-04.gif +0 -0
  32. assets/intelligent-video/videos/intelligent-video-demo-01.mp4 +0 -0
  33. assets/intelligent-video/videos/intelligent-video-demo-02.mp4 +0 -0
  34. assets/intelligent-video/videos/intelligent-video-demo-03.mp4 +0 -0
  35. assets/intelligent-video/videos/intelligent-video-demo-04.mp4 +0 -0
  36. assets/logo/lance-logo.webp +3 -0
  37. assets/multi-turn-editing/previews/multi-turn-editing-demo-01.gif +3 -0
  38. assets/multi-turn-editing/videos/multi-turn-editing-demo-01.mp4 +3 -0
  39. assets/text-to-image/text-to-image-overview.webp +3 -0
  40. assets/text-to-video/previews/text-to-video-demo-01.gif +3 -0
  41. assets/text-to-video/previews/text-to-video-demo-02.gif +3 -0
  42. assets/text-to-video/previews/text-to-video-demo-03.gif +3 -0
  43. assets/text-to-video/previews/text-to-video-demo-04.gif +3 -0
  44. assets/text-to-video/previews/text-to-video-demo-05.gif +3 -0
  45. assets/text-to-video/previews/text-to-video-demo-06.gif +3 -0
  46. assets/text-to-video/previews/text-to-video-demo-07.gif +3 -0
  47. assets/text-to-video/previews/text-to-video-demo-08.gif +3 -0
  48. assets/text-to-video/videos/text-to-video-demo-01.mp4 +3 -0
  49. assets/text-to-video/videos/text-to-video-demo-02.mp4 +3 -0
  50. assets/text-to-video/videos/text-to-video-demo-03.mp4 +3 -0
.gitattributes ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
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 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "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,725 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model:
4
+ - Qwen/Qwen2.5-VL-3B-Instruct
5
+ pipeline_tag: any-to-any
6
+ library_name: Lance
7
+ tags:
8
+ - multimodal
9
+ - image-generation
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&amp;hl=zh-CN&amp;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&amp;hl=zh-CN&amp;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 &nbsp;&nbsp;
47
+ <sup>✉</sup> Corresponding authors &nbsp;&nbsp;
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
+ ## 🌟 Highlights
61
+
62
+ Lance is a lightweight native unified multimodal model that supports **image and video understanding, generation, and editing** within a single framework.
63
+
64
+ - **Efficient at 3B scale.** With only **3B active parameters**, Lance delivers strong performance across image generation, image editing, and video generation benchmarks.
65
+ - **Trained from scratch.** Lance is built with a staged multi-task recipe and trained entirely from scratch within a **128-A100-GPU** budget.
66
+
67
+ <div align="center">
68
+ <img src="assets/benchmarks/benchmark-overview.png" alt="Lance benchmark overview across image generation, image editing, video generation, and video understanding" width="980">
69
+ </div>
70
+
71
+ ## 🎨 Demo
72
+
73
+ ### Text-to-Video
74
+
75
+ <table>
76
+ <tr>
77
+ <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>
78
+ <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>
79
+ <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>
80
+ <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>
81
+ </tr>
82
+ <tr>
83
+ <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>
84
+ <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>
85
+ <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>
86
+ <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>
87
+ </tr>
88
+ </table>
89
+
90
+ ### Video Editing
91
+
92
+ <table>
93
+ <tr>
94
+ <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>
95
+ <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>
96
+ <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>
97
+ <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>
98
+ </tr>
99
+ <tr>
100
+ <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>
101
+ <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>
102
+ <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>
103
+ <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>
104
+ </tr>
105
+ </table>
106
+
107
+ ### Multi-turn Consistency Editing
108
+
109
+ <div align="center">
110
+ <a href="assets/multi-turn-editing/videos/multi-turn-editing-demo-01.mp4">
111
+ <img src="assets/multi-turn-editing/previews/multi-turn-editing-demo-01.gif" width="100%">
112
+ </a>
113
+ </div>
114
+
115
+ ### Intelligent Video Generation
116
+
117
+ <table>
118
+ <tr>
119
+ <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>
120
+ <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>
121
+ <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>
122
+ <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>
123
+ </tr>
124
+ </table>
125
+
126
+ ### Video Understanding
127
+
128
+ <div align="center">
129
+ <table>
130
+ <tr>
131
+ <td align="left" valign="top" width="33%">
132
+ <a href="assets/video-understanding/videos/video-understanding-vqa-01.mp4">
133
+ <img src="assets/video-understanding/previews/video-understanding-vqa-01.gif" width="100%">
134
+ </a>
135
+ <p><strong>Question:</strong> How many times did the person launch objects on the table? Options: (A) 3 (B) 2 (C) 4</p>
136
+ <p><strong>Response:</strong> (A) 3</p>
137
+ </td>
138
+ <td align="left" valign="top" width="33%">
139
+ <a href="assets/video-understanding/videos/video-understanding-vqa-02.mp4">
140
+ <img src="assets/video-understanding/previews/video-understanding-vqa-02.gif" width="100%">
141
+ </a>
142
+ <p><strong>Question:</strong> The person makes sets of repeated actions. How many distinct repeated actions did the person do? Options: (A) 2 (B) 3 (C) 4</p>
143
+ <p><strong>Response:</strong> (A) 2</p>
144
+ </td>
145
+ <td align="left" valign="top" width="33%">
146
+ <a href="assets/video-understanding/videos/video-understanding-vqa-03.mp4">
147
+ <img src="assets/video-understanding/previews/video-understanding-vqa-03.gif" width="100%">
148
+ </a>
149
+ <p><strong>Question:</strong> In which direction does the purple sphere move in the video? Options: (A) Down and to the right. (B) Up and to the left. (C) Up and to the right. (D) The object is stationary.</p>
150
+ <p><strong>Response:</strong> (A) Down and to the right.</p>
151
+ </td>
152
+ </tr>
153
+ <tr>
154
+ <td align="left" valign="top" width="33%">
155
+ <a href="assets/video-understanding/videos/video-understanding-vqa-04.mp4">
156
+ <img src="assets/video-understanding/previews/video-understanding-vqa-04.gif" width="100%">
157
+ </a>
158
+ <p><strong>Question:</strong> What is the unrealistic phenomenon displayed in the video? Options: (A) The man can manipulate time via phone. (B) Man grabs an object through a phone screen. (C) Chocolate transforms into different objects. (D) Visible means of propulsion enables flight.</p>
159
+ <p><strong>Response:</strong> (B) Man grabs an object through a phone screen.</p>
160
+ </td>
161
+ <td align="left" valign="top" width="33%">
162
+ <a href="assets/video-understanding/videos/video-understanding-caption-short-01.mp4">
163
+ <img src="assets/video-understanding/previews/video-understanding-caption-short-01.gif" width="100%">
164
+ </a>
165
+ <p><strong>Question:</strong> Offer a succinct account of the culinary process shown in this video.</p>
166
+ <p><strong>Response:</strong> Add tomato puree and mix it well with chicken pieces.</p>
167
+ </td>
168
+ <td align="left" valign="top" width="33%">
169
+ <a href="assets/video-understanding/videos/video-understanding-caption-long-01.mp4">
170
+ <img src="assets/video-understanding/previews/video-understanding-caption-long-01.gif" width="100%">
171
+ </a>
172
+ <p><strong>Question:</strong> Provide a detailed description of the given video, capturing its key moments.</p>
173
+ <p><strong>Response:</strong> In a sunlit meadow, a small tortoiseshell butterfly rests on a purple flower. A bee, with black and yellow stripes, lands on the same flower. The butterfly flaps its wings gently, while the bee busies itself, collecting nectar. The flower sways slightly in the breeze. The butterfly then takes off, and the bee follows, both heading to the next flower. The scene is a vivid display of insect interaction in a natural setting, with the colors of the butterfly and the bee contrasting against the green background of the meadow. The video captures this peaceful moment in a short 6-second duration.</p>
174
+ </td>
175
+ </tr>
176
+ </table>
177
+ </div>
178
+
179
+ ### Text-to-Image Generation
180
+
181
+ <div align="center">
182
+ <img src="assets/text-to-image/text-to-image-overview.webp" alt="Lance text-to-image generation examples" width="100%">
183
+ </div>
184
+
185
+ ### Image Editing
186
+
187
+ <div align="center">
188
+ <img src="assets/image-editing/image-editing-overview.webp" alt="Lance image editing examples" width="100%">
189
+ </div>
190
+
191
+ ### Image Understanding
192
+
193
+ <div align="center">
194
+ <table>
195
+ <tr>
196
+ <td align="left" valign="top" width="33%">
197
+ <img src="assets/image-understanding/cases/image-understanding-case-01.png" alt="Pie chart reasoning case" width="100%">
198
+ <p><strong>Question:</strong> Is the largest segment greater than sum of all the other segments?</p>
199
+ <p><strong>Response:</strong> Yes, the largest segment in the pie chart is the blue one, which is the most populous segment.</p>
200
+ </td>
201
+ <td align="left" valign="top" width="33%">
202
+ <img src="assets/image-understanding/cases/image-understanding-case-02.png" alt="Survey chart about border security priorities" width="100%">
203
+ <p><strong>Question:</strong> What percentage of respondents want better border security?</p>
204
+ <p><strong>Response:</strong> 29%</p>
205
+ </td>
206
+ <td align="left" valign="top" width="33%">
207
+ <img src="assets/image-understanding/cases/image-understanding-case-03.png" alt="License plate recognition case" width="100%">
208
+ <p><strong>Question:</strong> What is the license plate number of the car?</p>
209
+ <p><strong>Response:</strong> The license plate number of the car is BX62 BFY.</p>
210
+ </td>
211
+ </tr>
212
+ <tr>
213
+ <td align="left" valign="top" width="33%">
214
+ <img src="assets/image-understanding/cases/image-understanding-case-04.png" alt="Market research chart reasoning case" width="100%">
215
+ <p><strong>Question:</strong> According to the data from the proprietary market research, how much amount was spent on the promotional meetings and events during 1998?</p>
216
+ <p><strong>Response:</strong> According to the data from the proprietary market research, the total amount spent on the promotional meetings and events during 1998 was approximately $1.3 billion.</p>
217
+ </td>
218
+ <td align="left" valign="top" width="33%">
219
+ <img src="assets/image-understanding/cases/image-understanding-case-05.png" alt="Colosseum description case" width="100%">
220
+ <p><strong>Question:</strong> What is the appearance of the Colosseum in Rome, Italy?</p>
221
+ <p><strong>Response:</strong> The Colosseum in Rome, Italy is a magnificent ancient amphitheater made of stone and concrete. It is characterized by its large, arched openings and its semi-circular shape. The Colosseum has been partially restored, and its original color has faded, but the architectural details, like the columns and the semi-circular arches, are still visible. The lighting in the image highlights the grandeur and historical significance of the Colosseum, making it stand out against the backdrop of the evening sky.</p>
222
+ </td>
223
+ <td align="left" valign="top" width="33%">
224
+ <img src="assets/image-understanding/cases/image-understanding-case-06.png" alt="Total solar eclipse case" width="100%">
225
+ <p><strong>Question:</strong> How does a total solar eclipse look like from Earth?</p>
226
+ <p><strong>Response:</strong> A total solar eclipse looks like a dark circle with a bright, white outer edge. This is a result of the Earth's rotation and the Earth's shadow, which partially obscures the sun's light. The bright white edge of the eclipse is caused by the sun's high energy and its interaction with the Earth's atmosphere, while the dark part of the eclipse is due to the Earth's shadow and the surrounding air currents. The solar eclipse's shape, with its bright white edge and dark center, is similar to the shape of a full moon or a dark disk. It is a natural phenomenon that occurs in the atmosphere of the Earth and is an important part of the solar system.</p>
227
+ </td>
228
+ </tr>
229
+ </table>
230
+ </div>
231
+
232
+ ## 🚀 Installation
233
+
234
+ ### Recommended Environment
235
+
236
+ - **Software:** Python 3.10+, CUDA 12.4+ (required)
237
+ - **Hardware:** A GPU with at least 40GB VRAM is required for inference
238
+
239
+ We have tested the following dependency combinations on NVIDIA A100:
240
+
241
+ - PyTorch 2.8.0 + cu126 + flash-attn 2.8.3
242
+ - PyTorch 2.5.1 + cu124 + flash-attn 2.6.3
243
+
244
+ 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.
245
+
246
+ ### Installation Steps
247
+
248
+ First, clone the repository:
249
+
250
+ ```bash
251
+ git clone https://github.com/bytedance/Lance.git
252
+ cd Lance
253
+ ```
254
+
255
+ Then, set up the environment:
256
+
257
+ ```bash
258
+ conda create -n Lance python=3.11 -y
259
+ conda activate Lance
260
+ pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu126
261
+ pip install -r requirements.txt
262
+ pip install flash-attn==2.8.3 --no-build-isolation
263
+ ```
264
+
265
+ > **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.
266
+
267
+ > ```bash
268
+ > pip install --no-cache-dir --no-deps --force-reinstall \
269
+ > "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"
270
+ > ```
271
+
272
+
273
+ Then, download the model weights from [Lance-3B on Hugging Face](https://huggingface.co/bytedance-research/Lance) and place them in the `downloads/` directory:
274
+
275
+
276
+ ```bash
277
+ from huggingface_hub import snapshot_download
278
+
279
+ save_dir = "./downloads/"
280
+ repo_id = "bytedance-research/Lance"
281
+ cache_dir = save_dir + "/cache"
282
+
283
+ snapshot_download(cache_dir=cache_dir,
284
+ local_dir=save_dir,
285
+ repo_id=repo_id,
286
+ local_dir_use_symlinks=False,
287
+ resume_download=True,
288
+ allow_patterns=["*.json", "*.safetensors", "*.bin", "*.py", "*.md", "*.txt","*.pth",],
289
+ )
290
+ ```
291
+
292
+ ## 📚 Usage
293
+
294
+ ### Inference
295
+
296
+ We provide a unified command-line interface for all generation / editing / understanding tasks:
297
+
298
+ #### Option 1: Configure and Run the Unified Script
299
+
300
+ ```bash
301
+ bash inference_lance.sh
302
+ ```
303
+
304
+ - Before running, please configure the inference parameters at the top of `inference_lance.sh`.
305
+ - **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.
306
+ - **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.
307
+
308
+ #### Option 2: Configure and Run the Unified Script
309
+
310
+ We provide task-specific one-click commands for different generation, editing, and understanding tasks.
311
+
312
+ ##### Text-to-Video Generation
313
+
314
+ ```bash
315
+ bash inference_lance.sh \
316
+ --TASK_NAME t2v \
317
+ --MODEL_PATH downloads/Lance_3B_Video \
318
+ --RESOLUTION video_480p \
319
+ --NUM_FRAMES 121 \
320
+ --VIDEO_HEIGHT 480 \
321
+ --VIDEO_WIDTH 848 \
322
+ --SAVE_PATH_GEN results/t2v
323
+ ```
324
+
325
+ ##### Text-to-Image Generation
326
+
327
+ ```bash
328
+ bash inference_lance.sh \
329
+ --TASK_NAME t2i \
330
+ --MODEL_PATH downloads/Lance_3B \
331
+ --RESOLUTION image_768res \
332
+ --VIDEO_HEIGHT 768 \
333
+ --VIDEO_WIDTH 768 \
334
+ --SAVE_PATH_GEN results/t2i
335
+ ```
336
+
337
+ ##### Video Editing
338
+
339
+ ```bash
340
+ bash inference_lance.sh \
341
+ --TASK_NAME video_edit \
342
+ --MODEL_PATH downloads/Lance_3B_Video \
343
+ --RESOLUTION video_480p \
344
+ --SAVE_PATH_GEN results/video_edit
345
+ ```
346
+
347
+ ##### Image Editing
348
+
349
+ ```bash
350
+ bash inference_lance.sh \
351
+ --TASK_NAME image_edit \
352
+ --MODEL_PATH downloads/Lance_3B \
353
+ --RESOLUTION image_768res \
354
+ --SAVE_PATH_GEN results/image_edit
355
+ ```
356
+
357
+ ##### Video Understanding
358
+
359
+ ```bash
360
+ bash inference_lance.sh \
361
+ --TASK_NAME x2t_video \
362
+ --MODEL_PATH downloads/Lance_3B_Video \
363
+ --RESOLUTION video_480p \
364
+ --NUM_FRAMES 50 \
365
+ --SAVE_PATH_GEN results/x2t_video
366
+ ```
367
+
368
+ ##### Image Understanding
369
+
370
+ ```bash
371
+ bash inference_lance.sh \
372
+ --TASK_NAME x2t_image \
373
+ --MODEL_PATH downloads/Lance_3B \
374
+ --RESOLUTION image_768res \
375
+ --SAVE_PATH_GEN results/x2t_image
376
+ ```
377
+
378
+ #### Available Tasks
379
+
380
+ | Task Name | Description | Example JSON |
381
+ |------------------------|--------------------------------------------------|----------------------------------------------|
382
+ | `t2v` | Text-to-Video generation | `config/examples/t2v_example.json` |
383
+ | `t2i` | Text-to-Image generation | `config/examples/t2i_example.json` |
384
+ | `image_edit` | Image editing | `config/examples/image_edit_example.json` |
385
+ | `video_edit` | Video editing | `config/examples/video_edit_example.json` |
386
+ | `x2t_image` | Image understanding | `config/examples/x2t_image_example.json` |
387
+ | `x2t_video` | Video understanding | `config/examples/x2t_video_example.json` |
388
+
389
+ For understanding examples:
390
+
391
+ - `config/examples/x2t_image_example.json`: image understanding examples for visual question answering and image-based reasoning.
392
+ - `config/examples/x2t_video_example.json`: video understanding examples for video question answering and video captioning.
393
+
394
+ #### Parameters
395
+
396
+ You can configure the following hyperparameters at the top of the `inference_lance.sh` script:
397
+
398
+ | Parameter | Default Value | Description |
399
+ | --- | --- | --- |
400
+ | `MODEL_PATH` | `"downloads/lance_3b"` | Path to the downloaded Lance model weights. |
401
+ | `NUM_GPUS` | `1` | Number of GPUs to use for inference. |
402
+ | `VALIDATION_NUM_TIMESTEPS` | `30` | Number of denoising steps (e.g., 30 or 50). |
403
+ | `VALIDATION_TIMESTEP_SHIFT` | `3.5` | Timestep shift parameter for flow matching scheduling. |
404
+ | `CFG_TEXT_SCALE` | `4.0` | Classifier-Free Guidance (CFG) scale for text conditioning. |
405
+ | `VALIDATION_DATA_SEED` | `42` | Random seed for generation reproducibility. |
406
+ | `NUM_FRAMES` | `50` | Number of frames for video generation (Max: 121). *Unused for image tasks.* |
407
+ | `VIDEO_HEIGHT` / `VIDEO_WIDTH`| `768` | Spatial resolution. *Unused for editing tasks (determined by input image/video).* |
408
+ | `RESOLUTION` | `"video_480p"` | Base resolution preset (`image_768res` or `video_480p`). |
409
+
410
+ ### Gradio
411
+ ```python
412
+ python lance_gradio_t2v_v2t.py --gpus 0 --server-port 7860
413
+ ```
414
+
415
+ ### Benchmarks
416
+
417
+ #### DPG-Bench Evaluation
418
+
419
+ <div align="center">
420
+ <table align="center">
421
+ <thead>
422
+ <tr>
423
+ <th align="left">Models</th>
424
+ <th align="center">#&nbsp;Params.</th>
425
+ <th align="center">Global</th>
426
+ <th align="center">Entity</th>
427
+ <th align="center">Attribute</th>
428
+ <th align="center">Relation</th>
429
+ <th align="center">Other</th>
430
+ <th align="center">Overall</th>
431
+ </tr>
432
+ </thead>
433
+ <tbody>
434
+ <tr>
435
+ <td align="center" colspan="8"><i>Generation-only Models</i></td>
436
+ </tr>
437
+ <tr>
438
+ <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>
439
+ </tr>
440
+ <tr>
441
+ <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>
442
+ </tr>
443
+ <tr>
444
+ <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>
445
+ </tr>
446
+ <tr>
447
+ <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>
448
+ </tr>
449
+ <tr>
450
+ <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>
451
+ </tr>
452
+ <tr>
453
+ <td align="center" colspan="8"><i>Unified Models</i></td>
454
+ </tr>
455
+ <tr>
456
+ <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>
457
+ </tr>
458
+ <tr>
459
+ <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>
460
+ </tr>
461
+ <tr>
462
+ <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>
463
+ </tr>
464
+ <tr>
465
+ <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>
466
+ </tr>
467
+ <tr>
468
+ <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>
469
+ </tr>
470
+ <tr>
471
+ <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>
472
+ </tr>
473
+ <tr>
474
+ <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>
475
+ </tr>
476
+ <tr bgcolor="#f4e6ff">
477
+ <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>
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
+ #### GenEval Evaluation
486
+
487
+ <div align="center">
488
+ <table align="center">
489
+ <thead>
490
+ <tr>
491
+ <th align="left">Models</th>
492
+ <th align="center">#&nbsp;Params.</th>
493
+ <th align="center">1-Obj.</th>
494
+ <th align="center">2-Obj.</th>
495
+ <th align="center">Count</th>
496
+ <th align="center">Colors</th>
497
+ <th align="center">Position</th>
498
+ <th align="center">Attr.</th>
499
+ <th align="center">Overall</th>
500
+ </tr>
501
+ </thead>
502
+ <tbody>
503
+ <tr>
504
+ <td align="center" colspan="9"><i>Generation-only Models</i></td>
505
+ </tr>
506
+ <tr>
507
+ <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>
508
+ </tr>
509
+ <tr>
510
+ <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>
511
+ </tr>
512
+ <tr>
513
+ <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>
514
+ </tr>
515
+ <tr>
516
+ <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>
517
+ </tr>
518
+ <tr>
519
+ <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>
520
+ </tr>
521
+ <tr>
522
+ <td align="center" colspan="9"><i>Unified Models</i></td>
523
+ </tr>
524
+ <tr>
525
+ <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>
526
+ </tr>
527
+ <tr>
528
+ <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>
529
+ </tr>
530
+ <tr>
531
+ <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>
532
+ </tr>
533
+ <tr>
534
+ <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>
535
+ </tr>
536
+ <tr>
537
+ <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>
538
+ </tr>
539
+ <tr>
540
+ <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>
541
+ </tr>
542
+ <tr>
543
+ <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>
544
+ </tr>
545
+ <tr>
546
+ <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>
547
+ </tr>
548
+ <tr bgcolor="#f4e6ff">
549
+ <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>
550
+ </tr>
551
+ </tbody>
552
+ </table>
553
+ </div>
554
+
555
+ <p align="center"><em><sup>†</sup> indicates methods that use LLM rewriters for prompt rewriting before generation.</em></p>
556
+
557
+ #### GEdit-Bench Evaluation
558
+
559
+ <div align="center">
560
+ <table align="center">
561
+ <thead>
562
+ <tr>
563
+ <th align="left">Models</th>
564
+ <th align="center">#&nbsp;Params.</th>
565
+ <th align="center">BC</th>
566
+ <th align="center">CA</th>
567
+ <th align="center">MM</th>
568
+ <th align="center">MC</th>
569
+ <th align="center">PB</th>
570
+ <th align="center">ST</th>
571
+ <th align="center">SA</th>
572
+ <th align="center">SR</th>
573
+ <th align="center">SRp</th>
574
+ <th align="center">TM</th>
575
+ <th align="center">TT</th>
576
+ <th align="center">Avg/G_O</th>
577
+ </tr>
578
+ </thead>
579
+ <tbody>
580
+ <tr>
581
+ <td align="center" colspan="14"><i>Generation-only Models</i></td>
582
+ </tr>
583
+ <tr>
584
+ <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>
585
+ </tr>
586
+ <tr>
587
+ <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>
588
+ </tr>
589
+ <tr>
590
+ <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>
591
+ </tr>
592
+ <tr>
593
+ <td align="center" colspan="14"><i>Unified Models</i></td>
594
+ </tr>
595
+ <tr>
596
+ <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>
597
+ </tr>
598
+ <tr>
599
+ <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>
600
+ </tr>
601
+ <tr>
602
+ <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>
603
+ </tr>
604
+ <tr>
605
+ <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>
606
+ </tr>
607
+ <tr>
608
+ <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>
609
+ </tr>
610
+ <tr bgcolor="#f4e6ff">
611
+ <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>
612
+ </tr>
613
+ </tbody>
614
+ </table>
615
+ </div>
616
+
617
+ #### VBench Evaluation (Video Generation)
618
+
619
+ <div align="center">
620
+ <table align="center">
621
+ <thead>
622
+ <tr>
623
+ <th align="left">Type</th>
624
+ <th align="left">Model</th>
625
+ <th align="center">#&nbsp;Params.</th>
626
+ <th align="center">Total Score ↑</th>
627
+ </tr>
628
+ </thead>
629
+ <tbody>
630
+ <tr>
631
+ <td align="center" rowspan="12"><i>Gen. Only</i></td>
632
+ <td align="left">ModelScope</td><td align="center">1.7B</td><td align="center">75.75</td>
633
+ </tr>
634
+ <tr>
635
+ <td align="left">LaVie</td><td align="center">3B</td><td align="center">77.08</td>
636
+ </tr>
637
+ <tr>
638
+ <td align="left">Show-1</td><td align="center">6B</td><td align="center">78.93</td>
639
+ </tr>
640
+ <tr>
641
+ <td align="left">AnimateDiff-V2</td><td align="center">-</td><td align="center">80.27</td>
642
+ </tr>
643
+ <tr>
644
+ <td align="left">VideoCrafter-2.0</td><td align="center">-</td><td align="center">80.44</td>
645
+ </tr>
646
+ <tr>
647
+ <td align="left">CogVideoX</td><td align="center">5B</td><td align="center">81.61</td>
648
+ </tr>
649
+ <tr>
650
+ <td align="left">Kling</td><td align="center">-</td><td align="center">81.85</td>
651
+ </tr>
652
+ <tr>
653
+ <td align="left">Open-Sora-2.0</td><td align="center">-</td><td align="center">81.71</td>
654
+ </tr>
655
+ <tr>
656
+ <td align="left">Gen-3</td><td align="center">-</td><td align="center">82.32</td>
657
+ </tr>
658
+ <tr>
659
+ <td align="left">Step-Video-T2V</td><td align="center">30B</td><td align="center">81.83</td>
660
+ </tr>
661
+ <tr>
662
+ <td align="left">Hunyuan Video</td><td align="center">-</td><td align="center">83.43</td>
663
+ </tr>
664
+ <tr>
665
+ <td align="left">Wan2.1-T2V</td><td align="center">14B</td><td align="center">83.69</td>
666
+ </tr>
667
+ <tr>
668
+ <td align="center" rowspan="6"><i>Unified</i></td>
669
+ <td align="left">HaproOmni</td><td align="center">7B</td><td align="center">78.10</td>
670
+ </tr>
671
+ <tr>
672
+ <td align="left">Emu3</td><td align="center">8B</td><td align="center">80.96</td>
673
+ </tr>
674
+ <tr>
675
+ <td align="left">VILA-U</td><td align="center">7B</td><td align="center">74.01</td>
676
+ </tr>
677
+ <tr>
678
+ <td align="left">Show-o2</td><td align="center">2B</td><td align="center">81.34</td>
679
+ </tr>
680
+ <tr>
681
+ <td align="left">TUNA</td><td align="center">1.5B</td><td align="center"><u>84.06</u></td>
682
+ </tr>
683
+ <tr bgcolor="#f4e6ff">
684
+ <td align="left">🌟 <b>Lance (Ours)</b></td><td align="center"><b>3B</b></td><td align="center"><b>85.11</b></td>
685
+ </tr>
686
+ </tbody>
687
+ </table>
688
+ </div>
689
+
690
+ #### Running Benchmarks
691
+
692
+ Ready-to-run benchmark scripts are provided under `benchmarks/`:
693
+
694
+ | Benchmark | Modality | Script |
695
+ |------------------------|----------|---------------------------------------------------------------|
696
+ | GenEVAL (image gen) | Image | `benchmarks/image_gen/GenEVAL/sample_GenEVAL.sh` |
697
+ | DPG (image gen) | Image | `benchmarks/image_gen/DPG/sample_DPG.sh` |
698
+ | GEdit (image edit) | Image | `benchmarks/image_gen/GEdit/sample_GEdit.sh` |
699
+ | VBench (video gen) | Video | `benchmarks/video_gen/Vbench/sample_vbench.sh` |
700
+
701
+
702
+ ## 📄 License
703
+
704
+ Copyright 2025 Bytedance Ltd. and/or its affiliates.
705
+
706
+ ## 🙏 Acknowledgements
707
+
708
+ 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.
709
+
710
+ ## 💖 Citation
711
+
712
+ If you find **Lance** useful for your project or research, welcome to 🌟 this repo and cite our work using the following BibTeX:
713
+
714
+ ```bibtex
715
+ @misc{lance2026,
716
+ title = {Lance: Unified Multimodal Modeling by Multi-Task Synergy},
717
+ author = {Fengyi Fu and Mengqi Huang and Shaojin Wu and Yunsheng Jiang and Yufei Huo and Jianzhu Guo and Hao Li and Yinghang Song and Fei Ding and Qian He and Zheren Fu and Zhendong Mao and Yongdong Zhang},
718
+ year = {2026},
719
+ note = {Manuscript}
720
+ }
721
+ ```
722
+
723
+ ## 📞 Contact
724
+
725
+ 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,709 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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&amp;hl=zh-CN&amp;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&amp;hl=zh-CN&amp;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> 共同一作 &nbsp;&nbsp;
32
+ <sup>✉</sup> 通讯作者 &nbsp;&nbsp;
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
+
46
+ Lance 是一个轻量级、原生统一的多模态模型,在单一框架下同时支持 **图像与视频的理解、生成和编辑**。
47
+
48
+ - **3B 规模高效强大。** 仅使用 **3B active parameters**,Lance 即可在图像生成、图像编辑和视频生成等基准上取得强劲表现。
49
+ - **从零训练。** Lance 采用分阶段多任务训练配方,在 **128 张 A100 GPU** 的预算内从零完成训练。
50
+
51
+ <div align="center">
52
+ <img src="assets/benchmarks/benchmark-overview.png" alt="Lance benchmark overview across image generation, image editing, video generation, and video understanding" width="980">
53
+ </div>
54
+
55
+ ## 🎨 演示
56
+
57
+ ### 文生视频
58
+
59
+ <table>
60
+ <tr>
61
+ <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>
62
+ <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>
63
+ <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>
64
+ <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>
65
+ </tr>
66
+ <tr>
67
+ <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>
68
+ <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>
69
+ <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>
70
+ <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>
71
+ </tr>
72
+ </table>
73
+
74
+ ### 视频编辑
75
+
76
+ <table>
77
+ <tr>
78
+ <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>
79
+ <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>
80
+ <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>
81
+ <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>
82
+ </tr>
83
+ <tr>
84
+ <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>
85
+ <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>
86
+ <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>
87
+ <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>
88
+ </tr>
89
+ </table>
90
+
91
+ ### 多轮一致性编辑
92
+
93
+ <div align="center">
94
+ <a href="assets/multi-turn-editing/videos/multi-turn-editing-demo-01.mp4">
95
+ <img src="assets/multi-turn-editing/previews/multi-turn-editing-demo-01.gif" width="100%">
96
+ </a>
97
+ </div>
98
+
99
+ ### 智能视频生成
100
+
101
+ <table>
102
+ <tr>
103
+ <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>
104
+ <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>
105
+ <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>
106
+ <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>
107
+ </tr>
108
+ </table>
109
+
110
+ ### 视频理解
111
+
112
+ <div align="center">
113
+ <table>
114
+ <tr>
115
+ <td align="left" valign="top" width="33%">
116
+ <a href="assets/video-understanding/videos/video-understanding-vqa-01.mp4">
117
+ <img src="assets/video-understanding/previews/video-understanding-vqa-01.gif" width="100%">
118
+ </a>
119
+ <p><strong>问题:</strong> How many times did the person launch objects on the table? Options: (A) 3 (B) 2 (C) 4</p>
120
+ <p><strong>回答:</strong> (A) 3</p>
121
+ </td>
122
+ <td align="left" valign="top" width="33%">
123
+ <a href="assets/video-understanding/videos/video-understanding-vqa-02.mp4">
124
+ <img src="assets/video-understanding/previews/video-understanding-vqa-02.gif" width="100%">
125
+ </a>
126
+ <p><strong>问题:</strong> The person makes sets of repeated actions. How many distinct repeated actions did the person do? Options: (A) 2 (B) 3 (C) 4</p>
127
+ <p><strong>回答:</strong> (A) 2</p>
128
+ </td>
129
+ <td align="left" valign="top" width="33%">
130
+ <a href="assets/video-understanding/videos/video-understanding-vqa-03.mp4">
131
+ <img src="assets/video-understanding/previews/video-understanding-vqa-03.gif" width="100%">
132
+ </a>
133
+ <p><strong>问题:</strong> In which direction does the purple sphere move in the video? Options: (A) Down and to the right. (B) Up and to the left. (C) Up and to the right. (D) The object is stationary.</p>
134
+ <p><strong>回答:</strong> (A) Down and to the right.</p>
135
+ </td>
136
+ </tr>
137
+ <tr>
138
+ <td align="left" valign="top" width="33%">
139
+ <a href="assets/video-understanding/videos/video-understanding-vqa-04.mp4">
140
+ <img src="assets/video-understanding/previews/video-understanding-vqa-04.gif" width="100%">
141
+ </a>
142
+ <p><strong>问题:</strong> What is the unrealistic phenomenon displayed in the video? Options: (A) The man can manipulate time via phone. (B) Man grabs an object through a phone screen. (C) Chocolate transforms into different objects. (D) Visible means of propulsion enables flight.</p>
143
+ <p><strong>回答:</strong> (B) Man grabs an object through a phone screen.</p>
144
+ </td>
145
+ <td align="left" valign="top" width="33%">
146
+ <a href="assets/video-understanding/videos/video-understanding-caption-short-01.mp4">
147
+ <img src="assets/video-understanding/previews/video-understanding-caption-short-01.gif" width="100%">
148
+ </a>
149
+ <p><strong>问题:</strong> Offer a succinct account of the culinary process shown in this video.</p>
150
+ <p><strong>回答:</strong> Add tomato puree and mix it well with chicken pieces.</p>
151
+ </td>
152
+ <td align="left" valign="top" width="33%">
153
+ <a href="assets/video-understanding/videos/video-understanding-caption-long-01.mp4">
154
+ <img src="assets/video-understanding/previews/video-understanding-caption-long-01.gif" width="100%">
155
+ </a>
156
+ <p><strong>问题:</strong> Provide a detailed description of the given video, capturing its key moments.</p>
157
+ <p><strong>回答:</strong> In a sunlit meadow, a small tortoiseshell butterfly rests on a purple flower. A bee, with black and yellow stripes, lands on the same flower. The butterfly flaps its wings gently, while the bee busies itself, collecting nectar. The flower sways slightly in the breeze. The butterfly then takes off, and the bee follows, both heading to the next flower. The scene is a vivid display of insect interaction in a natural setting, with the colors of the butterfly and the bee contrasting against the green background of the meadow. The video captures this peaceful moment in a short 6-second duration.</p>
158
+ </td>
159
+ </tr>
160
+ </table>
161
+ </div>
162
+
163
+ ### 文生图
164
+
165
+ <div align="center">
166
+ <img src="assets/text-to-image/text-to-image-overview.webp" alt="Lance text-to-image generation examples" width="100%">
167
+ </div>
168
+
169
+ ### 图像编辑
170
+
171
+ <div align="center">
172
+ <img src="assets/image-editing/image-editing-overview.webp" alt="Lance image editing examples" width="100%">
173
+ </div>
174
+
175
+ ### 图像理解
176
+
177
+ <div align="center">
178
+ <table>
179
+ <tr>
180
+ <td align="left" valign="top" width="33%">
181
+ <img src="assets/image-understanding/cases/image-understanding-case-01.png" alt="Pie chart reasoning case" width="100%">
182
+ <p><strong>问题:</strong> Is the largest segment greater than sum of all the other segments?</p>
183
+ <p><strong>回答:</strong> Yes, the largest segment in the pie chart is the blue one, which is the most populous segment.</p>
184
+ </td>
185
+ <td align="left" valign="top" width="33%">
186
+ <img src="assets/image-understanding/cases/image-understanding-case-02.png" alt="Survey chart about border security priorities" width="100%">
187
+ <p><strong>问题:</strong> What percentage of respondents want better border security?</p>
188
+ <p><strong>回答:</strong> 29%</p>
189
+ </td>
190
+ <td align="left" valign="top" width="33%">
191
+ <img src="assets/image-understanding/cases/image-understanding-case-03.png" alt="License plate recognition case" width="100%">
192
+ <p><strong>问题:</strong> What is the license plate number of the car?</p>
193
+ <p><strong>回答:</strong> The license plate number of the car is BX62 BFY.</p>
194
+ </td>
195
+ </tr>
196
+ <tr>
197
+ <td align="left" valign="top" width="33%">
198
+ <img src="assets/image-understanding/cases/image-understanding-case-04.png" alt="Market research chart reasoning case" width="100%">
199
+ <p><strong>问题:</strong> According to the data from the proprietary market research, how much amount was spent on the promotional meetings and events during 1998?</p>
200
+ <p><strong>回答:</strong> According to the data from the proprietary market research, the total amount spent on the promotional meetings and events during 1998 was approximately $1.3 billion.</p>
201
+ </td>
202
+ <td align="left" valign="top" width="33%">
203
+ <img src="assets/image-understanding/cases/image-understanding-case-05.png" alt="Colosseum description case" width="100%">
204
+ <p><strong>问题:</strong> What is the appearance of the Colosseum in Rome, Italy?</p>
205
+ <p><strong>回答:</strong> The Colosseum in Rome, Italy is a magnificent ancient amphitheater made of stone and concrete. It is characterized by its large, arched openings and its semi-circular shape. The Colosseum has been partially restored, and its original color has faded, but the architectural details, like the columns and the semi-circular arches, are still visible. The lighting in the image highlights the grandeur and historical significance of the Colosseum, making it stand out against the backdrop of the evening sky.</p>
206
+ </td>
207
+ <td align="left" valign="top" width="33%">
208
+ <img src="assets/image-understanding/cases/image-understanding-case-06.png" alt="Total solar eclipse case" width="100%">
209
+ <p><strong>问题:</strong> How does a total solar eclipse look like from Earth?</p>
210
+ <p><strong>回答:</strong> A total solar eclipse looks like a dark circle with a bright, white outer edge. This is a result of the Earth's rotation and the Earth's shadow, which partially obscures the sun's light. The bright white edge of the eclipse is caused by the sun's high energy and its interaction with the Earth's atmosphere, while the dark part of the eclipse is due to the Earth's shadow and the surrounding air currents. The solar eclipse's shape, with its bright white edge and dark center, is similar to the shape of a full moon or a dark disk. It is a natural phenomenon that occurs in the atmosphere of the Earth and is an important part of the solar system.</p>
211
+ </td>
212
+ </tr>
213
+ </table>
214
+ </div>
215
+
216
+ ## 🚀 安装
217
+
218
+ ### 推荐环境
219
+
220
+ - **软件环境:** Python 3.10+,CUDA 12.4+(必需)
221
+ - **硬件环境:** 推理至少需要一张显存不低于 40GB 的 GPU
222
+
223
+ 我们在 NVIDIA A100 上测试通过了以下依赖组合:
224
+
225
+ - PyTorch 2.8.0 + cu126 + flash-attn 2.8.3
226
+ - PyTorch 2.5.1 + cu124 + flash-attn 2.6.3
227
+
228
+ 默认安装命令使用 PyTorch 2.8.0 + cu126 环境。对于其他 GPU 型号,请根据驱动版本、CUDA runtime、Python 版本和 GPU 架构自行选择并验证匹配的 PyTorch 与 `flash-attn` 版本组合。
229
+
230
+
231
+ ### 安装步骤
232
+
233
+ 首先,克隆代码仓库:
234
+
235
+ ```bash
236
+ git clone https://github.com/bytedance/Lance.git
237
+ cd Lance
238
+ ```
239
+
240
+ 然后,配置环境:
241
+
242
+ ```bash
243
+ conda create -n Lance python=3.11 -y
244
+ conda activate Lance
245
+ pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu126
246
+ pip install -r requirements.txt
247
+ pip install flash-attn==2.8.3 --no-build-isolation
248
+ ```
249
+
250
+ > **注意:** 如果从源码安装 `flash-attn` 失败,可以改为安装预编译 wheel。下面的 wheelhouse 来自第三方仓库,仅作为**参考提供**;请在安装前确认 wheel 与当前 Python、PyTorch 和 CUDA 版本匹配:
251
+ >
252
+ > ```bash
253
+ > pip install --no-cache-dir --no-deps --force-reinstall \
254
+ > "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"
255
+ > ```
256
+
257
+ 然后,从 [Hugging Face 上的 Lance-3B](https://huggingface.co/bytedance-research/Lance) 下载所需的全部模型权重,并放置到 `downloads/` 目录下:
258
+
259
+ ```bash
260
+ from huggingface_hub import snapshot_download
261
+
262
+ save_dir = "./downloads/"
263
+ repo_id = "bytedance-research/Lance"
264
+ cache_dir = save_dir + "/cache"
265
+
266
+ snapshot_download(cache_dir=cache_dir,
267
+ local_dir=save_dir,
268
+ repo_id=repo_id,
269
+ local_dir_use_symlinks=False,
270
+ resume_download=True,
271
+ allow_patterns=["*.json", "*.safetensors", "*.bin", "*.py", "*.md", "*.txt","*.pth",],
272
+ )
273
+ ```
274
+
275
+ ## 📚 使用方法
276
+
277
+ ### 推理
278
+
279
+ Lance 为生成、编辑和理解任务提供了统一的命令行入口:
280
+
281
+ #### 方式一:配置并运行统一推理脚本
282
+
283
+ ```bash
284
+ bash inference_lance.sh
285
+ ```
286
+
287
+ - 运行前,请先在 `inference_lance.sh` 顶部配置推理参数。
288
+ - **支持任务:** `t2i`、`t2v`、`image_edit`、`video_edit`、`x2t_image` 和 `x2t_video`。你也可以在 `inference_lance.py` 中修改 `TASK_DEFAULT_CONFIGS`,自定义每个任务默认使用的数据样例。
289
+ - **注意:** 对于所有任务,建议在编写输入 prompt 时参考提供示例中的 `prompt` 格式,这通常有助于获得更好的生成效果。
290
+
291
+
292
+ #### Option 2: 运行任务专用一键脚本
293
+
294
+ 我们提供了面向不同生成、编辑和理解任务的一键启动命令,便于快速运行指定任务类型。
295
+
296
+ ##### 文本-视频生成
297
+
298
+ ```bash
299
+ bash inference_lance.sh \
300
+ --TASK_NAME t2v \
301
+ --MODEL_PATH downloads/Lance_3B_Video \
302
+ --RESOLUTION video_480p \
303
+ --NUM_FRAMES 121 \
304
+ --VIDEO_HEIGHT 480 \
305
+ --VIDEO_WIDTH 848 \
306
+ --SAVE_PATH_GEN results/t2v_121f
307
+ ```
308
+
309
+ ##### 文本-图像生成
310
+
311
+ ```bash
312
+ bash inference_lance.sh \
313
+ --TASK_NAME t2i \
314
+ --MODEL_PATH downloads/Lance_3B \
315
+ --RESOLUTION image_768res \
316
+ --VIDEO_HEIGHT 768 \
317
+ --VIDEO_WIDTH 768 \
318
+ --SAVE_PATH_GEN results/t2i
319
+ ```
320
+
321
+ ##### 视频编辑
322
+
323
+ ```bash
324
+ bash inference_lance.sh \
325
+ --TASK_NAME video_edit \
326
+ --MODEL_PATH downloads/Lance_3B_Video \
327
+ --RESOLUTION video_480p \
328
+ --SAVE_PATH_GEN results/video_edit
329
+ ```
330
+
331
+ ##### 图像编辑
332
+
333
+ ```bash
334
+ bash inference_lance.sh \
335
+ --TASK_NAME image_edit \
336
+ --MODEL_PATH downloads/Lance_3B \
337
+ --RESOLUTION image_768res \
338
+ --SAVE_PATH_GEN results/image_edit
339
+ ```
340
+
341
+ ##### 视频理解
342
+
343
+ ```bash
344
+ bash inference_lance.sh \
345
+ --TASK_NAME x2t_video \
346
+ --MODEL_PATH downloads/Lance_3B_Video \
347
+ --RESOLUTION video_480p \
348
+ --NUM_FRAMES 50 \
349
+ --SAVE_PATH_GEN results/x2t_video
350
+ ```
351
+
352
+ ##### 图像理解
353
+
354
+ ```bash
355
+ bash inference_lance.sh \
356
+ --TASK_NAME x2t_image \
357
+ --MODEL_PATH downloads/Lance_3B \
358
+ --RESOLUTION image_768res \
359
+ --SAVE_PATH_GEN results/x2t_image
360
+ ```
361
+
362
+ #### 可用任务
363
+
364
+ | 任务名 | 说明 | 示例 JSON |
365
+ |------------------------|--------------------------------------------------|----------------------------------------------|
366
+ | `t2v` | 文生视频 | `config/examples/t2v_example.json` |
367
+ | `t2i` | 文生图 | `config/examples/t2i_example.json` |
368
+ | `image_edit` | 图像编辑 | `config/examples/image_edit_example.json` |
369
+ | `video_edit` | 视频编辑 | `config/examples/video_edit_example.json` |
370
+ | `x2t_image` | 图像理解 | `config/examples/x2t_image_example.json` |
371
+ | `x2t_video` | 视频理解 | `config/examples/x2t_video_example.json` |
372
+
373
+ 关于理解任务的示例文件:
374
+
375
+ - `config/examples/x2t_image_example.json`:用于图像理解示例,包括视觉问答和基于图像的推理。
376
+ - `config/examples/x2t_video_example.json`:用于视频理解示例,包括视频问答和视频描述。
377
+
378
+ #### 参数说明
379
+
380
+ 你可以在 `inference_lance.sh` 顶部配置以下超参数:
381
+
382
+ | 参数 | 默认值 | 说明 |
383
+ | --- | --- | --- |
384
+ | `MODEL_PATH` | `"downloads/lance_3b"` | 下载后的 Lance 模型权重路径。 |
385
+ | `NUM_GPUS` | `1` | 用于推理的 GPU 数量。 |
386
+ | `VALIDATION_NUM_TIMESTEPS` | `30` | 去噪步数(例如 30 或 50)。 |
387
+ | `VALIDATION_TIMESTEP_SHIFT` | `3.5` | Flow matching 调度中的 timestep shift 参数。 |
388
+ | `CFG_TEXT_SCALE` | `4.0` | 文本条件的 CFG(Classifier-Free Guidance)系数。 |
389
+ | `VALIDATION_DATA_SEED` | `42` | 用于复现实验的随机种子。 |
390
+ | `NUM_FRAMES` | `50` | 视频生成帧数(最大 121)。*图像任务不使用该参数。* |
391
+ | `VIDEO_HEIGHT` / `VIDEO_WIDTH`| `768` | ���间分辨率。*编辑任务不使用该参数(由输入图像/视频决定)。* |
392
+ | `RESOLUTION` | `"video_480p"` | 基础分辨率预设(如 `image_768res` 或 `video_480p`)。 |
393
+
394
+ ### Gradio
395
+ ```python
396
+ python lance_gradio_t2v_v2t.py --gpus 0 --server-port 7860
397
+ ```
398
+
399
+ ### 基准评测
400
+
401
+ #### DPG-Bench 评测
402
+
403
+ <div align="center">
404
+ <table align="center">
405
+ <thead>
406
+ <tr>
407
+ <th align="left">模型</th>
408
+ <th align="center">#&nbsp;Params.</th>
409
+ <th align="center">Global</th>
410
+ <th align="center">Entity</th>
411
+ <th align="center">Attribute</th>
412
+ <th align="center">Relation</th>
413
+ <th align="center">Other</th>
414
+ <th align="center">Overall</th>
415
+ </tr>
416
+ </thead>
417
+ <tbody>
418
+ <tr>
419
+ <td align="center" colspan="8"><i>仅生成模型</i></td>
420
+ </tr>
421
+ <tr>
422
+ <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>
423
+ </tr>
424
+ <tr>
425
+ <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>
426
+ </tr>
427
+ <tr>
428
+ <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>
429
+ </tr>
430
+ <tr>
431
+ <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>
432
+ </tr>
433
+ <tr>
434
+ <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>
435
+ </tr>
436
+ <tr>
437
+ <td align="center" colspan="8"><i>统一模型</i></td>
438
+ </tr>
439
+ <tr>
440
+ <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>
441
+ </tr>
442
+ <tr>
443
+ <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>
444
+ </tr>
445
+ <tr>
446
+ <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>
447
+ </tr>
448
+ <tr>
449
+ <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>
450
+ </tr>
451
+ <tr>
452
+ <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>
453
+ </tr>
454
+ <tr>
455
+ <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>
456
+ </tr>
457
+ <tr>
458
+ <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>
459
+ </tr>
460
+ <tr bgcolor="#f4e6ff">
461
+ <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>
462
+ </tr>
463
+ </tbody>
464
+ </table>
465
+ </div>
466
+
467
+ <p align="center"><em><sup>†</sup> 表示该方法在生成前使用 LLM rewriter 进行 prompt rewriting。</em></p>
468
+
469
+ #### GenEval 评测
470
+
471
+ <div align="center">
472
+ <table align="center">
473
+ <thead>
474
+ <tr>
475
+ <th align="left">模型</th>
476
+ <th align="center">#&nbsp;Params.</th>
477
+ <th align="center">1-Obj.</th>
478
+ <th align="center">2-Obj.</th>
479
+ <th align="center">Count</th>
480
+ <th align="center">Colors</th>
481
+ <th align="center">Position</th>
482
+ <th align="center">Attr.</th>
483
+ <th align="center">Overall</th>
484
+ </tr>
485
+ </thead>
486
+ <tbody>
487
+ <tr>
488
+ <td align="center" colspan="9"><i>仅生成模型</i></td>
489
+ </tr>
490
+ <tr>
491
+ <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>
492
+ </tr>
493
+ <tr>
494
+ <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>
495
+ </tr>
496
+ <tr>
497
+ <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>
498
+ </tr>
499
+ <tr>
500
+ <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>
501
+ </tr>
502
+ <tr>
503
+ <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>
504
+ </tr>
505
+ <tr>
506
+ <td align="center" colspan="9"><i>统一模型</i></td>
507
+ </tr>
508
+ <tr>
509
+ <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>
510
+ </tr>
511
+ <tr>
512
+ <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>
513
+ </tr>
514
+ <tr>
515
+ <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>
516
+ </tr>
517
+ <tr>
518
+ <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>
519
+ </tr>
520
+ <tr>
521
+ <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>
522
+ </tr>
523
+ <tr>
524
+ <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>
525
+ </tr>
526
+ <tr>
527
+ <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>
528
+ </tr>
529
+ <tr>
530
+ <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>
531
+ </tr>
532
+ <tr bgcolor="#f4e6ff">
533
+ <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>
534
+ </tr>
535
+ </tbody>
536
+ </table>
537
+ </div>
538
+
539
+ <p align="center"><em><sup>†</sup> 表示该方法在生成前使用 LLM rewriter 进行 prompt rewriting。</em></p>
540
+
541
+ #### GEdit-Bench 评测
542
+
543
+ <div align="center">
544
+ <table align="center">
545
+ <thead>
546
+ <tr>
547
+ <th align="left">模型</th>
548
+ <th align="center">#&nbsp;Params.</th>
549
+ <th align="center">BC</th>
550
+ <th align="center">CA</th>
551
+ <th align="center">MM</th>
552
+ <th align="center">MC</th>
553
+ <th align="center">PB</th>
554
+ <th align="center">ST</th>
555
+ <th align="center">SA</th>
556
+ <th align="center">SR</th>
557
+ <th align="center">SRp</th>
558
+ <th align="center">TM</th>
559
+ <th align="center">TT</th>
560
+ <th align="center">Avg/G_O</th>
561
+ </tr>
562
+ </thead>
563
+ <tbody>
564
+ <tr>
565
+ <td align="center" colspan="14"><i>仅生成模型</i></td>
566
+ </tr>
567
+ <tr>
568
+ <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>
569
+ </tr>
570
+ <tr>
571
+ <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>
572
+ </tr>
573
+ <tr>
574
+ <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>
575
+ </tr>
576
+ <tr>
577
+ <td align="center" colspan="14"><i>统一模型</i></td>
578
+ </tr>
579
+ <tr>
580
+ <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>
581
+ </tr>
582
+ <tr>
583
+ <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>
584
+ </tr>
585
+ <tr>
586
+ <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>
587
+ </tr>
588
+ <tr>
589
+ <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>
590
+ </tr>
591
+ <tr>
592
+ <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>
593
+ </tr>
594
+ <tr bgcolor="#f4e6ff">
595
+ <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>
596
+ </tr>
597
+ </tbody>
598
+ </table>
599
+ </div>
600
+
601
+ #### VBench 评测(视频生成)
602
+
603
+ <div align="center">
604
+ <table align="center">
605
+ <thead>
606
+ <tr>
607
+ <th align="left">类型</th>
608
+ <th align="left">Model</th>
609
+ <th align="center">#&nbsp;Params.</th>
610
+ <th align="center">Total Score ↑</th>
611
+ </tr>
612
+ </thead>
613
+ <tbody>
614
+ <tr>
615
+ <td align="center" rowspan="12"><i>Gen. Only</i></td>
616
+ <td align="left">ModelScope</td><td align="center">1.7B</td><td align="center">75.75</td>
617
+ </tr>
618
+ <tr>
619
+ <td align="left">LaVie</td><td align="center">3B</td><td align="center">77.08</td>
620
+ </tr>
621
+ <tr>
622
+ <td align="left">Show-1</td><td align="center">6B</td><td align="center">78.93</td>
623
+ </tr>
624
+ <tr>
625
+ <td align="left">AnimateDiff-V2</td><td align="center">-</td><td align="center">80.27</td>
626
+ </tr>
627
+ <tr>
628
+ <td align="left">VideoCrafter-2.0</td><td align="center">-</td><td align="center">80.44</td>
629
+ </tr>
630
+ <tr>
631
+ <td align="left">CogVideoX</td><td align="center">5B</td><td align="center">81.61</td>
632
+ </tr>
633
+ <tr>
634
+ <td align="left">Kling</td><td align="center">-</td><td align="center">81.85</td>
635
+ </tr>
636
+ <tr>
637
+ <td align="left">Open-Sora-2.0</td><td align="center">-</td><td align="center">81.71</td>
638
+ </tr>
639
+ <tr>
640
+ <td align="left">Gen-3</td><td align="center">-</td><td align="center">82.32</td>
641
+ </tr>
642
+ <tr>
643
+ <td align="left">Step-Video-T2V</td><td align="center">30B</td><td align="center">81.83</td>
644
+ </tr>
645
+ <tr>
646
+ <td align="left">Hunyuan Video</td><td align="center">-</td><td align="center">83.43</td>
647
+ </tr>
648
+ <tr>
649
+ <td align="left">Wan2.1-T2V</td><td align="center">14B</td><td align="center">83.69</td>
650
+ </tr>
651
+ <tr>
652
+ <td align="center" rowspan="6"><i>Unified</i></td>
653
+ <td align="left">HaproOmni</td><td align="center">7B</td><td align="center">78.10</td>
654
+ </tr>
655
+ <tr>
656
+ <td align="left">Emu3</td><td align="center">8B</td><td align="center">80.96</td>
657
+ </tr>
658
+ <tr>
659
+ <td align="left">VILA-U</td><td align="center">7B</td><td align="center">74.01</td>
660
+ </tr>
661
+ <tr>
662
+ <td align="left">Show-o2</td><td align="center">2B</td><td align="center">81.34</td>
663
+ </tr>
664
+ <tr>
665
+ <td align="left">TUNA</td><td align="center">1.5B</td><td align="center"><u>84.06</u></td>
666
+ </tr>
667
+ <tr bgcolor="#f4e6ff">
668
+ <td align="left">🌟 <b>Lance (Ours)</b></td><td align="center"><b>3B</b></td><td align="center"><b>85.11</b></td>
669
+ </tr>
670
+ </tbody>
671
+ </table>
672
+ </div>
673
+
674
+ #### 运行基准评测
675
+
676
+ `benchmarks/` 目录下提供了可直接运行的基准评测脚本:
677
+
678
+ | 基准 | 模态 | 脚本 |
679
+ |------------------------|----------|---------------------------------------------------------------|
680
+ | GenEVAL(图像生成) | 图像 | `benchmarks/image_gen/GenEVAL/sample_GenEVAL.sh` |
681
+ | DPG(图像生成) | 图像 | `benchmarks/image_gen/DPG/sample_DPG.sh` |
682
+ | GEdit(图像编辑) | 图像 | `benchmarks/image_gen/GEdit/sample_GEdit.sh` |
683
+ | VBench(视频生成) | 视频 | `benchmarks/video_gen/Vbench/sample_vbench.sh` |
684
+
685
+
686
+ ## 📄 许可证
687
+
688
+ Copyright 2025 Bytedance Ltd. and/or its affiliates.
689
+
690
+ ## 🙏 致谢
691
+
692
+ 感谢 [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) 的贡献者们公开研究成果并推动社区发展。
693
+
694
+ ## 💖 引用
695
+
696
+ 如果 Lance 对您的项目或研究有帮助,欢迎 🌟 本仓库,并使用以下 BibTeX 引用我们的工作:
697
+
698
+ ```bibtex
699
+ @misc{lance2026,
700
+ title = {Lance: Unified Multimodal Modeling by Multi-Task Synergy},
701
+ author = {Fengyi Fu and Mengqi Huang and Shaojin Wu and Yunsheng Jiang and Yufei Huo and Jianzhu Guo and Hao Li and Yinghang Song and Fei Ding and Qian He and Zheren Fu and Zhendong Mao and Yongdong Zhang},
702
+ year = {2026},
703
+ note = {Manuscript}
704
+ }
705
+ ```
706
+
707
+ ## 📞 联系方式
708
+
709
+ 如有问题、反馈或合作需求,请联系 [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

  • SHA256: 317bd35ef72d37ac743eac2dcdcd66e9b83d7f7181b6578702cf54ec10ea61d5
  • Pointer size: 132 Bytes
  • Size of remote file: 1.34 MB
assets/image-editing/image-editing-overview.webp ADDED

Git LFS Details

  • SHA256: 1ea51f3d7b64859b5c60e8da9863e4674fea60acaf1e4c29995837137e88360f
  • Pointer size: 131 Bytes
  • Size of remote file: 460 kB
assets/image-understanding/cases/image-understanding-case-01.png ADDED

Git LFS Details

  • SHA256: dca7c23bbdc486815df8cdfe681effbf323f8f324a1180b1626347ee60c56e04
  • Pointer size: 131 Bytes
  • Size of remote file: 126 kB
assets/image-understanding/cases/image-understanding-case-02.png ADDED
assets/image-understanding/cases/image-understanding-case-03.png ADDED

Git LFS Details

  • SHA256: 07ec27822042a52ab89c299846863849e9c4bb974a338a59eb068cbcdca18d67
  • Pointer size: 132 Bytes
  • Size of remote file: 1.07 MB
assets/image-understanding/cases/image-understanding-case-04.png ADDED

Git LFS Details

  • SHA256: b47c54a47e552b00db42b8867dbb4f46844aa4b95c5caba605691c787ad27e40
  • Pointer size: 131 Bytes
  • Size of remote file: 112 kB
assets/image-understanding/cases/image-understanding-case-05.png ADDED

Git LFS Details

  • SHA256: 3853e3af85824429178a14a63255eba6f0e2e44dd47f7cc64c27fe3eefe765cb
  • Pointer size: 131 Bytes
  • Size of remote file: 949 kB
assets/image-understanding/cases/image-understanding-case-06.png ADDED

Git LFS Details

  • SHA256: d16216657d25789af4e6f7ef68adfea7f161bf944b65f9a6657c9b019bea34b3
  • Pointer size: 131 Bytes
  • Size of remote file: 223 kB
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

  • SHA256: 5359f986a6a29e25b4eb92fd470e74c83d92581dc6fb22d2c4ac789637842934
  • Pointer size: 131 Bytes
  • Size of remote file: 461 kB
assets/multi-turn-editing/previews/multi-turn-editing-demo-01.gif ADDED

Git LFS Details

  • SHA256: 7fe1c324cf4244d5f22f4efc009664a45cc71beb1830a076eee569f8690bfc40
  • Pointer size: 132 Bytes
  • Size of remote file: 1.69 MB
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

  • SHA256: 643ab6df451db427702cfda3319d471f37c9a7f8bb0646b966961495590a665e
  • Pointer size: 132 Bytes
  • Size of remote file: 1.15 MB
assets/text-to-video/previews/text-to-video-demo-01.gif ADDED

Git LFS Details

  • SHA256: e0a9258e7f77cfd96aa759e2cdad36faedb646067e43ad53160dc3484120d1ce
  • Pointer size: 132 Bytes
  • Size of remote file: 1.43 MB
assets/text-to-video/previews/text-to-video-demo-02.gif ADDED

Git LFS Details

  • SHA256: 9f3583aa5f687d288e94807b24256f7b248cc9fb990978f77ef54a925ee1ff3a
  • Pointer size: 132 Bytes
  • Size of remote file: 1.09 MB
assets/text-to-video/previews/text-to-video-demo-03.gif ADDED

Git LFS Details

  • SHA256: 1e68d947fad2e9190a668ca5dcf55445a06ca422563763a1f1557f458aa1c49f
  • Pointer size: 132 Bytes
  • Size of remote file: 1.07 MB
assets/text-to-video/previews/text-to-video-demo-04.gif ADDED

Git LFS Details

  • SHA256: 8d6ae9f7a192f823071f6d72bd58f376e9911c07c8213a755dfee94efae16f3e
  • Pointer size: 132 Bytes
  • Size of remote file: 1.29 MB
assets/text-to-video/previews/text-to-video-demo-05.gif ADDED

Git LFS Details

  • SHA256: 389975bd2d5b5ce5669d46382543e1a059a5753215146a80d27ccdc7c13d5399
  • Pointer size: 132 Bytes
  • Size of remote file: 1.83 MB
assets/text-to-video/previews/text-to-video-demo-06.gif ADDED

Git LFS Details

  • SHA256: f1645a20ebf29b955f33a759d475e35f119223e67591e0d4e347bb56a68df3bc
  • Pointer size: 132 Bytes
  • Size of remote file: 1.44 MB
assets/text-to-video/previews/text-to-video-demo-07.gif ADDED

Git LFS Details

  • SHA256: c59dfd54006305ac4f502df50dc1158ed2f25382aff38e7f021f72980c12ba62
  • Pointer size: 132 Bytes
  • Size of remote file: 1.26 MB
assets/text-to-video/previews/text-to-video-demo-08.gif ADDED

Git LFS Details

  • SHA256: 7047d46e0977970ffd23c334cc4aefe1d356e71592a7ba8311be5bc53def7c33
  • Pointer size: 132 Bytes
  • Size of remote file: 1.81 MB
assets/text-to-video/videos/text-to-video-demo-01.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b76e0bffa453aa61da2be454dab728da967badcd2c80d5bb3b330e1810a65cc
3
+ size 7186230
assets/text-to-video/videos/text-to-video-demo-02.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0b04500bd433bc5705e080001a02d7647252dff4e7cdb48e42efba5a8c721a1
3
+ size 2826861
assets/text-to-video/videos/text-to-video-demo-03.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c6d1254b88c0ee823083a0c256c25adbe2b20ad0eb1f27a31e6dc62e35f4ecb5
3
+ size 2854502