liuchanglab commited on
Commit
41378cc
·
verified ·
1 Parent(s): 45cb202

Upload folder using huggingface_hub

Browse files
chat_template.jinja ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {% set image_count = namespace(value=0) %}{% set video_count = namespace(value=0) %}{% for message in messages %}{% if loop.first and message['role'] != 'system' %}{% if t2i_generate %}<|im_start|>system
2
+ You are a helpful image generator.<|im_end|>
3
+ {% else %}<|im_start|>system
4
+ You are a helpful assistant.<|im_end|>
5
+ {% endif %}{% endif %}<|im_start|>{{ message['role'] }}
6
+ {% if message['content'] is string %}{{ message['content'] }}<|im_end|>
7
+ {% 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'] == 'image_gen' or 'image_gen' in content %}<|gen_placeholder|>{% 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|>
8
+ {% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant
9
+ {% if t2i_generate %}<|image start|>{{ ar_width }}*{{ ar_height }}<|image token|>{% endif %}
10
+ {% endif %}
config.json ADDED
@@ -0,0 +1,299 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Mammothmoda2Model"
4
+ ],
5
+ "bos_token_id": 152068,
6
+ "dtype": "bfloat16",
7
+ "eos_token_id": 151643,
8
+ "gen_axes_dim_rope": [
9
+ 40,
10
+ 40,
11
+ 40
12
+ ],
13
+ "gen_axes_lens": [
14
+ 10000,
15
+ 10000,
16
+ 10000
17
+ ],
18
+ "gen_condition_layer_merger": "pooling",
19
+ "gen_condition_layers": [
20
+ -2,
21
+ -5,
22
+ -8,
23
+ -11,
24
+ -14,
25
+ -17
26
+ ],
27
+ "gen_condition_mode": "text_image",
28
+ "gen_dit_config": {
29
+ "_class_name": "OmniGen2Transformer2DModel",
30
+ "_diffusers_version": "0.33.1",
31
+ "axes_dim_rope": [
32
+ 40,
33
+ 40,
34
+ 40
35
+ ],
36
+ "axes_lens": [
37
+ 1024,
38
+ 1664,
39
+ 1664
40
+ ],
41
+ "ffn_dim_multiplier": null,
42
+ "hidden_size": 2520,
43
+ "in_channels": 16,
44
+ "multiple_of": 256,
45
+ "norm_eps": 1e-05,
46
+ "num_attention_heads": 21,
47
+ "num_kv_heads": 7,
48
+ "num_layers": 16,
49
+ "num_refiner_layers": 2,
50
+ "out_channels": null,
51
+ "patch_size": 2,
52
+ "text_feat_dim": 4096,
53
+ "timestep_scale": 1000.0
54
+ },
55
+ "gen_image_condition_refiner_config": {
56
+ "num_layers": 2,
57
+ "num_queries": 64
58
+ },
59
+ "gen_text_condition_max_seq_len": 512,
60
+ "gen_text_condition_with_answer": false,
61
+ "gen_transport_config": {
62
+ "do_shift": true,
63
+ "seq_len": 4096,
64
+ "snr_type": "lognorm"
65
+ },
66
+ "gen_vae_config": {
67
+ "_class_name": "AutoencoderKL",
68
+ "_diffusers_version": "0.30.0.dev0",
69
+ "_name_or_path": "../checkpoints/flux-dev",
70
+ "act_fn": "silu",
71
+ "block_out_channels": [
72
+ 128,
73
+ 256,
74
+ 512,
75
+ 512
76
+ ],
77
+ "down_block_types": [
78
+ "DownEncoderBlock2D",
79
+ "DownEncoderBlock2D",
80
+ "DownEncoderBlock2D",
81
+ "DownEncoderBlock2D"
82
+ ],
83
+ "force_upcast": true,
84
+ "in_channels": 3,
85
+ "latent_channels": 16,
86
+ "latents_mean": null,
87
+ "latents_std": null,
88
+ "layers_per_block": 2,
89
+ "mid_block_add_attention": true,
90
+ "norm_num_groups": 32,
91
+ "out_channels": 3,
92
+ "sample_size": 1024,
93
+ "scaling_factor": 0.3611,
94
+ "shift_factor": 0.1159,
95
+ "up_block_types": [
96
+ "UpDecoderBlock2D",
97
+ "UpDecoderBlock2D",
98
+ "UpDecoderBlock2D",
99
+ "UpDecoderBlock2D"
100
+ ],
101
+ "use_post_quant_conv": false,
102
+ "use_quant_conv": false
103
+ },
104
+ "initializer_range": 0.02,
105
+ "llm_config": {
106
+ "dtype": "bfloat16",
107
+ "extra_gen_vocab": true,
108
+ "gen_vocab_size": 32800,
109
+ "gen_vocab_start_index": 152064,
110
+ "image_token_id": 151655,
111
+ "model_type": "mammothmoda2_qwen3_vl",
112
+ "moe_type": "ffn-18:36",
113
+ "text_config": {
114
+ "_name_or_path": "",
115
+ "add_cross_attention": false,
116
+ "architectures": null,
117
+ "attention_bias": false,
118
+ "attention_dropout": 0.0,
119
+ "bad_words_ids": null,
120
+ "begin_suppress_tokens": null,
121
+ "bos_token_id": 151643,
122
+ "chunk_size_feed_forward": 0,
123
+ "cross_attention_hidden_size": null,
124
+ "decoder_start_token_id": null,
125
+ "diversity_penalty": 0.0,
126
+ "do_sample": false,
127
+ "dtype": "float32",
128
+ "early_stopping": false,
129
+ "encoder_no_repeat_ngram_size": 0,
130
+ "eos_token_id": 151645,
131
+ "exponential_decay_length_penalty": null,
132
+ "extra_gen_vocab": true,
133
+ "finetuning_task": null,
134
+ "forced_bos_token_id": null,
135
+ "forced_eos_token_id": null,
136
+ "gen_vocab_size": 32800,
137
+ "gen_vocab_start_index": 152064,
138
+ "head_dim": 128,
139
+ "hidden_act": "silu",
140
+ "hidden_size": 4096,
141
+ "id2label": {
142
+ "0": "LABEL_0",
143
+ "1": "LABEL_1"
144
+ },
145
+ "initializer_range": 0.02,
146
+ "intermediate_size": 12288,
147
+ "is_decoder": false,
148
+ "is_encoder_decoder": false,
149
+ "label2id": {
150
+ "LABEL_0": 0,
151
+ "LABEL_1": 1
152
+ },
153
+ "length_penalty": 1.0,
154
+ "max_length": 20,
155
+ "max_position_embeddings": 262144,
156
+ "min_length": 0,
157
+ "model_type": "mammothmoda2_qwen3_vl_text",
158
+ "moe_type": "ffn-18:36",
159
+ "no_repeat_ngram_size": 0,
160
+ "num_attention_heads": 32,
161
+ "num_beam_groups": 1,
162
+ "num_beams": 1,
163
+ "num_hidden_layers": 36,
164
+ "num_key_value_heads": 8,
165
+ "num_return_sequences": 1,
166
+ "output_attentions": false,
167
+ "output_hidden_states": false,
168
+ "output_scores": false,
169
+ "pad_token_id": null,
170
+ "prefix": null,
171
+ "problem_type": null,
172
+ "pruned_heads": {},
173
+ "remove_invalid_values": false,
174
+ "repetition_penalty": 1.0,
175
+ "return_dict": true,
176
+ "return_dict_in_generate": false,
177
+ "rms_norm_eps": 1e-06,
178
+ "rope_scaling": {
179
+ "mrope_interleaved": true,
180
+ "mrope_section": [
181
+ 24,
182
+ 20,
183
+ 20
184
+ ],
185
+ "rope_type": "default"
186
+ },
187
+ "rope_theta": 5000000,
188
+ "sep_token_id": null,
189
+ "suppress_tokens": null,
190
+ "task_specific_params": null,
191
+ "temperature": 1.0,
192
+ "tf_legacy_loss": false,
193
+ "tie_encoder_decoder": false,
194
+ "tie_word_embeddings": false,
195
+ "tokenizer_class": null,
196
+ "top_k": 50,
197
+ "top_p": 1.0,
198
+ "torchscript": false,
199
+ "typical_p": 1.0,
200
+ "unpack_forward": true,
201
+ "use_bfloat16": false,
202
+ "use_cache": true,
203
+ "vocab_size": 151936
204
+ },
205
+ "unpack_forward": true,
206
+ "use_cache": true,
207
+ "video_token_id": 151656,
208
+ "vision_config": {
209
+ "_name_or_path": "",
210
+ "add_cross_attention": false,
211
+ "architectures": null,
212
+ "bad_words_ids": null,
213
+ "begin_suppress_tokens": null,
214
+ "bos_token_id": null,
215
+ "chunk_size_feed_forward": 0,
216
+ "cross_attention_hidden_size": null,
217
+ "decoder_start_token_id": null,
218
+ "deepstack_visual_indexes": [
219
+ 8,
220
+ 16,
221
+ 24
222
+ ],
223
+ "depth": 27,
224
+ "diversity_penalty": 0.0,
225
+ "do_sample": false,
226
+ "dtype": null,
227
+ "early_stopping": false,
228
+ "encoder_no_repeat_ngram_size": 0,
229
+ "eos_token_id": null,
230
+ "exponential_decay_length_penalty": null,
231
+ "finetuning_task": null,
232
+ "forced_bos_token_id": null,
233
+ "forced_eos_token_id": null,
234
+ "hidden_act": "gelu_pytorch_tanh",
235
+ "hidden_size": 1152,
236
+ "id2label": {
237
+ "0": "LABEL_0",
238
+ "1": "LABEL_1"
239
+ },
240
+ "in_channels": 3,
241
+ "initializer_range": 0.02,
242
+ "intermediate_size": 4304,
243
+ "is_decoder": false,
244
+ "is_encoder_decoder": false,
245
+ "label2id": {
246
+ "LABEL_0": 0,
247
+ "LABEL_1": 1
248
+ },
249
+ "length_penalty": 1.0,
250
+ "max_length": 20,
251
+ "min_length": 0,
252
+ "model_type": "mammothmoda2_qwen3_vl",
253
+ "no_repeat_ngram_size": 0,
254
+ "num_beam_groups": 1,
255
+ "num_beams": 1,
256
+ "num_heads": 16,
257
+ "num_position_embeddings": 2304,
258
+ "num_return_sequences": 1,
259
+ "out_hidden_size": 4096,
260
+ "output_attentions": false,
261
+ "output_hidden_states": false,
262
+ "output_scores": false,
263
+ "pad_token_id": null,
264
+ "patch_size": 16,
265
+ "prefix": null,
266
+ "problem_type": null,
267
+ "pruned_heads": {},
268
+ "remove_invalid_values": false,
269
+ "repetition_penalty": 1.0,
270
+ "return_dict": true,
271
+ "return_dict_in_generate": false,
272
+ "sep_token_id": null,
273
+ "spatial_merge_size": 2,
274
+ "suppress_tokens": null,
275
+ "task_specific_params": null,
276
+ "temperature": 1.0,
277
+ "temporal_patch_size": 2,
278
+ "tf_legacy_loss": false,
279
+ "tie_encoder_decoder": false,
280
+ "tie_word_embeddings": true,
281
+ "tokenizer_class": null,
282
+ "top_k": 50,
283
+ "top_p": 1.0,
284
+ "torchscript": false,
285
+ "typical_p": 1.0,
286
+ "use_bfloat16": false
287
+ },
288
+ "vision_end_token_id": 151653,
289
+ "vision_start_token_id": 151652
290
+ },
291
+ "llm_moe_init_gen_from_und": true,
292
+ "llm_pretrained_path": null,
293
+ "model_type": "mammothmoda2",
294
+ "pad_token_id": 151643,
295
+ "transformers_version": "4.57.1",
296
+ "unpack_forward": true,
297
+ "verbose_interval": 200,
298
+ "vis_freeze": true
299
+ }
mammothu.tiktoken ADDED
The diff for this file is too large to render. See raw diff
 
