Instructions to use madtune/pixeldit-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use madtune/pixeldit-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("nvidia/PixelDiT-1300M-1024px", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("madtune/pixeldit-diffusers") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Upload PixelDiTPipeline
Browse files- .gitattributes +1 -0
- README.md +7 -6
- model_index.json +18 -5
- scheduler/scheduler_config.json +9 -2
- text_encoder/config.json +68 -0
- text_encoder/model.safetensors +3 -0
- tokenizer/chat_template.jinja +4 -0
- tokenizer/tokenizer.json +3 -0
- tokenizer/tokenizer_config.json +20 -0
- transformer/config.json +13 -12
- transformer/diffusion_pytorch_model.safetensors +2 -2
.gitattributes
CHANGED
|
@@ -34,3 +34,4 @@ saved_model/**/* 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/banner.png 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/banner.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
| 1 |
---
|
| 2 |
license: other
|
| 3 |
tags:
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
base_model: nvidia/PixelDiT-1300M-1024px
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |

|
|
|
|
| 1 |
---
|
| 2 |
license: other
|
| 3 |
tags:
|
| 4 |
+
- text-to-image
|
| 5 |
+
- diffusion
|
| 6 |
+
- pixeldit
|
| 7 |
+
- nvidia
|
| 8 |
+
- pixel-space
|
| 9 |
+
- lora
|
| 10 |
base_model: nvidia/PixelDiT-1300M-1024px
|
| 11 |
+
library_name: diffusers
|
| 12 |
---
|
| 13 |
|
| 14 |

|
model_index.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
| 1 |
{
|
| 2 |
"_class_name": "PixelDiTPipeline",
|
| 3 |
-
"_diffusers_version": "0.
|
| 4 |
-
"
|
| 5 |
-
"scheduler": [
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"_class_name": "PixelDiTPipeline",
|
| 3 |
+
"_diffusers_version": "0.38.0",
|
| 4 |
+
"_name_or_path": "madtune/pixeldit-diffusers",
|
| 5 |
+
"scheduler": [
|
| 6 |
+
"diffusers",
|
| 7 |
+
"FlowMatchEulerDiscreteScheduler"
|
| 8 |
+
],
|
| 9 |
+
"text_encoder": [
|
| 10 |
+
"transformers",
|
| 11 |
+
"Gemma2Model"
|
| 12 |
+
],
|
| 13 |
+
"tokenizer": [
|
| 14 |
+
"transformers",
|
| 15 |
+
"TokenizersBackend"
|
| 16 |
+
],
|
| 17 |
+
"transformer": [
|
| 18 |
+
"pixeldit",
|
| 19 |
+
"PixelDiTModel"
|
| 20 |
+
]
|
| 21 |
}
|
scheduler/scheduler_config.json
CHANGED
|
@@ -1,11 +1,18 @@
|
|
| 1 |
{
|
| 2 |
"_class_name": "FlowMatchEulerDiscreteScheduler",
|
| 3 |
-
"_diffusers_version": "0.
|
| 4 |
"base_image_seq_len": 256,
|
| 5 |
"base_shift": 0.5,
|
|
|
|
| 6 |
"max_image_seq_len": 4096,
|
| 7 |
"max_shift": 1.15,
|
| 8 |
"num_train_timesteps": 1000,
|
| 9 |
"shift": 4.0,
|
| 10 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"_class_name": "FlowMatchEulerDiscreteScheduler",
|
| 3 |
+
"_diffusers_version": "0.38.0",
|
| 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": 4.0,
|
| 11 |
+
"shift_terminal": null,
|
| 12 |
+
"stochastic_sampling": false,
|
| 13 |
+
"time_shift_type": "exponential",
|
| 14 |
+
"use_beta_sigmas": false,
|
| 15 |
+
"use_dynamic_shifting": false,
|
| 16 |
+
"use_exponential_sigmas": false,
|
| 17 |
+
"use_karras_sigmas": false
|
| 18 |
}
|
text_encoder/config.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Gemma2Model"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"attn_logit_softcapping": 50.0,
|
| 8 |
+
"bos_token_id": 2,
|
| 9 |
+
"cache_implementation": "hybrid",
|
| 10 |
+
"dtype": "bfloat16",
|
| 11 |
+
"eos_token_id": [
|
| 12 |
+
1,
|
| 13 |
+
107
|
| 14 |
+
],
|
| 15 |
+
"final_logit_softcapping": 30.0,
|
| 16 |
+
"head_dim": 256,
|
| 17 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 18 |
+
"hidden_activation": "gelu_pytorch_tanh",
|
| 19 |
+
"hidden_size": 2304,
|
| 20 |
+
"initializer_range": 0.02,
|
| 21 |
+
"intermediate_size": 9216,
|
| 22 |
+
"layer_types": [
|
| 23 |
+
"sliding_attention",
|
| 24 |
+
"full_attention",
|
| 25 |
+
"sliding_attention",
|
| 26 |
+
"full_attention",
|
| 27 |
+
"sliding_attention",
|
| 28 |
+
"full_attention",
|
| 29 |
+
"sliding_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"sliding_attention",
|
| 32 |
+
"full_attention",
|
| 33 |
+
"sliding_attention",
|
| 34 |
+
"full_attention",
|
| 35 |
+
"sliding_attention",
|
| 36 |
+
"full_attention",
|
| 37 |
+
"sliding_attention",
|
| 38 |
+
"full_attention",
|
| 39 |
+
"sliding_attention",
|
| 40 |
+
"full_attention",
|
| 41 |
+
"sliding_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"sliding_attention",
|
| 44 |
+
"full_attention",
|
| 45 |
+
"sliding_attention",
|
| 46 |
+
"full_attention",
|
| 47 |
+
"sliding_attention",
|
| 48 |
+
"full_attention"
|
| 49 |
+
],
|
| 50 |
+
"max_position_embeddings": 8192,
|
| 51 |
+
"model_type": "gemma2",
|
| 52 |
+
"num_attention_heads": 8,
|
| 53 |
+
"num_hidden_layers": 26,
|
| 54 |
+
"num_key_value_heads": 4,
|
| 55 |
+
"pad_token_id": 0,
|
| 56 |
+
"query_pre_attn_scalar": 256,
|
| 57 |
+
"rms_norm_eps": 1e-06,
|
| 58 |
+
"rope_parameters": {
|
| 59 |
+
"rope_theta": 10000.0,
|
| 60 |
+
"rope_type": "default"
|
| 61 |
+
},
|
| 62 |
+
"sliding_window": 4096,
|
| 63 |
+
"tie_word_embeddings": true,
|
| 64 |
+
"transformers_version": "5.12.0",
|
| 65 |
+
"use_bidirectional_attention": null,
|
| 66 |
+
"use_cache": true,
|
| 67 |
+
"vocab_size": 256000
|
| 68 |
+
}
|
text_encoder/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:000dea06e8c2d7a7083aee972038d940ec7261cb26d8b1def42a85a12dc7c201
|
| 3 |
+
size 5228715784
|
tokenizer/chat_template.jinja
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{{ bos_token }}{% if messages[0]['role'] == 'system' %}{{ raise_exception('System role not supported') }}{% endif %}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if (message['role'] == 'assistant') %}{% set role = 'model' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '<start_of_turn>' + role + '
|
| 2 |
+
' + message['content'] | trim + '<end_of_turn>
|
| 3 |
+
' }}{% endfor %}{% if add_generation_prompt %}{{'<start_of_turn>model
|
| 4 |
+
'}}{% endif %}
|
tokenizer/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:487cee8724215dcd2dde8888539e8b1bf844ceb5dbbe27f7845abda69eeb060f
|
| 3 |
+
size 34362872
|
tokenizer/tokenizer_config.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<bos>",
|
| 4 |
+
"clean_up_tokenization_spaces": false,
|
| 5 |
+
"eos_token": "<eos>",
|
| 6 |
+
"extra_special_tokens": [
|
| 7 |
+
"<start_of_turn>",
|
| 8 |
+
"<end_of_turn>"
|
| 9 |
+
],
|
| 10 |
+
"is_local": true,
|
| 11 |
+
"local_files_only": false,
|
| 12 |
+
"mask_token": "<mask>",
|
| 13 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 14 |
+
"pad_token": "<pad>",
|
| 15 |
+
"sp_model_kwargs": {},
|
| 16 |
+
"spaces_between_special_tokens": false,
|
| 17 |
+
"tokenizer_class": "TokenizersBackend",
|
| 18 |
+
"unk_token": "<unk>",
|
| 19 |
+
"use_default_system_prompt": false
|
| 20 |
+
}
|
transformer/config.json
CHANGED
|
@@ -1,20 +1,21 @@
|
|
| 1 |
{
|
| 2 |
"_class_name": "PixelDiTModel",
|
| 3 |
-
"_diffusers_version": "0.
|
|
|
|
|
|
|
| 4 |
"in_channels": 3,
|
| 5 |
"num_groups": 24,
|
| 6 |
-
"hidden_size": 1536,
|
| 7 |
-
"pixel_hidden_size": 16,
|
| 8 |
-
"pixel_attn_hidden_size": 1152,
|
| 9 |
-
"pixel_num_groups": 16,
|
| 10 |
-
"patch_depth": 14,
|
| 11 |
-
"pixel_depth": 2,
|
| 12 |
"num_text_blocks": 4,
|
|
|
|
| 13 |
"patch_size": 16,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
"txt_embed_dim": 2304,
|
| 15 |
"txt_max_length": 300,
|
| 16 |
-
"
|
| 17 |
-
"
|
| 18 |
-
|
| 19 |
-
"use_pixel_abs_pos": true
|
| 20 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
"_class_name": "PixelDiTModel",
|
| 3 |
+
"_diffusers_version": "0.38.0",
|
| 4 |
+
"_name_or_path": "/home/nobus/.cache/huggingface/hub/models--madtune--pixeldit-diffusers/snapshots/fbc6fce378046ae499485e47fd604c8607208387/transformer",
|
| 5 |
+
"hidden_size": 1536,
|
| 6 |
"in_channels": 3,
|
| 7 |
"num_groups": 24,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
"num_text_blocks": 4,
|
| 9 |
+
"patch_depth": 14,
|
| 10 |
"patch_size": 16,
|
| 11 |
+
"pixel_attn_hidden_size": 1152,
|
| 12 |
+
"pixel_depth": 2,
|
| 13 |
+
"pixel_hidden_size": 16,
|
| 14 |
+
"pixel_num_groups": 16,
|
| 15 |
+
"repa_encoder_index": -1,
|
| 16 |
+
"text_rope_theta": 10000.0,
|
| 17 |
"txt_embed_dim": 2304,
|
| 18 |
"txt_max_length": 300,
|
| 19 |
+
"use_pixel_abs_pos": true,
|
| 20 |
+
"use_text_rope": true
|
| 21 |
+
}
|
|
|
|
|
|
transformer/diffusion_pytorch_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:74931d95302a4581a31060e5031149ab2446732be56a4305a76355443c0395b6
|
| 3 |
+
size 2604985550
|