Commit
•
3d02642
1
Parent(s):
3cf26c5
Upload folder using huggingface_hub
Browse files- .gitattributes +5 -0
- README.md +55 -0
- model_index.json +38 -0
- scheduler/scheduler_config.json +18 -0
- text_encoder/config.json +48 -0
- text_encoder/model.neuron +3 -0
- text_encoder_2/config.json +48 -0
- text_encoder_2/model.neuron +3 -0
- tokenizer/merges.txt +0 -0
- tokenizer/special_tokens_map.json +24 -0
- tokenizer/tokenizer_config.json +33 -0
- tokenizer/vocab.json +0 -0
- tokenizer_2/merges.txt +0 -0
- tokenizer_2/special_tokens_map.json +24 -0
- tokenizer_2/tokenizer_config.json +33 -0
- tokenizer_2/vocab.json +0 -0
- unet/config.json +102 -0
- unet/model.neuron +3 -0
- vae_decoder/config.json +55 -0
- vae_decoder/model.neuron +3 -0
- vae_encoder/config.json +55 -0
- vae_encoder/model.neuron +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,8 @@ 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 |
+
text_encoder/model.neuron filter=lfs diff=lfs merge=lfs -text
|
37 |
+
text_encoder_2/model.neuron filter=lfs diff=lfs merge=lfs -text
|
38 |
+
unet/model.neuron filter=lfs diff=lfs merge=lfs -text
|
39 |
+
vae_decoder/model.neuron filter=lfs diff=lfs merge=lfs -text
|
40 |
+
vae_encoder/model.neuron filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: openrail++
|
3 |
+
tags:
|
4 |
+
- text-to-image
|
5 |
+
- stable-diffusion
|
6 |
+
- inferentia2
|
7 |
+
- neuron
|
8 |
+
---
|
9 |
+
# Neuronx model for [stabilityai/stable-diffusion-xl-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0)
|
10 |
+
|
11 |
+
This repository contains are AWS Inferentia2 and neuronx compatible checkpoint for [stabilityai/stable-diffusion-xl-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0). You can find detailed information about the base model on its [Model Card](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0).
|
12 |
+
|
13 |
+
## Usage on Amazon SageMaker
|
14 |
+
|
15 |
+
_coming soon_
|
16 |
+
|
17 |
+
## Usage with optimum-neuron
|
18 |
+
|
19 |
+
```python
|
20 |
+
from optimum.neuron import NeuronStableDiffusionXLPipeline
|
21 |
+
|
22 |
+
# Load pipeline from Hugging Face repository
|
23 |
+
pipeline = NeuronStableDiffusionXLPipeline.from_pretrained(model_dir, device_ids=[0, 1])
|
24 |
+
|
25 |
+
# prompt for generating images
|
26 |
+
prompt = "a photo of an astronaut riding a horse on mars"
|
27 |
+
# generate image
|
28 |
+
image = stable_diffusion(prompt).images[0]
|
29 |
+
image.save("generated_image.jpg")
|
30 |
+
```
|
31 |
+
|
32 |
+
## Compilation Arguments
|
33 |
+
|
34 |
+
**compilation arguments**
|
35 |
+
|
36 |
+
```json
|
37 |
+
{
|
38 |
+
"auto_cast": "all",
|
39 |
+
"auto_cast_type": "bf16"
|
40 |
+
}
|
41 |
+
```
|
42 |
+
|
43 |
+
**input_shapes**
|
44 |
+
|
45 |
+
```json
|
46 |
+
{
|
47 |
+
"height": 1024,
|
48 |
+
"width": 1024,
|
49 |
+
"num_images_per_prompt": 1,
|
50 |
+
"batch_size": 1
|
51 |
+
}
|
52 |
+
```
|
53 |
+
|
54 |
+
|
55 |
+
|
model_index.json
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_class_name": "NeuronStableDiffusionXLPipeline",
|
3 |
+
"_diffusers_version": "0.20.2",
|
4 |
+
"add_watermarker": null,
|
5 |
+
"force_zeros_for_empty_prompt": true,
|
6 |
+
"scheduler": [
|
7 |
+
"diffusers",
|
8 |
+
"EulerDiscreteScheduler"
|
9 |
+
],
|
10 |
+
"text_encoder": [
|
11 |
+
"optimum",
|
12 |
+
"NeuronModelTextEncoder"
|
13 |
+
],
|
14 |
+
"text_encoder_2": [
|
15 |
+
"optimum",
|
16 |
+
"NeuronModelTextEncoder"
|
17 |
+
],
|
18 |
+
"tokenizer": [
|
19 |
+
"transformers",
|
20 |
+
"CLIPTokenizer"
|
21 |
+
],
|
22 |
+
"tokenizer_2": [
|
23 |
+
"transformers",
|
24 |
+
"CLIPTokenizer"
|
25 |
+
],
|
26 |
+
"unet": [
|
27 |
+
"optimum",
|
28 |
+
"NeuronModelUnet"
|
29 |
+
],
|
30 |
+
"vae_decoder": [
|
31 |
+
"optimum",
|
32 |
+
"NeuronModelVaeDecoder"
|
33 |
+
],
|
34 |
+
"vae_encoder": [
|
35 |
+
"optimum",
|
36 |
+
"NeuronModelVaeEncoder"
|
37 |
+
]
|
38 |
+
}
|
scheduler/scheduler_config.json
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_class_name": "EulerDiscreteScheduler",
|
3 |
+
"_diffusers_version": "0.20.2",
|
4 |
+
"beta_end": 0.012,
|
5 |
+
"beta_schedule": "scaled_linear",
|
6 |
+
"beta_start": 0.00085,
|
7 |
+
"clip_sample": false,
|
8 |
+
"interpolation_type": "linear",
|
9 |
+
"num_train_timesteps": 1000,
|
10 |
+
"prediction_type": "epsilon",
|
11 |
+
"sample_max_value": 1.0,
|
12 |
+
"set_alpha_to_one": false,
|
13 |
+
"skip_prk_steps": true,
|
14 |
+
"steps_offset": 1,
|
15 |
+
"timestep_spacing": "leading",
|
16 |
+
"trained_betas": null,
|
17 |
+
"use_karras_sigmas": false
|
18 |
+
}
|
text_encoder/config.json
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_commit_hash": "462165984030d82259a11f4367a4eed129e94a7b",
|
3 |
+
"_name_or_path": "/home/ubuntu/.cache/huggingface/hub/models--stabilityai--stable-diffusion-xl-base-1.0/snapshots/462165984030d82259a11f4367a4eed129e94a7b/text_encoder",
|
4 |
+
"architectures": [
|
5 |
+
"CLIPTextModel"
|
6 |
+
],
|
7 |
+
"attention_dropout": 0.0,
|
8 |
+
"bos_token_id": 0,
|
9 |
+
"dropout": 0.0,
|
10 |
+
"eos_token_id": 2,
|
11 |
+
"hidden_act": "quick_gelu",
|
12 |
+
"hidden_size": 768,
|
13 |
+
"initializer_factor": 1.0,
|
14 |
+
"initializer_range": 0.02,
|
15 |
+
"intermediate_size": 3072,
|
16 |
+
"layer_norm_eps": 1e-05,
|
17 |
+
"max_position_embeddings": 77,
|
18 |
+
"model_type": "clip-text-model",
|
19 |
+
"neuron": {
|
20 |
+
"auto_cast": "all",
|
21 |
+
"auto_cast_type": "bf16",
|
22 |
+
"compiler_type": "neuronx-cc",
|
23 |
+
"compiler_version": "2.10.0.35+3817a0c8c",
|
24 |
+
"disable_fallback": false,
|
25 |
+
"disable_fast_relayout": false,
|
26 |
+
"dynamic_batch_size": false,
|
27 |
+
"input_names": [
|
28 |
+
"input_ids"
|
29 |
+
],
|
30 |
+
"output_names": [
|
31 |
+
"last_hidden_state",
|
32 |
+
"pooler_output",
|
33 |
+
"hidden_states"
|
34 |
+
],
|
35 |
+
"static_batch_size": 1,
|
36 |
+
"static_sequence_length": 77
|
37 |
+
},
|
38 |
+
"num_attention_heads": 12,
|
39 |
+
"num_hidden_layers": 12,
|
40 |
+
"output_hidden_states": true,
|
41 |
+
"pad_token_id": 1,
|
42 |
+
"projection_dim": 768,
|
43 |
+
"task": "feature-extraction",
|
44 |
+
"torch_dtype": "float16",
|
45 |
+
"torchscript": true,
|
46 |
+
"transformers_version": "4.32.0.dev0",
|
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:2665649cf5b42c4695877c6437305bdac29c4abdb830904bd8d0ae37dfc0e41d
|
3 |
+
size 375874178
|
text_encoder_2/config.json
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_commit_hash": "462165984030d82259a11f4367a4eed129e94a7b",
|
3 |
+
"_name_or_path": "/home/ubuntu/.cache/huggingface/hub/models--stabilityai--stable-diffusion-xl-base-1.0/snapshots/462165984030d82259a11f4367a4eed129e94a7b/text_encoder_2",
|
4 |
+
"architectures": [
|
5 |
+
"CLIPTextModelWithProjection"
|
6 |
+
],
|
7 |
+
"attention_dropout": 0.0,
|
8 |
+
"bos_token_id": 0,
|
9 |
+
"dropout": 0.0,
|
10 |
+
"eos_token_id": 2,
|
11 |
+
"hidden_act": "gelu",
|
12 |
+
"hidden_size": 1280,
|
13 |
+
"initializer_factor": 1.0,
|
14 |
+
"initializer_range": 0.02,
|
15 |
+
"intermediate_size": 5120,
|
16 |
+
"layer_norm_eps": 1e-05,
|
17 |
+
"max_position_embeddings": 77,
|
18 |
+
"model_type": "clip-text-model",
|
19 |
+
"neuron": {
|
20 |
+
"auto_cast": "all",
|
21 |
+
"auto_cast_type": "bf16",
|
22 |
+
"compiler_type": "neuronx-cc",
|
23 |
+
"compiler_version": "2.10.0.35+3817a0c8c",
|
24 |
+
"disable_fallback": false,
|
25 |
+
"disable_fast_relayout": false,
|
26 |
+
"dynamic_batch_size": false,
|
27 |
+
"input_names": [
|
28 |
+
"input_ids"
|
29 |
+
],
|
30 |
+
"output_names": [
|
31 |
+
"text_embeds",
|
32 |
+
"last_hidden_state",
|
33 |
+
"hidden_states"
|
34 |
+
],
|
35 |
+
"static_batch_size": 1,
|
36 |
+
"static_sequence_length": 77
|
37 |
+
},
|
38 |
+
"num_attention_heads": 20,
|
39 |
+
"num_hidden_layers": 32,
|
40 |
+
"output_hidden_states": true,
|
41 |
+
"pad_token_id": 1,
|
42 |
+
"projection_dim": 1280,
|
43 |
+
"task": "feature-extraction",
|
44 |
+
"torch_dtype": "float16",
|
45 |
+
"torchscript": true,
|
46 |
+
"transformers_version": "4.32.0.dev0",
|
47 |
+
"vocab_size": 49408
|
48 |
+
}
|
text_encoder_2/model.neuron
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9c3fa15d5fc5fa7c01d54cdea78d4f44394c488908e69739db27b8274fba92b6
|
3 |
+
size 1788994826
|
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": "<|endoftext|>",
|
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,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"clean_up_tokenization_spaces": true,
|
12 |
+
"do_lower_case": true,
|
13 |
+
"eos_token": {
|
14 |
+
"__type": "AddedToken",
|
15 |
+
"content": "<|endoftext|>",
|
16 |
+
"lstrip": false,
|
17 |
+
"normalized": true,
|
18 |
+
"rstrip": false,
|
19 |
+
"single_word": false
|
20 |
+
},
|
21 |
+
"errors": "replace",
|
22 |
+
"model_max_length": 77,
|
23 |
+
"pad_token": "<|endoftext|>",
|
24 |
+
"tokenizer_class": "CLIPTokenizer",
|
25 |
+
"unk_token": {
|
26 |
+
"__type": "AddedToken",
|
27 |
+
"content": "<|endoftext|>",
|
28 |
+
"lstrip": false,
|
29 |
+
"normalized": true,
|
30 |
+
"rstrip": false,
|
31 |
+
"single_word": false
|
32 |
+
}
|
33 |
+
}
|
tokenizer/vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_2/merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_2/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_2/tokenizer_config.json
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"clean_up_tokenization_spaces": true,
|
12 |
+
"do_lower_case": true,
|
13 |
+
"eos_token": {
|
14 |
+
"__type": "AddedToken",
|
15 |
+
"content": "<|endoftext|>",
|
16 |
+
"lstrip": false,
|
17 |
+
"normalized": true,
|
18 |
+
"rstrip": false,
|
19 |
+
"single_word": false
|
20 |
+
},
|
21 |
+
"errors": "replace",
|
22 |
+
"model_max_length": 77,
|
23 |
+
"pad_token": "!",
|
24 |
+
"tokenizer_class": "CLIPTokenizer",
|
25 |
+
"unk_token": {
|
26 |
+
"__type": "AddedToken",
|
27 |
+
"content": "<|endoftext|>",
|
28 |
+
"lstrip": false,
|
29 |
+
"normalized": true,
|
30 |
+
"rstrip": false,
|
31 |
+
"single_word": false
|
32 |
+
}
|
33 |
+
}
|
tokenizer_2/vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
unet/config.json
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_class_name": "UNet2DConditionModel",
|
3 |
+
"_commit_hash": null,
|
4 |
+
"_diffusers_version": "0.20.2",
|
5 |
+
"_name_or_path": "/home/ubuntu/.cache/huggingface/hub/models--stabilityai--stable-diffusion-xl-base-1.0/snapshots/462165984030d82259a11f4367a4eed129e94a7b/unet",
|
6 |
+
"_use_default_values": [
|
7 |
+
"attention_type"
|
8 |
+
],
|
9 |
+
"act_fn": "silu",
|
10 |
+
"addition_embed_type": "text_time",
|
11 |
+
"addition_embed_type_num_heads": 64,
|
12 |
+
"addition_time_embed_dim": 256,
|
13 |
+
"attention_head_dim": [
|
14 |
+
5,
|
15 |
+
10,
|
16 |
+
20
|
17 |
+
],
|
18 |
+
"attention_type": "default",
|
19 |
+
"block_out_channels": [
|
20 |
+
320,
|
21 |
+
640,
|
22 |
+
1280
|
23 |
+
],
|
24 |
+
"center_input_sample": false,
|
25 |
+
"class_embed_type": null,
|
26 |
+
"class_embeddings_concat": false,
|
27 |
+
"conv_in_kernel": 3,
|
28 |
+
"conv_out_kernel": 3,
|
29 |
+
"cross_attention_dim": 2048,
|
30 |
+
"cross_attention_norm": null,
|
31 |
+
"down_block_types": [
|
32 |
+
"DownBlock2D",
|
33 |
+
"CrossAttnDownBlock2D",
|
34 |
+
"CrossAttnDownBlock2D"
|
35 |
+
],
|
36 |
+
"downsample_padding": 1,
|
37 |
+
"dual_cross_attention": false,
|
38 |
+
"encoder_hid_dim": null,
|
39 |
+
"encoder_hid_dim_type": null,
|
40 |
+
"flip_sin_to_cos": true,
|
41 |
+
"freq_shift": 0,
|
42 |
+
"in_channels": 4,
|
43 |
+
"layers_per_block": 2,
|
44 |
+
"mid_block_only_cross_attention": null,
|
45 |
+
"mid_block_scale_factor": 1,
|
46 |
+
"mid_block_type": "UNetMidBlock2DCrossAttn",
|
47 |
+
"model_type": "unet",
|
48 |
+
"neuron": {
|
49 |
+
"auto_cast": "all",
|
50 |
+
"auto_cast_type": "bf16",
|
51 |
+
"compiler_type": "neuronx-cc",
|
52 |
+
"compiler_version": "2.10.0.35+3817a0c8c",
|
53 |
+
"disable_fallback": false,
|
54 |
+
"disable_fast_relayout": false,
|
55 |
+
"dynamic_batch_size": false,
|
56 |
+
"input_names": [
|
57 |
+
"sample",
|
58 |
+
"timestep",
|
59 |
+
"encoder_hidden_states",
|
60 |
+
"text_embeds",
|
61 |
+
"time_ids"
|
62 |
+
],
|
63 |
+
"output_names": [
|
64 |
+
"sample"
|
65 |
+
],
|
66 |
+
"static_batch_size": 1,
|
67 |
+
"static_height": 128,
|
68 |
+
"static_num_channels": 4,
|
69 |
+
"static_sequence_length": 77,
|
70 |
+
"static_width": 128
|
71 |
+
},
|
72 |
+
"norm_eps": 1e-05,
|
73 |
+
"norm_num_groups": 32,
|
74 |
+
"num_attention_heads": null,
|
75 |
+
"num_class_embeds": null,
|
76 |
+
"only_cross_attention": false,
|
77 |
+
"out_channels": 4,
|
78 |
+
"projection_class_embeddings_input_dim": 2816,
|
79 |
+
"resnet_out_scale_factor": 1.0,
|
80 |
+
"resnet_skip_time_act": false,
|
81 |
+
"resnet_time_scale_shift": "default",
|
82 |
+
"sample_size": 128,
|
83 |
+
"task": "semantic-segmentation",
|
84 |
+
"time_cond_proj_dim": null,
|
85 |
+
"time_embedding_act_fn": null,
|
86 |
+
"time_embedding_dim": null,
|
87 |
+
"time_embedding_type": "positional",
|
88 |
+
"timestep_post_act": null,
|
89 |
+
"transformer_layers_per_block": [
|
90 |
+
1,
|
91 |
+
2,
|
92 |
+
10
|
93 |
+
],
|
94 |
+
"transformers_version": null,
|
95 |
+
"up_block_types": [
|
96 |
+
"CrossAttnUpBlock2D",
|
97 |
+
"CrossAttnUpBlock2D",
|
98 |
+
"UpBlock2D"
|
99 |
+
],
|
100 |
+
"upcast_attention": null,
|
101 |
+
"use_linear_projection": true
|
102 |
+
}
|
unet/model.neuron
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3f2b240566589b2109fac4898134416cd952b6bec82b6a777b485d4225ec3e4c
|
3 |
+
size 4172411786
|
vae_decoder/config.json
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_class_name": "AutoencoderKL",
|
3 |
+
"_commit_hash": null,
|
4 |
+
"_diffusers_version": "0.20.2",
|
5 |
+
"_name_or_path": "/home/ubuntu/.cache/huggingface/hub/models--stabilityai--stable-diffusion-xl-base-1.0/snapshots/462165984030d82259a11f4367a4eed129e94a7b/vae",
|
6 |
+
"act_fn": "silu",
|
7 |
+
"block_out_channels": [
|
8 |
+
128,
|
9 |
+
256,
|
10 |
+
512,
|
11 |
+
512
|
12 |
+
],
|
13 |
+
"down_block_types": [
|
14 |
+
"DownEncoderBlock2D",
|
15 |
+
"DownEncoderBlock2D",
|
16 |
+
"DownEncoderBlock2D",
|
17 |
+
"DownEncoderBlock2D"
|
18 |
+
],
|
19 |
+
"force_upcast": true,
|
20 |
+
"in_channels": 3,
|
21 |
+
"latent_channels": 4,
|
22 |
+
"layers_per_block": 2,
|
23 |
+
"model_type": "vae-decoder",
|
24 |
+
"neuron": {
|
25 |
+
"auto_cast": "all",
|
26 |
+
"auto_cast_type": "bf16",
|
27 |
+
"compiler_type": "neuronx-cc",
|
28 |
+
"compiler_version": "2.10.0.35+3817a0c8c",
|
29 |
+
"disable_fallback": false,
|
30 |
+
"disable_fast_relayout": false,
|
31 |
+
"dynamic_batch_size": false,
|
32 |
+
"input_names": [
|
33 |
+
"latent_sample"
|
34 |
+
],
|
35 |
+
"output_names": [
|
36 |
+
"sample"
|
37 |
+
],
|
38 |
+
"static_batch_size": 1,
|
39 |
+
"static_height": 128,
|
40 |
+
"static_num_channels": 4,
|
41 |
+
"static_width": 128
|
42 |
+
},
|
43 |
+
"norm_num_groups": 32,
|
44 |
+
"out_channels": 3,
|
45 |
+
"sample_size": 1024,
|
46 |
+
"scaling_factor": 0.13025,
|
47 |
+
"task": "semantic-segmentation",
|
48 |
+
"transformers_version": null,
|
49 |
+
"up_block_types": [
|
50 |
+
"UpDecoderBlock2D",
|
51 |
+
"UpDecoderBlock2D",
|
52 |
+
"UpDecoderBlock2D",
|
53 |
+
"UpDecoderBlock2D"
|
54 |
+
]
|
55 |
+
}
|
vae_decoder/model.neuron
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b6168b92983cbd5c93cb69e48f09de42951623ca0978cee6afb5921ee4297a53
|
3 |
+
size 791730766
|
vae_encoder/config.json
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_class_name": "AutoencoderKL",
|
3 |
+
"_commit_hash": null,
|
4 |
+
"_diffusers_version": "0.20.2",
|
5 |
+
"_name_or_path": "/home/ubuntu/.cache/huggingface/hub/models--stabilityai--stable-diffusion-xl-base-1.0/snapshots/462165984030d82259a11f4367a4eed129e94a7b/vae",
|
6 |
+
"act_fn": "silu",
|
7 |
+
"block_out_channels": [
|
8 |
+
128,
|
9 |
+
256,
|
10 |
+
512,
|
11 |
+
512
|
12 |
+
],
|
13 |
+
"down_block_types": [
|
14 |
+
"DownEncoderBlock2D",
|
15 |
+
"DownEncoderBlock2D",
|
16 |
+
"DownEncoderBlock2D",
|
17 |
+
"DownEncoderBlock2D"
|
18 |
+
],
|
19 |
+
"force_upcast": true,
|
20 |
+
"in_channels": 3,
|
21 |
+
"latent_channels": 4,
|
22 |
+
"layers_per_block": 2,
|
23 |
+
"model_type": "vae-encoder",
|
24 |
+
"neuron": {
|
25 |
+
"auto_cast": "all",
|
26 |
+
"auto_cast_type": "bf16",
|
27 |
+
"compiler_type": "neuronx-cc",
|
28 |
+
"compiler_version": "2.10.0.35+3817a0c8c",
|
29 |
+
"disable_fallback": false,
|
30 |
+
"disable_fast_relayout": false,
|
31 |
+
"dynamic_batch_size": false,
|
32 |
+
"input_names": [
|
33 |
+
"sample"
|
34 |
+
],
|
35 |
+
"output_names": [
|
36 |
+
"latent_sample"
|
37 |
+
],
|
38 |
+
"static_batch_size": 1,
|
39 |
+
"static_height": 1024,
|
40 |
+
"static_num_channels": 3,
|
41 |
+
"static_width": 1024
|
42 |
+
},
|
43 |
+
"norm_num_groups": 32,
|
44 |
+
"out_channels": 3,
|
45 |
+
"sample_size": 1024,
|
46 |
+
"scaling_factor": 0.13025,
|
47 |
+
"task": "semantic-segmentation",
|
48 |
+
"transformers_version": null,
|
49 |
+
"up_block_types": [
|
50 |
+
"UpDecoderBlock2D",
|
51 |
+
"UpDecoderBlock2D",
|
52 |
+
"UpDecoderBlock2D",
|
53 |
+
"UpDecoderBlock2D"
|
54 |
+
]
|
55 |
+
}
|
vae_encoder/model.neuron
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:00a701150fad01a910d5a54fe239eeb2229d03a6a469121c1142e1821e521251
|
3 |
+
size 390578766
|