mammothu_vision_tokens.txt ADDED
The diff for this file is too large to render. See raw diff
 
model-00001-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd7c63921c580ad595a03210c7836384284ea7206b0bf4f93024d9714fa96576
3
+ size 4951322392
model-00002-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ab2340d41f27622955e9861d19418ddabe0b93cee069fbec629c8708f3207ee
3
+ size 4999824288
model-00003-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:338579b8ffe1fba630de4a22c630befe8320dd145d65794313134635da73b63e
3
+ size 4832050304
model-00004-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da2506dd507f5c96f248e057f249a584aa4ee504b88b73e25b73d508c1013dc8
3
+ size 4832050344
model-00005-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f73a415edaf4f5485fcb4c818e16daff55ea2f211c42c66af0b66986700b27c8
3
+ size 4932609376
model-00006-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a895c562d6c11834e4eb698995593a96b57c29c4cc99e49a68f65378ca18e818
3
+ size 4899089720
model-00007-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4cb9918ad08ab7421f86917b6d2d01f0d8d059ac9a1229f1c797f898c9154e6
3
+ size 4932609376
model-00008-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:35fab1a0ff7409cb9ed4815f9fa378d8eab47a5622d1cb219dc0f88b8ccfe757
3
+ size 4899089712
model-00009-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c262fea7aa9a26459b738217a63426eaaee0161d9a44114c1dce449d9c415cd
3
+ size 4801551272
model-00010-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2800fc1384ff335110aa69afa9b0585ab0bb796c6d9786954cee0b6a23e64597
3
+ size 4961994348
model-00011-of-00011.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c7924b8497c8498a04165595b517ac917243bd343158385101ff37eac166e79d
3
+ size 2013849880
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
preprocessor_config.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "min_pixels": 65536,
3
+ "max_pixels": 2097152,
4
+ "patch_size": 16,
5
+ "temporal_patch_size": 2,
6
+ "merge_size": 2,
7
+ "image_mean": [
8
+ 0.5,
9
+ 0.5,
10
+ 0.5
11
+ ],
12
+ "image_std": [
13
+ 0.5,
14
+ 0.5,
15
+ 0.5
16
+ ],
17
+ "image_processor_type": "Qwen2VLImageProcessorFast",
18
+ "processor_class": "Mammothmoda2Processor"
19
+ }
t2i_generation_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "num_beams": 1,
3
+ "do_sample": true,
4
+ "top_p": 1.0,
5
+ "top_k": 2048,
6
+ "temperature": 1.0,
7
+ "repetition_penalty": 1.0,
8
+ "max_new_tokens": 1000,
9
+ "bos_token_id": 151643,
10
+ "pad_token_id": 151643,
11
+ "eos_token_id": [
12
+ 151645,
13
+ 151643
14
+ ],
15
+ "eol_token_id": 152064,
16
+ "visual_token_start_id": 152072,
17
+ "visual_token_end_id": 168456
18
+ }
und_generation_config.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 151643,
3
+ "eos_token_id": [
4
+ 151645,
5
+ 151643
6
+ ],
7
+ "max_new_tokens": 1000,
8
+ "pad_token_id": 151643,
9
+ "temperature": null,
10
+ "top_p": null,
11
+ "transformers_version": "4.57.1"
12
+ }
video_preprocessor_config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "size": {
3
+ "longest_edge": 25165824,
4
+ "shortest_edge": 4096
5
+ },
6
+ "patch_size": 16,
7
+ "temporal_patch_size": 2,
8
+ "merge_size": 2,
9
+ "image_mean": [
10
+ 0.5,
11
+ 0.5,
12
+ 0.5
13
+ ],
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "processor_class": "Qwen3VLProcessor",
20
+ "video_processor_type": "Qwen3VLVideoProcessor"
21
+ }