Instructions to use ByteDance/Bernini-Diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ByteDance/Bernini-Diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ByteDance/Bernini-Diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Upload config.json with huggingface_hub
Browse files- config.json +2 -11
config.json
CHANGED
|
@@ -3,13 +3,8 @@
|
|
| 3 |
"architectures": ["BerniniModel"],
|
| 4 |
"mllm_attn_implementation": "sdpa",
|
| 5 |
"partial_pretrain_model": "",
|
| 6 |
-
"
|
| 7 |
-
"transformer_config_path": "./pretrained_models/Bernini-Diffusers/transformer_config.json",
|
| 8 |
-
"transformer_2_config_path": "./pretrained_models/Bernini-Diffusers/transformer_2_config.json",
|
| 9 |
-
"wan22_base": "./pretrained_models/Bernini-Diffusers",
|
| 10 |
-
"vae_model_path": "./pretrained_models/Bernini-Diffusers",
|
| 11 |
"vae_subfolder": "vae",
|
| 12 |
-
"vae_config_path": "./pretrained_models/Bernini-Diffusers/vae/config.json",
|
| 13 |
"cotrain": true,
|
| 14 |
"boundary_ratio": 0.417,
|
| 15 |
"switch_dit_boundary": 0.875,
|
|
@@ -19,9 +14,7 @@
|
|
| 19 |
"mode_scale": 1.29,
|
| 20 |
"scratch": true,
|
| 21 |
"transformers_version": "4.57.3",
|
| 22 |
-
"mllm_config_path": "./pretrained_models/Bernini-Diffusers",
|
| 23 |
"mllm_subfolder": "mllm",
|
| 24 |
-
"processor_config_path": "./pretrained_models/Bernini-Diffusers",
|
| 25 |
"processor_subfolder": "mllm",
|
| 26 |
"bernini_ckpt_subfolder": "bernini",
|
| 27 |
"scratch_mllm": true,
|
|
@@ -38,7 +31,7 @@
|
|
| 38 |
"shift": 2.0
|
| 39 |
},
|
| 40 |
"connector_cfg": {
|
| 41 |
-
"model_type": "
|
| 42 |
"out_dim_for_gen": 4096,
|
| 43 |
"enable_gen_branch": true,
|
| 44 |
"out_dim_for_vit": 3584,
|
|
@@ -50,9 +43,7 @@
|
|
| 50 |
"generator_type": "default"
|
| 51 |
},
|
| 52 |
"t5_max_sequence_length": 512,
|
| 53 |
-
"t5_text_encoder_path": "./pretrained_models/Bernini-Diffusers",
|
| 54 |
"t5_text_encoder_subfolder": "t5_text_encoder",
|
| 55 |
-
"t5_tokenizer_path": "./pretrained_models/Bernini-Diffusers",
|
| 56 |
"t5_tokenizer_subfolder": "t5_tokenizer",
|
| 57 |
"t5_combine_type": "concat_with_zero_init",
|
| 58 |
"target_fps": 16
|
|
|
|
| 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,
|
|
|
|
| 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,
|
|
|
|
| 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,
|
|
|
|
| 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
|