Instructions to use mlx-community/Bernini-v2-int4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Bernini-v2-int4 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir Bernini-v2-int4 mlx-community/Bernini-v2-int4
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Bernini-v2 int4 MLX variant (experts 4-bit gs64; planner/T5/VAE bf16)
Browse files- README.md +28 -0
- bernini_v2_config.json +50 -0
- config.json +55 -0
- conversion.json +12 -0
- high_noise_model.safetensors +3 -0
- low_noise_model.safetensors +3 -0
- mllm/chat_template.json +3 -0
- mllm/config.json +62 -0
- mllm/generation_config.json +12 -0
- mllm/merges.txt +0 -0
- mllm/model.safetensors +3 -0
- mllm/preprocessor_config.json +19 -0
- mllm/tokenizer.json +0 -0
- mllm/tokenizer_config.json +207 -0
- mllm/vocab.json +0 -0
- planner_glue.safetensors +3 -0
- t5_encoder.safetensors +3 -0
- transformer_2_config.json +24 -0
- transformer_config.json +24 -0
- vae.safetensors +3 -0
- vit_decoder.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: ByteDance/Bernini-Diffusers-v2
|
| 4 |
+
tags:
|
| 5 |
+
- mlx
|
| 6 |
+
- video
|
| 7 |
+
- text-to-video
|
| 8 |
+
- image-to-video
|
| 9 |
+
- video-editing
|
| 10 |
+
- wan
|
| 11 |
+
- bernini
|
| 12 |
+
library_name: mlx
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Bernini-v2 (int4, MLX)
|
| 16 |
+
|
| 17 |
+
4-bit variant of [`mlx-community/Bernini-v2-bf16`](https://huggingface.co/mlx-community/Bernini-v2-bf16)
|
| 18 |
+
— Apple-MLX conversion of [ByteDance/Bernini-Diffusers-v2](https://huggingface.co/ByteDance/Bernini-Diffusers-v2)
|
| 19 |
+
(revision `399cf6a`, Apache-2.0).
|
| 20 |
+
|
| 21 |
+
**Quantization scope:** the two Wan2.2-A14B transformer experts only (attention + FFN Linears,
|
| 22 |
+
4-bit, group size 64; embeddings/norms/head/modulation stay bf16). The planner plane
|
| 23 |
+
(`mllm/`, `vit_decoder`, `planner_glue`), umT5 encoder, and VAE pass through at bf16 —
|
| 24 |
+
weight-only int4 on diffusion transformers costs measurable quality (bf16 is the recommended
|
| 25 |
+
default; this variant is the memory-constrained opt-in).
|
| 26 |
+
|
| 27 |
+
See the bf16 repo's card for the full component table, conversion notes, retrained-experts
|
| 28 |
+
warning (not interchangeable with `Bernini-R-*`), usage pointers, and provenance.
|
bernini_v2_config.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "bernini",
|
| 3 |
+
"architectures": ["BerniniModel"],
|
| 4 |
+
"mllm_attn_implementation": "sdpa",
|
| 5 |
+
"partial_pretrain_model": "",
|
| 6 |
+
"base_dir": "ByteDance/Bernini-Diffusers",
|
| 7 |
+
"vae_subfolder": "vae",
|
| 8 |
+
"cotrain": true,
|
| 9 |
+
"boundary_ratio": 0.417,
|
| 10 |
+
"switch_dit_boundary": 0.875,
|
| 11 |
+
"shift": 3.0,
|
| 12 |
+
"logit_mean": 0.5,
|
| 13 |
+
"logit_std": 1,
|
| 14 |
+
"mode_scale": 1.29,
|
| 15 |
+
"scratch": true,
|
| 16 |
+
"transformers_version": "4.57.3",
|
| 17 |
+
"mllm_subfolder": "mllm",
|
| 18 |
+
"processor_subfolder": "mllm",
|
| 19 |
+
"bernini_ckpt_subfolder": "bernini",
|
| 20 |
+
"scratch_mllm": true,
|
| 21 |
+
"use_src_id_rotary_emb": true,
|
| 22 |
+
"feature_type_from_stage_one": "masked_tgt_embed_with_qwen_txt_vit_tokens",
|
| 23 |
+
"num_mask_token": 4096,
|
| 24 |
+
"max_sequence_length": 512,
|
| 25 |
+
"clip_diff_cfg": {
|
| 26 |
+
"model_type": "flow_match",
|
| 27 |
+
"z_channels": 3584,
|
| 28 |
+
"target_channels": 3584,
|
| 29 |
+
"width": 4096,
|
| 30 |
+
"diffusion_batch_mul": 16,
|
| 31 |
+
"shift": 2.0
|
| 32 |
+
},
|
| 33 |
+
"connector_cfg": {
|
| 34 |
+
"model_type": "MLPConnector",
|
| 35 |
+
"out_dim_for_gen": 4096,
|
| 36 |
+
"enable_gen_branch": true,
|
| 37 |
+
"out_dim_for_vit": 3584,
|
| 38 |
+
"enable_vit_branch": true,
|
| 39 |
+
"gen_head_type": "zerolinear",
|
| 40 |
+
"zero_init_proj_gen_last": true
|
| 41 |
+
},
|
| 42 |
+
"mask_ratio_infer_cfg": {
|
| 43 |
+
"generator_type": "default"
|
| 44 |
+
},
|
| 45 |
+
"t5_max_sequence_length": 512,
|
| 46 |
+
"t5_text_encoder_subfolder": "t5_text_encoder",
|
| 47 |
+
"t5_tokenizer_subfolder": "t5_tokenizer",
|
| 48 |
+
"t5_combine_type": "concat_with_zero_init",
|
| 49 |
+
"target_fps": 16
|
| 50 |
+
}
|
config.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "t2v",
|
| 3 |
+
"model_version": "2.2",
|
| 4 |
+
"patch_size": [
|
| 5 |
+
1,
|
| 6 |
+
2,
|
| 7 |
+
2
|
| 8 |
+
],
|
| 9 |
+
"text_len": 512,
|
| 10 |
+
"in_dim": 16,
|
| 11 |
+
"dim": 5120,
|
| 12 |
+
"ffn_dim": 13824,
|
| 13 |
+
"freq_dim": 256,
|
| 14 |
+
"text_dim": 4096,
|
| 15 |
+
"out_dim": 16,
|
| 16 |
+
"num_heads": 40,
|
| 17 |
+
"num_layers": 40,
|
| 18 |
+
"window_size": [
|
| 19 |
+
-1,
|
| 20 |
+
-1
|
| 21 |
+
],
|
| 22 |
+
"qk_norm": true,
|
| 23 |
+
"cross_attn_norm": true,
|
| 24 |
+
"eps": 1e-06,
|
| 25 |
+
"vae_stride": [
|
| 26 |
+
4,
|
| 27 |
+
8,
|
| 28 |
+
8
|
| 29 |
+
],
|
| 30 |
+
"vae_z_dim": 16,
|
| 31 |
+
"dual_model": true,
|
| 32 |
+
"boundary": 0.875,
|
| 33 |
+
"sample_shift": 3.0,
|
| 34 |
+
"sample_steps": 40,
|
| 35 |
+
"sample_guide_scale": [
|
| 36 |
+
3.0,
|
| 37 |
+
4.0
|
| 38 |
+
],
|
| 39 |
+
"num_train_timesteps": 1000,
|
| 40 |
+
"sample_fps": 16,
|
| 41 |
+
"frame_num": 81,
|
| 42 |
+
"sample_neg_prompt": "\u8272\u8c03\u8273\u4e3d\uff0c\u8fc7\u66dd\uff0c\u9759\u6001\uff0c\u7ec6\u8282\u6a21\u7cca\u4e0d\u6e05\uff0c\u5b57\u5e55\uff0c\u98ce\u683c\uff0c\u4f5c\u54c1\uff0c\u753b\u4f5c\uff0c\u753b\u9762\uff0c\u9759\u6b62\uff0c\u6574\u4f53\u53d1\u7070\uff0c\u6700\u5dee\u8d28\u91cf\uff0c\u4f4e\u8d28\u91cf\uff0cJPEG\u538b\u7f29\u6b8b\u7559\uff0c\u4e11\u964b\u7684\uff0c\u6b8b\u7f3a\u7684\uff0c\u591a\u4f59\u7684\u624b\u6307\uff0c\u753b\u5f97\u4e0d\u597d\u7684\u624b\u90e8\uff0c\u753b\u5f97\u4e0d\u597d\u7684\u8138\u90e8\uff0c\u7578\u5f62\u7684\uff0c\u6bc1\u5bb9\u7684\uff0c\u5f62\u6001\u7578\u5f62\u7684\u80a2\u4f53\uff0c\u624b\u6307\u878d\u5408\uff0c\u9759\u6b62\u4e0d\u52a8\u7684\u753b\u9762\uff0c\u6742\u4e71\u7684\u80cc\u666f\uff0c\u4e09\u6761\u817f\uff0c\u80cc\u666f\u4eba\u5f88\u591a\uff0c\u5012\u7740\u8d70",
|
| 43 |
+
"max_area": 0,
|
| 44 |
+
"t5_vocab_size": 256384,
|
| 45 |
+
"t5_dim": 4096,
|
| 46 |
+
"t5_dim_attn": 4096,
|
| 47 |
+
"t5_dim_ffn": 10240,
|
| 48 |
+
"t5_num_heads": 64,
|
| 49 |
+
"t5_num_layers": 24,
|
| 50 |
+
"t5_num_buckets": 32,
|
| 51 |
+
"quantization": {
|
| 52 |
+
"group_size": 64,
|
| 53 |
+
"bits": 4
|
| 54 |
+
}
|
| 55 |
+
}
|
conversion.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source": "ByteDance/Bernini-Diffusers-v2",
|
| 3 |
+
"source_commit": "399cf6a18a4c523b367b2b1ac25a2a61009e7df3",
|
| 4 |
+
"dtype": "bfloat16",
|
| 5 |
+
"converted": "2026-08-18",
|
| 6 |
+
"components": [
|
| 7 |
+
"experts",
|
| 8 |
+
"planner",
|
| 9 |
+
"t5+vae copied from mlx-community/Bernini-R-bf16 (bit-identical, AB-R-0097)"
|
| 10 |
+
],
|
| 11 |
+
"note": "experts RETRAINED vs Bernini-R (AB-R-0097) -> full reconvert via premap_diffusers_to_wan + mlx-video sanitize, CPU-stream, chunked evals; in-checkpoint fp32 T5 shards 26-31 never downloaded; mllm saved in HF Qwen2.5-VL layout (mllm. prefix stripped); connector/mask_tokens keys verbatim upstream in planner_glue.safetensors"
|
| 12 |
+
}
|
high_noise_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d9bc04f12ccc41bd391aafb2eba772758cd9815a700e77f4487e9aabc4aa40d2
|
| 3 |
+
size 8379507248
|
low_noise_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0bde83f0f550bbcdaec0a35d0f11610fa76ea89ae7b2e10332ecdadf9729e226
|
| 3 |
+
size 8379507248
|
mllm/chat_template.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"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 %}"
|
| 3 |
+
}
|
mllm/config.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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": 3584,
|
| 15 |
+
"initializer_range": 0.02,
|
| 16 |
+
"intermediate_size": 18944,
|
| 17 |
+
"max_position_embeddings": 128000,
|
| 18 |
+
"max_window_layers": 28,
|
| 19 |
+
"model_type": "qwen2_5_vl",
|
| 20 |
+
"num_attention_heads": 28,
|
| 21 |
+
"num_hidden_layers": 28,
|
| 22 |
+
"num_key_value_heads": 4,
|
| 23 |
+
"rms_norm_eps": 1e-06,
|
| 24 |
+
"rope_theta": 1000000.0,
|
| 25 |
+
"sliding_window": 32768,
|
| 26 |
+
"tie_word_embeddings": false,
|
| 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": 3584,
|
| 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 |
+
"_attn_implementation": "flash_attention_2"
|
| 52 |
+
},
|
| 53 |
+
"rope_scaling": {
|
| 54 |
+
"type": "mrope",
|
| 55 |
+
"mrope_section": [
|
| 56 |
+
16,
|
| 57 |
+
24,
|
| 58 |
+
24
|
| 59 |
+
]
|
| 60 |
+
},
|
| 61 |
+
"vocab_size": 152064
|
| 62 |
+
}
|
mllm/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.37.0"
|
| 12 |
+
}
|
mllm/merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
mllm/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c90509813131d6e3db3e5790e4dcbd7cdc8002b9d992206556c114e1e5efd390
|
| 3 |
+
size 16584414354
|
mllm/preprocessor_config.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"min_pixels": 3136,
|
| 3 |
+
"max_pixels": 12845056,
|
| 4 |
+
"patch_size": 14,
|
| 5 |
+
"temporal_patch_size": 2,
|
| 6 |
+
"merge_size": 2,
|
| 7 |
+
"image_mean": [
|
| 8 |
+
0.48145466,
|
| 9 |
+
0.4578275,
|
| 10 |
+
0.40821073
|
| 11 |
+
],
|
| 12 |
+
"image_std": [
|
| 13 |
+
0.26862954,
|
| 14 |
+
0.26130258,
|
| 15 |
+
0.27577711
|
| 16 |
+
],
|
| 17 |
+
"image_processor_type": "Qwen2VLImageProcessor",
|
| 18 |
+
"processor_class": "Qwen2_5_VLProcessor"
|
| 19 |
+
}
|
mllm/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
mllm/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": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
|
| 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 |
+
}
|
mllm/vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
planner_glue.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ec57ff5ff05c0cb34c033b2e1dc319a0ee9eb3f3214ba8881c4a84f550756dc4
|
| 3 |
+
size 169399544
|
t5_encoder.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e86ee4199903e00a88dcd43583a43a6eb898cef600e38670f222d7e37d163787
|
| 3 |
+
size 11361845505
|
transformer_2_config.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "WanTransformer3DModel",
|
| 3 |
+
"_diffusers_version": "0.35.0.dev0",
|
| 4 |
+
"added_kv_proj_dim": null,
|
| 5 |
+
"attention_head_dim": 128,
|
| 6 |
+
"cross_attn_norm": true,
|
| 7 |
+
"eps": 1e-06,
|
| 8 |
+
"ffn_dim": 13824,
|
| 9 |
+
"freq_dim": 256,
|
| 10 |
+
"image_dim": null,
|
| 11 |
+
"in_channels": 16,
|
| 12 |
+
"num_attention_heads": 40,
|
| 13 |
+
"num_layers": 40,
|
| 14 |
+
"out_channels": 16,
|
| 15 |
+
"patch_size": [
|
| 16 |
+
1,
|
| 17 |
+
2,
|
| 18 |
+
2
|
| 19 |
+
],
|
| 20 |
+
"pos_embed_seq_len": null,
|
| 21 |
+
"qk_norm": "rms_norm_across_heads",
|
| 22 |
+
"rope_max_seq_len": 1024,
|
| 23 |
+
"text_dim": 4096
|
| 24 |
+
}
|
transformer_config.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "WanTransformer3DModel",
|
| 3 |
+
"_diffusers_version": "0.35.0.dev0",
|
| 4 |
+
"added_kv_proj_dim": null,
|
| 5 |
+
"attention_head_dim": 128,
|
| 6 |
+
"cross_attn_norm": true,
|
| 7 |
+
"eps": 1e-06,
|
| 8 |
+
"ffn_dim": 13824,
|
| 9 |
+
"freq_dim": 256,
|
| 10 |
+
"image_dim": null,
|
| 11 |
+
"in_channels": 16,
|
| 12 |
+
"num_attention_heads": 40,
|
| 13 |
+
"num_layers": 40,
|
| 14 |
+
"out_channels": 16,
|
| 15 |
+
"patch_size": [
|
| 16 |
+
1,
|
| 17 |
+
2,
|
| 18 |
+
2
|
| 19 |
+
],
|
| 20 |
+
"pos_embed_seq_len": null,
|
| 21 |
+
"qk_norm": "rms_norm_across_heads",
|
| 22 |
+
"rope_max_seq_len": 1024,
|
| 23 |
+
"text_dim": 4096
|
| 24 |
+
}
|
vae.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:977530e453dbfabbab31e2972e1577d8d7e2840ba7410c81aa3fd421c0cd7414
|
| 3 |
+
size 507591226
|
vit_decoder.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8895d622e9381cf267f7a22e21d2333491c260891734edc56651821308ee4945
|
| 3 |
+
size 2876184161
|