katuni4ka commited on
Commit
1d0b4f3
1 Parent(s): 2f1bfbc

Upload 15 files

Browse files
feature_extractor/preprocessor_config.json CHANGED
@@ -1,20 +1,27 @@
1
  {
2
- "crop_size": 224,
 
 
 
3
  "do_center_crop": true,
4
  "do_convert_rgb": true,
5
  "do_normalize": true,
 
6
  "do_resize": true,
7
- "feature_extractor_type": "CLIPFeatureExtractor",
8
  "image_mean": [
9
  0.48145466,
10
  0.4578275,
11
  0.40821073
12
  ],
 
13
  "image_std": [
14
  0.26862954,
15
  0.26130258,
16
  0.27577711
17
  ],
18
  "resample": 3,
19
- "size": 224
 
 
 
20
  }
 
1
  {
2
+ "crop_size": {
3
+ "height": 224,
4
+ "width": 224
5
+ },
6
  "do_center_crop": true,
7
  "do_convert_rgb": true,
8
  "do_normalize": true,
9
+ "do_rescale": true,
10
  "do_resize": true,
 
11
  "image_mean": [
12
  0.48145466,
13
  0.4578275,
14
  0.40821073
15
  ],
16
+ "image_processor_type": "CLIPImageProcessor",
17
  "image_std": [
18
  0.26862954,
19
  0.26130258,
20
  0.27577711
21
  ],
22
  "resample": 3,
23
+ "rescale_factor": 0.00392156862745098,
24
+ "size": {
25
+ "shortest_edge": 224
26
+ }
27
  }
