Initial commit
Browse files- README.md +8 -0
- bert/config.json +26 -0
- bert/pytorch_model.bin +3 -0
- model_index.json +24 -0
- original_ckpt.bin +3 -0
- scheduler/scheduler_config.json +14 -0
- tokenizer/special_tokens_map.json +7 -0
- tokenizer/tokenizer.json +0 -0
- tokenizer/tokenizer_config.json +14 -0
- tokenizer/vocab.txt +0 -0
- unet/config.json +49 -0
- unet/diffusion_pytorch_model.bin +3 -0
- vqvae/config.json +29 -0
- vqvae/diffusion_pytorch_model.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
This model is converted with https://github.com/huggingface/diffusers/blob/main/scripts/convert_original_stable_diffusion_to_diffusers.py.
|
| 2 |
+
|
| 3 |
+
However, the tokenizer in the diffuser model is wrong, for proper usage, see description at https://medium.com/@enryu9000/anifusion-diffusion-models-for-anime-pictures-138cf1af2cbe, and instructions/examples at https://github.com/enryu43/anifusion2-stable-diffusion.
|
| 4 |
+
|
| 5 |
+
Also, the original checkpoint in the Latent Diffusion format is available.
|
| 6 |
+
|
| 7 |
+
Installation instructions for webui: https://gist.github.com/enryu43/fccaa7f165ffcb214780d203c565761f
|
| 8 |
+
|
bert/config.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"activation_dropout": 0.0,
|
| 3 |
+
"activation_function": "gelu",
|
| 4 |
+
"architectures": [
|
| 5 |
+
"LDMBertModel"
|
| 6 |
+
],
|
| 7 |
+
"attention_dropout": 0.0,
|
| 8 |
+
"classifier_dropout": 0.0,
|
| 9 |
+
"d_model": 1024,
|
| 10 |
+
"dropout": 0.1,
|
| 11 |
+
"encoder_attention_heads": 8,
|
| 12 |
+
"encoder_ffn_dim": 4096,
|
| 13 |
+
"encoder_layerdrop": 0.0,
|
| 14 |
+
"encoder_layers": 12,
|
| 15 |
+
"head_dim": 64,
|
| 16 |
+
"init_std": 0.02,
|
| 17 |
+
"max_position_embeddings": 50,
|
| 18 |
+
"model_type": "ldmbert",
|
| 19 |
+
"num_hidden_layers": 12,
|
| 20 |
+
"pad_token_id": 0,
|
| 21 |
+
"scale_embedding": false,
|
| 22 |
+
"torch_dtype": "float32",
|
| 23 |
+
"transformers_version": "4.23.1",
|
| 24 |
+
"use_cache": true,
|
| 25 |
+
"vocab_size": 12221
|
| 26 |
+
}
|
bert/pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:40d1e2bf67be1671a9d130d40d8197fb133b6d8321570ab39ee4f10f709c5d34
|
| 3 |
+
size 604235221
|
model_index.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "LDMTextToImagePipeline",
|
| 3 |
+
"_diffusers_version": "0.11.1",
|
| 4 |
+
"bert": [
|
| 5 |
+
"latent_diffusion",
|
| 6 |
+
"LDMBertModel"
|
| 7 |
+
],
|
| 8 |
+
"scheduler": [
|
| 9 |
+
"diffusers",
|
| 10 |
+
"PNDMScheduler"
|
| 11 |
+
],
|
| 12 |
+
"tokenizer": [
|
| 13 |
+
"transformers",
|
| 14 |
+
"BertTokenizerFast"
|
| 15 |
+
],
|
| 16 |
+
"unet": [
|
| 17 |
+
"diffusers",
|
| 18 |
+
"UNet2DConditionModel"
|
| 19 |
+
],
|
| 20 |
+
"vqvae": [
|
| 21 |
+
"diffusers",
|
| 22 |
+
"AutoencoderKL"
|
| 23 |
+
]
|
| 24 |
+
}
|
original_ckpt.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1c09484d57cdbc5875dcdba88ff818b40dcde4513c715eb16758bb8694dfbca6
|
| 3 |
+
size 4402968141
|
scheduler/scheduler_config.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "PNDMScheduler",
|
| 3 |
+
"_diffusers_version": "0.11.1",
|
| 4 |
+
"beta_end": 0.012,
|
| 5 |
+
"beta_schedule": "scaled_linear",
|
| 6 |
+
"beta_start": 0.00085,
|
| 7 |
+
"clip_sample": false,
|
| 8 |
+
"num_train_timesteps": 1000,
|
| 9 |
+
"prediction_type": "epsilon",
|
| 10 |
+
"set_alpha_to_one": false,
|
| 11 |
+
"skip_prk_steps": true,
|
| 12 |
+
"steps_offset": 1,
|
| 13 |
+
"trained_betas": null
|
| 14 |
+
}
|
tokenizer/special_tokens_map.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"mask_token": "[MASK]",
|
| 4 |
+
"pad_token": "[PAD]",
|
| 5 |
+
"sep_token": "[SEP]",
|
| 6 |
+
"unk_token": "[UNK]"
|
| 7 |
+
}
|
tokenizer/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer/tokenizer_config.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"do_lower_case": true,
|
| 4 |
+
"mask_token": "[MASK]",
|
| 5 |
+
"model_max_length": 512,
|
| 6 |
+
"name_or_path": "bert-base-uncased",
|
| 7 |
+
"pad_token": "[PAD]",
|
| 8 |
+
"sep_token": "[SEP]",
|
| 9 |
+
"special_tokens_map_file": null,
|
| 10 |
+
"strip_accents": null,
|
| 11 |
+
"tokenize_chinese_chars": true,
|
| 12 |
+
"tokenizer_class": "BertTokenizer",
|
| 13 |
+
"unk_token": "[UNK]"
|
| 14 |
+
}
|
tokenizer/vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
unet/config.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "UNet2DConditionModel",
|
| 3 |
+
"_diffusers_version": "0.11.1",
|
| 4 |
+
"act_fn": "silu",
|
| 5 |
+
"attention_head_dim": [
|
| 6 |
+
5,
|
| 7 |
+
10,
|
| 8 |
+
20,
|
| 9 |
+
20
|
| 10 |
+
],
|
| 11 |
+
"block_out_channels": [
|
| 12 |
+
320,
|
| 13 |
+
640,
|
| 14 |
+
1280,
|
| 15 |
+
1280
|
| 16 |
+
],
|
| 17 |
+
"center_input_sample": false,
|
| 18 |
+
"class_embed_type": null,
|
| 19 |
+
"cross_attention_dim": 1024,
|
| 20 |
+
"down_block_types": [
|
| 21 |
+
"CrossAttnDownBlock2D",
|
| 22 |
+
"CrossAttnDownBlock2D",
|
| 23 |
+
"CrossAttnDownBlock2D",
|
| 24 |
+
"DownBlock2D"
|
| 25 |
+
],
|
| 26 |
+
"downsample_padding": 1,
|
| 27 |
+
"dual_cross_attention": false,
|
| 28 |
+
"flip_sin_to_cos": true,
|
| 29 |
+
"freq_shift": 0,
|
| 30 |
+
"in_channels": 4,
|
| 31 |
+
"layers_per_block": 2,
|
| 32 |
+
"mid_block_scale_factor": 1,
|
| 33 |
+
"mid_block_type": "UNetMidBlock2DCrossAttn",
|
| 34 |
+
"norm_eps": 1e-05,
|
| 35 |
+
"norm_num_groups": 32,
|
| 36 |
+
"num_class_embeds": null,
|
| 37 |
+
"only_cross_attention": false,
|
| 38 |
+
"out_channels": 4,
|
| 39 |
+
"resnet_time_scale_shift": "default",
|
| 40 |
+
"sample_size": 64,
|
| 41 |
+
"up_block_types": [
|
| 42 |
+
"UpBlock2D",
|
| 43 |
+
"CrossAttnUpBlock2D",
|
| 44 |
+
"CrossAttnUpBlock2D",
|
| 45 |
+
"CrossAttnUpBlock2D"
|
| 46 |
+
],
|
| 47 |
+
"upcast_attention": false,
|
| 48 |
+
"use_linear_projection": true
|
| 49 |
+
}
|
unet/diffusion_pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9f02e43ab5d06227006162690d1bd9d3eb3e751847639dca1d0eca6bf1bfde1b
|
| 3 |
+
size 3463925093
|
vqvae/config.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "AutoencoderKL",
|
| 3 |
+
"_diffusers_version": "0.11.1",
|
| 4 |
+
"act_fn": "silu",
|
| 5 |
+
"block_out_channels": [
|
| 6 |
+
128,
|
| 7 |
+
256,
|
| 8 |
+
512,
|
| 9 |
+
512
|
| 10 |
+
],
|
| 11 |
+
"down_block_types": [
|
| 12 |
+
"DownEncoderBlock2D",
|
| 13 |
+
"DownEncoderBlock2D",
|
| 14 |
+
"DownEncoderBlock2D",
|
| 15 |
+
"DownEncoderBlock2D"
|
| 16 |
+
],
|
| 17 |
+
"in_channels": 3,
|
| 18 |
+
"latent_channels": 4,
|
| 19 |
+
"layers_per_block": 2,
|
| 20 |
+
"norm_num_groups": 32,
|
| 21 |
+
"out_channels": 3,
|
| 22 |
+
"sample_size": 512,
|
| 23 |
+
"up_block_types": [
|
| 24 |
+
"UpDecoderBlock2D",
|
| 25 |
+
"UpDecoderBlock2D",
|
| 26 |
+
"UpDecoderBlock2D",
|
| 27 |
+
"UpDecoderBlock2D"
|
| 28 |
+
]
|
| 29 |
+
}
|
vqvae/diffusion_pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:36bb8e1b54aba3a0914eb35fba13dcb107e9f18d379d1df2158732cd4bf56a94
|
| 3 |
+
size 334711857
|