Jingya HUANG commited on
Commit
153465c
1 Parent(s): 0d24657
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip 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
 
 
33
  *.zip 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
+ *.neuron filter=lfs diff=lfs merge=lfs -text
feature_extractor/preprocessor_config.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "StableDiffusionPipeline",
3
+ "_diffusers_version": "0.30.3",
4
+ "_name_or_path": "stabilityai/stable-diffusion-2-1-base",
5
+ "feature_extractor": [
6
+ "transformers",
7
+ "CLIPImageProcessor"
8
+ ],
9
+ "image_encoder": [
10
+ null,
11
+ null
12
+ ],
13
+ "requires_safety_checker": false,
14
+ "safety_checker": [
15
+ null,
16
+ null
17
+ ],
18
+ "scheduler": [
19
+ "diffusers",
20
+ "PNDMScheduler"
21
+ ],
22
+ "text_encoder": [
23
+ "transformers",
24
+ "CLIPTextModel"
25
+ ],
26
+ "tokenizer": [
27
+ "transformers",
28
+ "CLIPTokenizer"
29
+ ],
30
+ "unet": [
31
+ "diffusers",
32
+ "UNet2DConditionModel"
33
+ ],
34
+ "vae": [
35
+ "diffusers",
36
+ "AutoencoderKL"
37
+ ]
38
+ }
scheduler/scheduler_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "PNDMScheduler",
3
+ "_diffusers_version": "0.30.3",
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 ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/home/ubuntu/.cache/huggingface/hub/models--stabilityai--stable-diffusion-2-1-base/snapshots/5ede9e4bf3e3fd1cb0ef2f7a3fff13ee514fdf06/text_encoder",
3
+ "architectures": [
4
+ "CLIPTextModel"
5
+ ],
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 0,
8
+ "dropout": 0.0,
9
+ "eos_token_id": 2,
10
+ "hidden_act": "gelu",
11
+ "hidden_size": 1024,
12
+ "initializer_factor": 1.0,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 4096,
15
+ "layer_norm_eps": 1e-05,
16
+ "max_position_embeddings": 77,
17
+ "model_type": "clip_text_model",
18
+ "neuron": {
19
+ "auto_cast": "matmul",
20
+ "auto_cast_type": "bf16",
21
+ "compiler_type": "neuronx-cc",
22
+ "compiler_version": "2.15.128.0+56dc5a86",
23
+ "dynamic_batch_size": false,
24
+ "inline_weights_to_neff": false,
25
+ "input_names": [
26
+ "input_ids"
27
+ ],
28
+ "model_type": "clip-text-model",
29
+ "optlevel": "2",
30
+ "output_attentions": false,
31
+ "output_hidden_states": false,
32
+ "output_names": [
33
+ "last_hidden_state",
34
+ "pooler_output"
35
+ ],
36
+ "static_batch_size": 1,
37
+ "static_sequence_length": 77
38
+ },
39
+ "num_attention_heads": 16,
40
+ "num_hidden_layers": 23,
41
+ "pad_token_id": 1,
42
+ "projection_dim": 512,
43
+ "task": "feature-extraction",
44
+ "torch_dtype": "float32",
45
+ "torchscript": true,
46
+ "transformers_version": "4.43.2",
47
+ "vocab_size": 49408
48
+ }
text_encoder/model.neuron ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e29b3f822fc16240a8a25612fd1caffea6f0aec9fde71e5013c1f40108f977a3
3
+ size 1373452281
tokenizer/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer/special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|startoftext|>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "!",
17
+ "unk_token": {
18
+ "content": "<|endoftext|>",
19
+ "lstrip": false,
20
+ "normalized": true,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
tokenizer/tokenizer_config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "!",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "49406": {
13
+ "content": "<|startoftext|>",
14
+ "lstrip": false,
15
+ "normalized": true,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "49407": {
21
+ "content": "<|endoftext|>",
22
+ "lstrip": false,
23
+ "normalized": true,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ }
28
+ },
29
+ "bos_token": "<|startoftext|>",
30
+ "clean_up_tokenization_spaces": true,
31
+ "do_lower_case": true,
32
+ "eos_token": "<|endoftext|>",
33
+ "errors": "replace",
34
+ "model_max_length": 77,
35
+ "pad_token": "!",
36
+ "tokenizer_class": "CLIPTokenizer",
37
+ "unk_token": "<|endoftext|>"
38
+ }
tokenizer/vocab.json ADDED
The diff for this file is too large to render. See raw diff
 