model_index.json CHANGED
@@ -1,15 +1,20 @@
1
  {
2
  "_class_name": "StableDiffusionPipeline",
3
- "_diffusers_version": "0.7.0.dev0",
 
4
  "feature_extractor": [
5
  "transformers",
6
  "CLIPImageProcessor"
7
  ],
 
 
 
 
8
  "requires_safety_checker": true,
9
  "safety_checker": [
10
- "stable_diffusion",
11
- "StableDiffusionSafetyChecker"
12
- ],
13
  "scheduler": [
14
  "diffusers",
15
  "PNDMScheduler"
 
1
  {
2
  "_class_name": "StableDiffusionPipeline",
3
+ "_diffusers_version": "0.31.0",
4
+ "_name_or_path": "tiny-stable-diffusion-with-safety-checker",
5
  "feature_extractor": [
6
  "transformers",
7
  "CLIPImageProcessor"
8
  ],
9
+ "image_encoder": [
10
+ null,
11
+ null
12
+ ],
13
  "requires_safety_checker": true,
14
  "safety_checker": [
15
+ "stable_diffusion",
16
+ "StableDiffusionSafetyChecker"
17
+ ],
18
  "scheduler": [
19
  "diffusers",
20
  "PNDMScheduler"
safety_checker/config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "CompVis/stable-diffusion-safety-checker",
3
  "architectures": [
4
  "StableDiffusionSafetyChecker"
5
  ],
 
1
  {
2
+ "_name_or_path": "/home/ea/work/my_optimum_intel/optimum-intel/tiny-stable-diffusion-with-safety-checker/safety_checker",
3
  "architectures": [
4
  "StableDiffusionSafetyChecker"
5
  ],
scheduler/scheduler_config.json CHANGED
@@ -1,13 +1,15 @@
1
  {
2
  "_class_name": "PNDMScheduler",
3
- "_diffusers_version": "0.7.0.dev0",
4
  "beta_end": 0.012,
5
  "beta_schedule": "scaled_linear",
6
  "beta_start": 0.00085,
 
7
  "num_train_timesteps": 1000,
 
8
  "set_alpha_to_one": false,
9
  "skip_prk_steps": true,
10
  "steps_offset": 1,
11
- "trained_betas": null,
12
- "clip_sample": false
13
  }
 
1
  {
2
  "_class_name": "PNDMScheduler",
3
+ "_diffusers_version": "0.31.0",
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
+ "timestep_spacing": "leading",
14
+ "trained_betas": null
15
  }
text_encoder/config.json CHANGED
@@ -1,4 +1,5 @@
1
  {
 
2
  "architectures": [
3
  "CLIPTextModel"
4
  ],
@@ -17,7 +18,8 @@
17
  "num_attention_heads": 4,
18
  "num_hidden_layers": 5,
19
  "pad_token_id": 1,
 
20
  "torch_dtype": "float32",
21
- "transformers_version": "4.22.2",
22
  "vocab_size": 1000
23
  }
 
1
  {
2
+ "_name_or_path": "/home/ea/work/my_optimum_intel/optimum-intel/tiny-stable-diffusion-with-safety-checker/text_encoder",
3
  "architectures": [
4
  "CLIPTextModel"
5
  ],
 
18
  "num_attention_heads": 4,
19
  "num_hidden_layers": 5,
20
  "pad_token_id": 1,
21
+ "projection_dim": 512,
22
  "torch_dtype": "float32",
23
+ "transformers_version": "4.46.2",
24
  "vocab_size": 1000
25
  }
text_encoder/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:103860291b96610a23d9dda96f6a3c4e6c6dd67e5984a0d5e7c8e62769ac6412
3
+ size 283212
tokenizer/tokenizer_config.json CHANGED
@@ -1,34 +1,30 @@
1
  {
2
  "add_prefix_space": false,
3
- "bos_token": {
4
- "__type": "AddedToken",
5
- "content": "<|startoftext|>",
6
- "lstrip": false,
7
- "normalized": true,
8
- "rstrip": false,
9
- "single_word": false
 
 
 
 
 
 
 
 
 
 
10
  },
 
 
11
  "do_lower_case": true,
12
- "eos_token": {
13
- "__type": "AddedToken",
14
- "content": "<|endoftext|>",
15
- "lstrip": false,
16
- "normalized": true,
17
- "rstrip": false,
18
- "single_word": false
19
- },
20
  "errors": "replace",
21
  "model_max_length": 77,
22
- "name_or_path": "hf-internal-testing/tiny-random-clip",
23
  "pad_token": "<|endoftext|>",
24
- "special_tokens_map_file": "/home/lysandre/.cache/huggingface/transformers/18a566598f286c9139f88160c99f84eec492a26bd22738fa9cb44d5b7e0a5c76.cce1206abbad28826f000510f22f354e53e66a97f7c23745a7dfe27609cc07f5",
25
  "tokenizer_class": "CLIPTokenizer",
26
- "unk_token": {
27
- "__type": "AddedToken",
28
- "content": "<|endoftext|>",
29
- "lstrip": false,
30
- "normalized": true,
31
- "rstrip": false,
32
- "single_word": false
33
- }
34
  }
 
1
  {
2
  "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "<|startoftext|>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "1": {
13
+ "content": "<|endoftext|>",
14
+ "lstrip": false,
15
+ "normalized": true,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ }
20
  },
21
+ "bos_token": "<|startoftext|>",
22
+ "clean_up_tokenization_spaces": false,
23
  "do_lower_case": true,
24
+ "eos_token": "<|endoftext|>",
 
 
 
 
 
 
 
25
  "errors": "replace",
26
  "model_max_length": 77,
 
27
  "pad_token": "<|endoftext|>",
 
28
  "tokenizer_class": "CLIPTokenizer",
29
+ "unk_token": "<|endoftext|>"
 
 
 
 
 
 
 
30
  }
unet/config.json CHANGED
@@ -1,30 +1,62 @@
1
  {
2
  "_class_name": "UNet2DConditionModel",
3
- "_diffusers_version": "0.7.0.dev0",
 
4
  "act_fn": "silu",
 
 
 
5
  "attention_head_dim": 8,
 
6
  "block_out_channels": [
7
  32,
8
  64
9
  ],
10
  "center_input_sample": false,
 
 
 
 
11
  "cross_attention_dim": 32,
 
12
  "down_block_types": [
13
  "DownBlock2D",
14
  "CrossAttnDownBlock2D"
15
  ],
16
  "downsample_padding": 1,
 
 
 
 
17
  "flip_sin_to_cos": true,
18
  "freq_shift": 0,
19
  "in_channels": 4,
20
  "layers_per_block": 2,
 
21
  "mid_block_scale_factor": 1,
 
22
  "norm_eps": 1e-05,
23
  "norm_num_groups": 32,
 
 
 
24
  "out_channels": 4,
25
- "sample_size": 32,
 
 
 
 
 
 
 
 
 
 
 
26
  "up_block_types": [
27
  "CrossAttnUpBlock2D",
28
  "UpBlock2D"
29
- ]
 
 
30
  }
 
1
  {
2
  "_class_name": "UNet2DConditionModel",
3
+ "_diffusers_version": "0.31.0",
4
+ "_name_or_path": "/home/ea/work/my_optimum_intel/optimum-intel/tiny-stable-diffusion-with-safety-checker/unet",
5
  "act_fn": "silu",
6
+ "addition_embed_type": null,
7
+ "addition_embed_type_num_heads": 64,
8
+ "addition_time_embed_dim": null,
9
  "attention_head_dim": 8,
10
+ "attention_type": "default",
11
  "block_out_channels": [
12
  32,
13
  64
14
  ],
15
  "center_input_sample": false,
16
+ "class_embed_type": null,
17
+ "class_embeddings_concat": false,
18
+ "conv_in_kernel": 3,
19
+ "conv_out_kernel": 3,
20
  "cross_attention_dim": 32,
21
+ "cross_attention_norm": null,
22
  "down_block_types": [
23
  "DownBlock2D",
24
  "CrossAttnDownBlock2D"
25
  ],
26
  "downsample_padding": 1,
27
+ "dropout": 0.0,
28
+ "dual_cross_attention": false,
29
+ "encoder_hid_dim": null,
30
+ "encoder_hid_dim_type": null,
31
  "flip_sin_to_cos": true,
32
  "freq_shift": 0,
33
  "in_channels": 4,
34
  "layers_per_block": 2,
35
+ "mid_block_only_cross_attention": null,
36
  "mid_block_scale_factor": 1,
37
+ "mid_block_type": "UNetMidBlock2DCrossAttn",
38
  "norm_eps": 1e-05,
39
  "norm_num_groups": 32,
40
+ "num_attention_heads": null,
41
+ "num_class_embeds": null,
42
+ "only_cross_attention": false,
43
  "out_channels": 4,
44
+ "projection_class_embeddings_input_dim": null,
45
+ "resnet_out_scale_factor": 1.0,
46
+ "resnet_skip_time_act": false,
47
+ "resnet_time_scale_shift": "default",
48
+ "reverse_transformer_layers_per_block": null,
49
+ "sample_size": 64,
50
+ "time_cond_proj_dim": null,
51
+ "time_embedding_act_fn": null,
52
+ "time_embedding_dim": null,
53
+ "time_embedding_type": "positional",
54
+ "timestep_post_act": null,
55
+ "transformer_layers_per_block": 1,
56
  "up_block_types": [
57
  "CrossAttnUpBlock2D",
58
  "UpBlock2D"
59
+ ],
60
+ "upcast_attention": false,
61
+ "use_linear_projection": false
62
  }
unet/diffusion_pytorch_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c69e435ef37a4e0fe3471d2c9488924bdf534cb51c08e9450420784d53336d73
3
+ size 5742160
vae/config.json CHANGED
@@ -1,6 +1,7 @@
1
  {
2
  "_class_name": "AutoencoderKL",
3
- "_diffusers_version": "0.7.0.dev0",
 
4
  "act_fn": "silu",
5
  "block_out_channels": [
6
  32,
@@ -10,14 +11,22 @@
10
  "DownEncoderBlock2D",
11
  "DownEncoderBlock2D"
12
  ],
 
13
  "in_channels": 3,
14
  "latent_channels": 4,
 
 
15
  "layers_per_block": 1,
 
16
  "norm_num_groups": 32,
17
  "out_channels": 3,
18
  "sample_size": 128,
 
 
19
  "up_block_types": [
20
  "UpDecoderBlock2D",
21
  "UpDecoderBlock2D"
22
- ]
 
 
23
  }
 
1
  {
2
  "_class_name": "AutoencoderKL",
3
+ "_diffusers_version": "0.31.0",
4
+ "_name_or_path": "/home/ea/work/my_optimum_intel/optimum-intel/tiny-stable-diffusion-with-safety-checker/vae",
5
  "act_fn": "silu",
6
  "block_out_channels": [
7
  32,
 
11
  "DownEncoderBlock2D",
12
  "DownEncoderBlock2D"
13
  ],
14
+ "force_upcast": true,
15
  "in_channels": 3,
16
  "latent_channels": 4,
17
+ "latents_mean": null,
18
+ "latents_std": null,
19
  "layers_per_block": 1,
20
+ "mid_block_add_attention": true,
21
  "norm_num_groups": 32,
22
  "out_channels": 3,
23
  "sample_size": 128,
24
+ "scaling_factor": 0.18215,
25
+ "shift_factor": null,
26
  "up_block_types": [
27
  "UpDecoderBlock2D",
28
  "UpDecoderBlock2D"
29
+ ],
30
+ "use_post_quant_conv": true,
31
+ "use_quant_conv": true
32
  }
vae/diffusion_pytorch_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7999b516094ac4239121d9f62a37e6be99620e7016220011bb99cf8b1a391aad
3
+ size 2646532