Upload Flux2ModularPipeline
#1
by
dn6 HF Staff - opened
- README.md +5 -0
- modular_model_index.json +10 -8
- scheduler/scheduler_config.json +18 -0
- transformer/config.json +39 -0
- transformer/diffusion_pytorch_model-00001-of-00002.safetensors +3 -0
- transformer/diffusion_pytorch_model-00002-of-00002.safetensors +3 -0
- transformer/diffusion_pytorch_model.safetensors.index.json +0 -0
- vae/config.json +40 -0
- vae/diffusion_pytorch_model.safetensors +3 -0
README.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
| 1 |
---
|
| 2 |
pipeline_tag: text-to-image
|
| 3 |
library_name: diffusers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
## Setup
|
| 6 |
|
|
|
|
| 1 |
---
|
| 2 |
pipeline_tag: text-to-image
|
| 3 |
library_name: diffusers
|
| 4 |
+
tags:
|
| 5 |
+
- modular-diffusers
|
| 6 |
+
- diffusers
|
| 7 |
+
- flux2
|
| 8 |
+
- text-to-image
|
| 9 |
---
|
| 10 |
## Setup
|
| 11 |
|
modular_model_index.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
{
|
| 2 |
-
"_blocks_class_name": "
|
| 3 |
"_class_name": "Flux2ModularPipeline",
|
| 4 |
-
"_diffusers_version": "0.
|
| 5 |
"scheduler": [
|
| 6 |
-
|
| 7 |
-
|
| 8 |
{
|
| 9 |
"pretrained_model_name_or_path": "black-forest-labs/FLUX.2-dev",
|
| 10 |
"revision": null,
|
|
@@ -20,6 +20,7 @@
|
|
| 20 |
null,
|
| 21 |
null,
|
| 22 |
{
|
|
|
|
| 23 |
"revision": null,
|
| 24 |
"subfolder": "text_encoder",
|
| 25 |
"type_hint": [
|
|
@@ -33,6 +34,7 @@
|
|
| 33 |
null,
|
| 34 |
null,
|
| 35 |
{
|
|
|
|
| 36 |
"revision": null,
|
| 37 |
"subfolder": "tokenizer",
|
| 38 |
"type_hint": [
|
|
@@ -43,8 +45,8 @@
|
|
| 43 |
}
|
| 44 |
],
|
| 45 |
"transformer": [
|
| 46 |
-
|
| 47 |
-
|
| 48 |
{
|
| 49 |
"pretrained_model_name_or_path": "diffusers/FLUX.2-dev-bnb-4bit",
|
| 50 |
"revision": null,
|
|
@@ -57,8 +59,8 @@
|
|
| 57 |
}
|
| 58 |
],
|
| 59 |
"vae": [
|
| 60 |
-
|
| 61 |
-
|
| 62 |
{
|
| 63 |
"pretrained_model_name_or_path": "black-forest-labs/FLUX.2-dev",
|
| 64 |
"revision": null,
|
|
|
|
| 1 |
{
|
| 2 |
+
"_blocks_class_name": "Flux2AutoBlocks",
|
| 3 |
"_class_name": "Flux2ModularPipeline",
|
| 4 |
+
"_diffusers_version": "0.37.0.dev0",
|
| 5 |
"scheduler": [
|
| 6 |
+
"diffusers",
|
| 7 |
+
"FlowMatchEulerDiscreteScheduler",
|
| 8 |
{
|
| 9 |
"pretrained_model_name_or_path": "black-forest-labs/FLUX.2-dev",
|
| 10 |
"revision": null,
|
|
|
|
| 20 |
null,
|
| 21 |
null,
|
| 22 |
{
|
| 23 |
+
"pretrained_model_name_or_path": null,
|
| 24 |
"revision": null,
|
| 25 |
"subfolder": "text_encoder",
|
| 26 |
"type_hint": [
|
|
|
|
| 34 |
null,
|
| 35 |
null,
|
| 36 |
{
|
| 37 |
+
"pretrained_model_name_or_path": null,
|
| 38 |
"revision": null,
|
| 39 |
"subfolder": "tokenizer",
|
| 40 |
"type_hint": [
|
|
|
|
| 45 |
}
|
| 46 |
],
|
| 47 |
"transformer": [
|
| 48 |
+
"diffusers",
|
| 49 |
+
"Flux2Transformer2DModel",
|
| 50 |
{
|
| 51 |
"pretrained_model_name_or_path": "diffusers/FLUX.2-dev-bnb-4bit",
|
| 52 |
"revision": null,
|
|
|
|
| 59 |
}
|
| 60 |
],
|
| 61 |
"vae": [
|
| 62 |
+
"diffusers",
|
| 63 |
+
"AutoencoderKLFlux2",
|
| 64 |
{
|
| 65 |
"pretrained_model_name_or_path": "black-forest-labs/FLUX.2-dev",
|
| 66 |
"revision": null,
|
scheduler/scheduler_config.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "FlowMatchEulerDiscreteScheduler",
|
| 3 |
+
"_diffusers_version": "0.37.0.dev0",
|
| 4 |
+
"base_image_seq_len": 256,
|
| 5 |
+
"base_shift": 0.5,
|
| 6 |
+
"invert_sigmas": false,
|
| 7 |
+
"max_image_seq_len": 4096,
|
| 8 |
+
"max_shift": 1.15,
|
| 9 |
+
"num_train_timesteps": 1000,
|
| 10 |
+
"shift": 3.0,
|
| 11 |
+
"shift_terminal": null,
|
| 12 |
+
"stochastic_sampling": false,
|
| 13 |
+
"time_shift_type": "exponential",
|
| 14 |
+
"use_beta_sigmas": false,
|
| 15 |
+
"use_dynamic_shifting": true,
|
| 16 |
+
"use_exponential_sigmas": false,
|
| 17 |
+
"use_karras_sigmas": false
|
| 18 |
+
}
|
transformer/config.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "Flux2Transformer2DModel",
|
| 3 |
+
"_diffusers_version": "0.37.0.dev0",
|
| 4 |
+
"_name_or_path": "diffusers/FLUX.2-dev-bnb-4bit",
|
| 5 |
+
"attention_head_dim": 128,
|
| 6 |
+
"axes_dims_rope": [
|
| 7 |
+
32,
|
| 8 |
+
32,
|
| 9 |
+
32,
|
| 10 |
+
32
|
| 11 |
+
],
|
| 12 |
+
"eps": 1e-06,
|
| 13 |
+
"guidance_embeds": true,
|
| 14 |
+
"in_channels": 128,
|
| 15 |
+
"joint_attention_dim": 15360,
|
| 16 |
+
"mlp_ratio": 3.0,
|
| 17 |
+
"num_attention_heads": 48,
|
| 18 |
+
"num_layers": 8,
|
| 19 |
+
"num_single_layers": 48,
|
| 20 |
+
"out_channels": null,
|
| 21 |
+
"patch_size": 1,
|
| 22 |
+
"quantization_config": {
|
| 23 |
+
"_load_in_4bit": true,
|
| 24 |
+
"_load_in_8bit": false,
|
| 25 |
+
"bnb_4bit_compute_dtype": "bfloat16",
|
| 26 |
+
"bnb_4bit_quant_storage": "uint8",
|
| 27 |
+
"bnb_4bit_quant_type": "nf4",
|
| 28 |
+
"bnb_4bit_use_double_quant": false,
|
| 29 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
| 30 |
+
"llm_int8_has_fp16_weight": false,
|
| 31 |
+
"llm_int8_skip_modules": null,
|
| 32 |
+
"llm_int8_threshold": 6.0,
|
| 33 |
+
"load_in_4bit": true,
|
| 34 |
+
"load_in_8bit": false,
|
| 35 |
+
"quant_method": "bitsandbytes"
|
| 36 |
+
},
|
| 37 |
+
"rope_theta": 2000,
|
| 38 |
+
"timestep_guidance_channels": 256
|
| 39 |
+
}
|
transformer/diffusion_pytorch_model-00001-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:06743432eddc6789c515742895823358510b92fe370f2a34b494a5e6eea0232a
|
| 3 |
+
size 9992770778
|
transformer/diffusion_pytorch_model-00002-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1166a702ed248a14918ae2d4810802d50f4736495ea76237ab8111080d5bbb3a
|
| 3 |
+
size 8132999189
|
transformer/diffusion_pytorch_model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
vae/config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "AutoencoderKLFlux2",
|
| 3 |
+
"_diffusers_version": "0.37.0.dev0",
|
| 4 |
+
"_name_or_path": "black-forest-labs/FLUX.2-dev",
|
| 5 |
+
"act_fn": "silu",
|
| 6 |
+
"batch_norm_eps": 0.0001,
|
| 7 |
+
"batch_norm_momentum": 0.1,
|
| 8 |
+
"block_out_channels": [
|
| 9 |
+
128,
|
| 10 |
+
256,
|
| 11 |
+
512,
|
| 12 |
+
512
|
| 13 |
+
],
|
| 14 |
+
"down_block_types": [
|
| 15 |
+
"DownEncoderBlock2D",
|
| 16 |
+
"DownEncoderBlock2D",
|
| 17 |
+
"DownEncoderBlock2D",
|
| 18 |
+
"DownEncoderBlock2D"
|
| 19 |
+
],
|
| 20 |
+
"force_upcast": true,
|
| 21 |
+
"in_channels": 3,
|
| 22 |
+
"latent_channels": 32,
|
| 23 |
+
"layers_per_block": 2,
|
| 24 |
+
"mid_block_add_attention": true,
|
| 25 |
+
"norm_num_groups": 32,
|
| 26 |
+
"out_channels": 3,
|
| 27 |
+
"patch_size": [
|
| 28 |
+
2,
|
| 29 |
+
2
|
| 30 |
+
],
|
| 31 |
+
"sample_size": 1024,
|
| 32 |
+
"up_block_types": [
|
| 33 |
+
"UpDecoderBlock2D",
|
| 34 |
+
"UpDecoderBlock2D",
|
| 35 |
+
"UpDecoderBlock2D",
|
| 36 |
+
"UpDecoderBlock2D"
|
| 37 |
+
],
|
| 38 |
+
"use_post_quant_conv": true,
|
| 39 |
+
"use_quant_conv": true
|
| 40 |
+
}
|
vae/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d64f3a68e1cc4f9f4e29b6e0da38a0204fe9a49f2d4053f0ec1fa1ca02f9c4b5
|
| 3 |
+
size 336213556
|