unet/config.json ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "UNet2DConditionModel",
3
+ "_commit_hash": null,
4
+ "_diffusers_version": "0.30.3",
5
+ "_name_or_path": "/home/ubuntu/.cache/huggingface/hub/models--stabilityai--stable-diffusion-2-1-base/snapshots/5ede9e4bf3e3fd1cb0ef2f7a3fff13ee514fdf06/unet",
6
+ "_use_default_values": [
7
+ "encoder_hid_dim",
8
+ "resnet_time_scale_shift",
9
+ "addition_embed_type_num_heads",
10
+ "class_embed_type",
11
+ "mid_block_only_cross_attention",
12
+ "resnet_out_scale_factor",
13
+ "cross_attention_norm",
14
+ "attention_type",
15
+ "time_cond_proj_dim",
16
+ "time_embedding_dim",
17
+ "conv_out_kernel",
18
+ "upcast_attention",
19
+ "resnet_skip_time_act",
20
+ "transformer_layers_per_block",
21
+ "reverse_transformer_layers_per_block",
22
+ "time_embedding_type",
23
+ "time_embedding_act_fn",
24
+ "encoder_hid_dim_type",
25
+ "mid_block_type",
26
+ "timestep_post_act",
27
+ "dropout",
28
+ "projection_class_embeddings_input_dim",
29
+ "class_embeddings_concat",
30
+ "conv_in_kernel",
31
+ "addition_time_embed_dim",
32
+ "addition_embed_type",
33
+ "num_attention_heads"
34
+ ],
35
+ "act_fn": "silu",
36
+ "addition_embed_type": null,
37
+ "addition_embed_type_num_heads": 64,
38
+ "addition_time_embed_dim": null,
39
+ "attention_head_dim": [
40
+ 5,
41
+ 10,
42
+ 20,
43
+ 20
44
+ ],
45
+ "attention_type": "default",
46
+ "block_out_channels": [
47
+ 320,
48
+ 640,
49
+ 1280,
50
+ 1280
51
+ ],
52
+ "center_input_sample": false,
53
+ "class_embed_type": null,
54
+ "class_embeddings_concat": false,
55
+ "conv_in_kernel": 3,
56
+ "conv_out_kernel": 3,
57
+ "cross_attention_dim": 1024,
58
+ "cross_attention_norm": null,
59
+ "down_block_types": [
60
+ "CrossAttnDownBlock2D",
61
+ "CrossAttnDownBlock2D",
62
+ "CrossAttnDownBlock2D",
63
+ "DownBlock2D"
64
+ ],
65
+ "downsample_padding": 1,
66
+ "dropout": 0.0,
67
+ "dual_cross_attention": false,
68
+ "encoder_hid_dim": null,
69
+ "encoder_hid_dim_type": null,
70
+ "flip_sin_to_cos": true,
71
+ "freq_shift": 0,
72
+ "in_channels": 4,
73
+ "layers_per_block": 2,
74
+ "mid_block_only_cross_attention": null,
75
+ "mid_block_scale_factor": 1,
76
+ "mid_block_type": "UNetMidBlock2DCrossAttn",
77
+ "neuron": {
78
+ "auto_cast": "matmul",
79
+ "auto_cast_type": "bf16",
80
+ "compiler_type": "neuronx-cc",
81
+ "compiler_version": "2.15.128.0+56dc5a86",
82
+ "dynamic_batch_size": false,
83
+ "inline_weights_to_neff": false,
84
+ "input_names": [
85
+ "sample",
86
+ "timestep",
87
+ "encoder_hidden_states"
88
+ ],
89
+ "model_type": "unet",
90
+ "optlevel": "2",
91
+ "output_attentions": false,
92
+ "output_hidden_states": false,
93
+ "output_names": [
94
+ "sample"
95
+ ],
96
+ "static_batch_size": 1,
97
+ "static_height": 64,
98
+ "static_num_channels": 4,
99
+ "static_sequence_length": 77,
100
+ "static_vae_scale_factor": 8,
101
+ "static_width": 64
102
+ },
103
+ "norm_eps": 1e-05,
104
+ "norm_num_groups": 32,
105
+ "num_attention_heads": null,
106
+ "num_class_embeds": null,
107
+ "only_cross_attention": false,
108
+ "out_channels": 4,
109
+ "projection_class_embeddings_input_dim": null,
110
+ "resnet_out_scale_factor": 1.0,
111
+ "resnet_skip_time_act": false,
112
+ "resnet_time_scale_shift": "default",
113
+ "reverse_transformer_layers_per_block": null,
114
+ "sample_size": 64,
115
+ "task": "semantic-segmentation",
116
+ "time_cond_proj_dim": null,
117
+ "time_embedding_act_fn": null,
118
+ "time_embedding_dim": null,
119
+ "time_embedding_type": "positional",
120
+ "timestep_post_act": null,
121
+ "transformer_layers_per_block": 1,
122
+ "transformers_version": null,
123
+ "up_block_types": [
124
+ "UpBlock2D",
125
+ "CrossAttnUpBlock2D",
126
+ "CrossAttnUpBlock2D",
127
+ "CrossAttnUpBlock2D"
128
+ ],
129
+ "upcast_attention": false,
130
+ "use_linear_projection": true
131
+ }
unet/model.neuron ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0324e1f45e45874779e2e5227b02a69a8cc94f850acb63a9fc4a456d0b33ccd5
3
+ size 3541296845
vae_decoder/config.json ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "AutoencoderKL",
3
+ "_commit_hash": null,
4
+ "_diffusers_version": "0.30.3",
5
+ "_name_or_path": "/home/ubuntu/.cache/huggingface/hub/models--stabilityai--stable-diffusion-2-1-base/snapshots/5ede9e4bf3e3fd1cb0ef2f7a3fff13ee514fdf06/vae",
6
+ "_use_default_values": [
7
+ "latents_std",
8
+ "latents_mean",
9
+ "use_quant_conv",
10
+ "shift_factor",
11
+ "mid_block_add_attention",
12
+ "scaling_factor",
13
+ "force_upcast",
14
+ "use_post_quant_conv"
15
+ ],
16
+ "act_fn": "silu",
17
+ "block_out_channels": [
18
+ 128,
19
+ 256,
20
+ 512,
21
+ 512
22
+ ],
23
+ "down_block_types": [
24
+ "DownEncoderBlock2D",
25
+ "DownEncoderBlock2D",
26
+ "DownEncoderBlock2D",
27
+ "DownEncoderBlock2D"
28
+ ],
29
+ "force_upcast": true,
30
+ "in_channels": 3,
31
+ "latent_channels": 4,
32
+ "latents_mean": null,
33
+ "latents_std": null,
34
+ "layers_per_block": 2,
35
+ "mid_block_add_attention": true,
36
+ "neuron": {
37
+ "auto_cast": "matmul",
38
+ "auto_cast_type": "bf16",
39
+ "compiler_type": "neuronx-cc",
40
+ "compiler_version": "2.15.128.0+56dc5a86",
41
+ "dynamic_batch_size": false,
42
+ "inline_weights_to_neff": false,
43
+ "input_names": [
44
+ "latent_sample"
45
+ ],
46
+ "model_type": "vae-decoder",
47
+ "optlevel": "2",
48
+ "output_attentions": false,
49
+ "output_hidden_states": false,
50
+ "output_names": [
51
+ "sample"
52
+ ],
53
+ "static_batch_size": 1,
54
+ "static_height": 64,
55
+ "static_num_channels": 4,
56
+ "static_width": 64
57
+ },
58
+ "norm_num_groups": 32,
59
+ "out_channels": 3,
60
+ "sample_size": 768,
61
+ "scaling_factor": 0.18215,
62
+ "shift_factor": null,
63
+ "task": "semantic-segmentation",
64
+ "transformers_version": null,
65
+ "up_block_types": [
66
+ "UpDecoderBlock2D",
67
+ "UpDecoderBlock2D",
68
+ "UpDecoderBlock2D",
69
+ "UpDecoderBlock2D"
70
+ ],
71
+ "use_post_quant_conv": true,
72
+ "use_quant_conv": true
73
+ }
vae_decoder/model.neuron ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e778ba44291522b1793a2fbb5751232ab3f6767df2730c52f5de8f198f8c96ef
3
+ size 342346837
vae_encoder/config.json ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "AutoencoderKL",
3
+ "_commit_hash": null,
4
+ "_diffusers_version": "0.30.3",
5
+ "_name_or_path": "/home/ubuntu/.cache/huggingface/hub/models--stabilityai--stable-diffusion-2-1-base/snapshots/5ede9e4bf3e3fd1cb0ef2f7a3fff13ee514fdf06/vae",
6
+ "_use_default_values": [
7
+ "latents_std",
8
+ "latents_mean",
9
+ "use_quant_conv",
10
+ "shift_factor",
11
+ "mid_block_add_attention",
12
+ "scaling_factor",
13
+ "force_upcast",
14
+ "use_post_quant_conv"
15
+ ],
16
+ "act_fn": "silu",
17
+ "block_out_channels": [
18
+ 128,
19
+ 256,
20
+ 512,
21
+ 512
22
+ ],
23
+ "down_block_types": [
24
+ "DownEncoderBlock2D",
25
+ "DownEncoderBlock2D",
26
+ "DownEncoderBlock2D",
27
+ "DownEncoderBlock2D"
28
+ ],
29
+ "force_upcast": true,
30
+ "in_channels": 3,
31
+ "latent_channels": 4,
32
+ "latents_mean": null,
33
+ "latents_std": null,
34
+ "layers_per_block": 2,
35
+ "mid_block_add_attention": true,
36
+ "neuron": {
37
+ "auto_cast": "matmul",
38
+ "auto_cast_type": "bf16",
39
+ "compiler_type": "neuronx-cc",
40
+ "compiler_version": "2.15.128.0+56dc5a86",
41
+ "dynamic_batch_size": false,
42
+ "inline_weights_to_neff": false,
43
+ "input_names": [
44
+ "sample"
45
+ ],
46
+ "model_type": "vae-encoder",
47
+ "optlevel": "2",
48
+ "output_attentions": false,
49
+ "output_hidden_states": false,
50
+ "output_names": [
51
+ "latent_parameters"
52
+ ],
53
+ "static_batch_size": 1,
54
+ "static_height": 512,
55
+ "static_num_channels": 3,
56
+ "static_width": 512
57
+ },
58
+ "norm_num_groups": 32,
59
+ "out_channels": 3,
60
+ "sample_size": 768,
61
+ "scaling_factor": 0.18215,
62
+ "shift_factor": null,
63
+ "task": "semantic-segmentation",
64
+ "transformers_version": null,
65
+ "up_block_types": [
66
+ "UpDecoderBlock2D",
67
+ "UpDecoderBlock2D",
68
+ "UpDecoderBlock2D",
69
+ "UpDecoderBlock2D"
70
+ ],
71
+ "use_post_quant_conv": true,
72
+ "use_quant_conv": true
73
+ }
vae_encoder/model.neuron ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:afb0913d1f61abec440b9cbc8794a69740c6dbcc11567d3a9b329313029e0eb9
3
+ size 218474003