digitalbrain79 commited on
Commit
7b7ab07
1 Parent(s): 3d7252d

Upload 41 files

Browse files
Files changed (41) hide show
  1. README.md +13 -0
  2. model_index.json +38 -0
  3. scheduler/scheduler_config.json +18 -0
  4. text_encoder/config.json +25 -0
  5. text_encoder/coreml_model.mlmodelc/analytics/coremldata.bin +3 -0
  6. text_encoder/coreml_model.mlmodelc/coremldata.bin +3 -0
  7. text_encoder/coreml_model.mlmodelc/metadata.json +85 -0
  8. text_encoder/coreml_model.mlmodelc/model.mil +0 -0
  9. text_encoder/coreml_model.mlmodelc/weights/weight.bin +3 -0
  10. text_encoder_2/config.json +24 -0
  11. text_encoder_2/coreml_model.mlmodelc/analytics/coremldata.bin +3 -0
  12. text_encoder_2/coreml_model.mlmodelc/coremldata.bin +3 -0
  13. text_encoder_2/coreml_model.mlmodelc/metadata.json +85 -0
  14. text_encoder_2/coreml_model.mlmodelc/model.mil +0 -0
  15. text_encoder_2/coreml_model.mlmodelc/weights/weight.bin +3 -0
  16. tokenizer/merges.txt +0 -0
  17. tokenizer/special_tokens_map.json +24 -0
  18. tokenizer/tokenizer_config.json +33 -0
  19. tokenizer/vocab.json +0 -0
  20. tokenizer_2/merges.txt +0 -0
  21. tokenizer_2/special_tokens_map.json +24 -0
  22. tokenizer_2/tokenizer_config.json +33 -0
  23. tokenizer_2/vocab.json +0 -0
  24. unet/config.json +70 -0
  25. unet/coreml_model.mlmodelc/analytics/coremldata.bin +3 -0
  26. unet/coreml_model.mlmodelc/coremldata.bin +3 -0
  27. unet/coreml_model.mlmodelc/metadata.json +125 -0
  28. unet/coreml_model.mlmodelc/model.mil +0 -0
  29. unet/coreml_model.mlmodelc/weights/weight.bin +3 -0
  30. vae_decoder/config.json +32 -0
  31. vae_decoder/coreml_model.mlmodelc/analytics/coremldata.bin +3 -0
  32. vae_decoder/coreml_model.mlmodelc/coremldata.bin +3 -0
  33. vae_decoder/coreml_model.mlmodelc/metadata.json +77 -0
  34. vae_decoder/coreml_model.mlmodelc/model.mil +0 -0
  35. vae_decoder/coreml_model.mlmodelc/weights/weight.bin +3 -0
  36. vae_encoder/config.json +32 -0
  37. vae_encoder/coreml_model.mlmodelc/analytics/coremldata.bin +3 -0
  38. vae_encoder/coreml_model.mlmodelc/coremldata.bin +3 -0
  39. vae_encoder/coreml_model.mlmodelc/metadata.json +76 -0
  40. vae_encoder/coreml_model.mlmodelc/model.mil +0 -0
  41. vae_encoder/coreml_model.mlmodelc/weights/weight.bin +3 -0
README.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: openrail++
3
+ tags:
4
+ - sdxl
5
+ - coreml
6
+ - stablediffusion
7
+ - dreamshaper
8
+ library_name: diffusers
9
+ ---
10
+ Converted [DreamShaper XL](https://civitai.com/models/112902/dreamshaper-xl?modelVersionId=354657) to CoreML.
11
+
12
+ ## Usage
13
+ [https://github.com/digitalbrain79/diffusers_coreml.git](https://github.com/digitalbrain79/diffusers_coreml.git)
model_index.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "StableDiffusionXLPipeline",
3
+ "_diffusers_version": "0.19.0.dev0",
4
+ "force_zeros_for_empty_prompt": true,
5
+ "add_watermarker": null,
6
+ "scheduler": [
7
+ "diffusers",
8
+ "EulerDiscreteScheduler"
9
+ ],
10
+ "text_encoder": [
11
+ "transformers",
12
+ "CLIPTextModel"
13
+ ],
14
+ "text_encoder_2": [
15
+ "transformers",
16
+ "CLIPTextModelWithProjection"
17
+ ],
18
+ "tokenizer": [
19
+ "transformers",
20
+ "CLIPTokenizer"
21
+ ],
22
+ "tokenizer_2": [
23
+ "transformers",
24
+ "CLIPTokenizer"
25
+ ],
26
+ "unet": [
27
+ "diffusers",
28
+ "UNet2DConditionModel"
29
+ ],
30
+ "vae_encoder": [
31
+ "diffusers",
32
+ "AutoencoderKL"
33
+ ],
34
+ "vae_decoder": [
35
+ "diffusers",
36
+ "AutoencoderKL"
37
+ ]
38
+ }
scheduler/scheduler_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "EulerDiscreteScheduler",
3
+ "_diffusers_version": "0.19.0.dev0",
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,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "CLIPTextModel"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "bos_token_id": 0,
7
+ "dropout": 0.0,
8
+ "eos_token_id": 2,
9
+ "hidden_act": "quick_gelu",
10
+ "hidden_size": 768,
11
+ "initializer_factor": 1.0,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 3072,
14
+ "layer_norm_eps": 1e-05,
15
+ "max_position_embeddings": 77,
16
+ "model_type": "clip_text_model",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 12,
19
+ "pad_token_id": 1,
20
+ "projection_dim": 768,
21
+ "torch_dtype": "float16",
22
+ "transformers_version": "4.32.0.dev0",
23
+ "vocab_size": 49408
24
+ }
25
+
text_encoder/coreml_model.mlmodelc/analytics/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0db95ce4b2f6033f9afc25f599c997ca94c489bedfb8ae2110284814de788cac
3
+ size 243
text_encoder/coreml_model.mlmodelc/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ba0eed8c77eb51159a81ed74c77aa641e6a00186be2a905ab53d32d1d02f250
3
+ size 919
text_encoder/coreml_model.mlmodelc/metadata.json ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "shortDescription" : "Stable Diffusion generates images conditioned on text and\/or other images as input through the diffusion process. Please refer to https:\/\/arxiv.org\/abs\/2112.10752 for details.",
4
+ "metadataOutputVersion" : "3.0",
5
+ "outputSchema" : [
6
+ {
7
+ "hasShapeFlexibility" : "0",
8
+ "isOptional" : "0",
9
+ "dataType" : "Float32",
10
+ "formattedType" : "MultiArray (Float32 1 × 77 × 768)",
11
+ "shortDescription" : "Hidden states after the encoder layers",
12
+ "shape" : "[1, 77, 768]",
13
+ "name" : "hidden_embeds",
14
+ "type" : "MultiArray"
15
+ },
16
+ {
17
+ "hasShapeFlexibility" : "0",
18
+ "isOptional" : "0",
19
+ "dataType" : "Float32",
20
+ "formattedType" : "MultiArray (Float32 1 × 768)",
21
+ "shortDescription" : "The version of the `last_hidden_state` output after pooling",
22
+ "shape" : "[1, 768]",
23
+ "name" : "pooled_outputs",
24
+ "type" : "MultiArray"
25
+ }
26
+ ],
27
+ "version" : "stabilityai\/stable-diffusion-xl-base-1.0",
28
+ "modelParameters" : [
29
+
30
+ ],
31
+ "author" : "Please refer to the Model Card available at huggingface.co\/stabilityai\/stable-diffusion-xl-base-1.0",
32
+ "specificationVersion" : 7,
33
+ "storagePrecision" : "Mixed (Float16, Palettized (6 bits))",
34
+ "license" : "OpenRAIL++-M (https:\/\/huggingface.co\/stabilityai\/stable-diffusion-xl-base-1.0\/blob\/main\/LICENSE.md)",
35
+ "mlProgramOperationTypeHistogram" : {
36
+ "Ios16.cast" : 3,
37
+ "Ios16.mul" : 36,
38
+ "Ios16.layerNorm" : 25,
39
+ "Ios16.constexprLutToDense" : 86,
40
+ "Stack" : 1,
41
+ "Transpose" : 48,
42
+ "Ios16.sigmoid" : 12,
43
+ "Ios16.linear" : 72,
44
+ "Ios16.add" : 37,
45
+ "Ios16.matmul" : 24,
46
+ "Ios16.softmax" : 12,
47
+ "Ios16.gatherNd" : 1,
48
+ "Ios16.gather" : 1,
49
+ "Ios16.reshape" : 120,
50
+ "Ios16.reduceArgmax" : 1
51
+ },
52
+ "computePrecision" : "Mixed (Float16, Float32, Int32)",
53
+ "isUpdatable" : "0",
54
+ "availability" : {
55
+ "macOS" : "13.0",
56
+ "tvOS" : "16.0",
57
+ "visionOS" : "1.0",
58
+ "watchOS" : "9.0",
59
+ "iOS" : "16.0",
60
+ "macCatalyst" : "16.0"
61
+ },
62
+ "modelType" : {
63
+ "name" : "MLModelType_mlProgram"
64
+ },
65
+ "inputSchema" : [
66
+ {
67
+ "hasShapeFlexibility" : "0",
68
+ "isOptional" : "0",
69
+ "dataType" : "Float32",
70
+ "formattedType" : "MultiArray (Float32 1 × 77)",
71
+ "shortDescription" : "The token ids that represent the input text",
72
+ "shape" : "[1, 77]",
73
+ "name" : "input_ids",
74
+ "type" : "MultiArray"
75
+ }
76
+ ],
77
+ "userDefinedMetadata" : {
78
+ "com.github.apple.coremltools.source_dialect" : "TorchScript",
79
+ "com.github.apple.coremltools.source" : "torch==2.2.0",
80
+ "com.github.apple.coremltools.version" : "7.2"
81
+ },
82
+ "generatedClassName" : "Stable_Diffusion_version_stabilityai_stable_diffusion_xl_base_1_0_text_encoder",
83
+ "method" : "predict"
84
+ }
85
+ ]
text_encoder/coreml_model.mlmodelc/model.mil ADDED
The diff for this file is too large to render. See raw diff
 
text_encoder/coreml_model.mlmodelc/weights/weight.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5f4905f255613745ea2499ec9fc856aff4a7243251f7d191eac0f9651e5221b
3
+ size 139866304
text_encoder_2/config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "CLIPTextModelWithProjection"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "bos_token_id": 0,
7
+ "dropout": 0.0,
8
+ "eos_token_id": 2,
9
+ "hidden_act": "gelu",
10
+ "hidden_size": 1280,
11
+ "initializer_factor": 1.0,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 5120,
14
+ "layer_norm_eps": 1e-05,
15
+ "max_position_embeddings": 77,
16
+ "model_type": "clip_text_model",
17
+ "num_attention_heads": 20,
18
+ "num_hidden_layers": 32,
19
+ "pad_token_id": 1,
20
+ "projection_dim": 1280,
21
+ "torch_dtype": "float16",
22
+ "transformers_version": "4.32.0.dev0",
23
+ "vocab_size": 49408
24
+ }
text_encoder_2/coreml_model.mlmodelc/analytics/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:418e4ccfdb60ab6a05ec00b54b81233c9e771d35636c5ff526cd1efaa3c5e1ca
3
+ size 243
text_encoder_2/coreml_model.mlmodelc/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f870abd2c0d1b22ce938f7279b7b64eb80318909ed52020b627153cc00c428c
3
+ size 919
text_encoder_2/coreml_model.mlmodelc/metadata.json ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "shortDescription" : "Stable Diffusion generates images conditioned on text and\/or other images as input through the diffusion process. Please refer to https:\/\/arxiv.org\/abs\/2112.10752 for details.",
4
+ "metadataOutputVersion" : "3.0",
5
+ "outputSchema" : [
6
+ {
7
+ "hasShapeFlexibility" : "0",
8
+ "isOptional" : "0",
9
+ "dataType" : "Float32",
10
+ "formattedType" : "MultiArray (Float32 1 × 77 × 1280)",
11
+ "shortDescription" : "Hidden states after the encoder layers",
12
+ "shape" : "[1, 77, 1280]",
13
+ "name" : "hidden_embeds",
14
+ "type" : "MultiArray"
15
+ },
16
+ {
17
+ "hasShapeFlexibility" : "0",
18
+ "isOptional" : "0",
19
+ "dataType" : "Float32",
20
+ "formattedType" : "MultiArray (Float32 1 × 1280)",
21
+ "shortDescription" : "The version of the `last_hidden_state` output after pooling",
22
+ "shape" : "[1, 1280]",
23
+ "name" : "pooled_outputs",
24
+ "type" : "MultiArray"
25
+ }
26
+ ],
27
+ "version" : "stabilityai\/stable-diffusion-xl-base-1.0",
28
+ "modelParameters" : [
29
+
30
+ ],
31
+ "author" : "Please refer to the Model Card available at huggingface.co\/stabilityai\/stable-diffusion-xl-base-1.0",
32
+ "specificationVersion" : 7,
33
+ "storagePrecision" : "Mixed (Float16, Palettized (6 bits))",
34
+ "license" : "OpenRAIL++-M (https:\/\/huggingface.co\/stabilityai\/stable-diffusion-xl-base-1.0\/blob\/main\/LICENSE.md)",
35
+ "mlProgramOperationTypeHistogram" : {
36
+ "Ios16.cast" : 3,
37
+ "Ios16.mul" : 32,
38
+ "Ios16.layerNorm" : 65,
39
+ "Ios16.constexprLutToDense" : 227,
40
+ "Stack" : 1,
41
+ "Transpose" : 128,
42
+ "Ios16.linear" : 193,
43
+ "Ios16.add" : 97,
44
+ "Ios16.matmul" : 64,
45
+ "Ios16.gelu" : 32,
46
+ "Ios16.softmax" : 32,
47
+ "Ios16.gatherNd" : 1,
48
+ "Ios16.gather" : 1,
49
+ "Ios16.reshape" : 320,
50
+ "Ios16.reduceArgmax" : 1
51
+ },
52
+ "computePrecision" : "Mixed (Float16, Float32, Int32)",
53
+ "isUpdatable" : "0",
54
+ "availability" : {
55
+ "macOS" : "13.0",
56
+ "tvOS" : "16.0",
57
+ "visionOS" : "1.0",
58
+ "watchOS" : "9.0",
59
+ "iOS" : "16.0",
60
+ "macCatalyst" : "16.0"
61
+ },
62
+ "modelType" : {
63
+ "name" : "MLModelType_mlProgram"
64
+ },
65
+ "inputSchema" : [
66
+ {
67
+ "hasShapeFlexibility" : "0",
68
+ "isOptional" : "0",
69
+ "dataType" : "Float32",
70
+ "formattedType" : "MultiArray (Float32 1 × 77)",
71
+ "shortDescription" : "The token ids that represent the input text",
72
+ "shape" : "[1, 77]",
73
+ "name" : "input_ids",
74
+ "type" : "MultiArray"
75
+ }
76
+ ],
77
+ "userDefinedMetadata" : {
78
+ "com.github.apple.coremltools.source_dialect" : "TorchScript",
79
+ "com.github.apple.coremltools.source" : "torch==2.2.0",
80
+ "com.github.apple.coremltools.version" : "7.2"
81
+ },
82
+ "generatedClassName" : "Stable_Diffusion_version_stabilityai_stable_diffusion_xl_base_1_0_text_encoder_2",
83
+ "method" : "predict"
84
+ }
85
+ ]
text_encoder_2/coreml_model.mlmodelc/model.mil ADDED
The diff for this file is too large to render. See raw diff
 
text_encoder_2/coreml_model.mlmodelc/weights/weight.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:abb9b12c3188411a0999c6a8e91e2f90a9308c4bbb5c9e969986349eeffbce75
3
+ size 600595584
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,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "UNet2DConditionModel",
3
+ "_diffusers_version": "0.19.0.dev0",
4
+ "act_fn": "silu",
5
+ "addition_embed_type": "text_time",
6
+ "addition_embed_type_num_heads": 64,
7
+ "addition_time_embed_dim": 256,
8
+ "attention_head_dim": [
9
+ 5,
10
+ 10,
11
+ 20
12
+ ],
13
+ "block_out_channels": [
14
+ 320,
15
+ 640,
16
+ 1280
17
+ ],
18
+ "center_input_sample": false,
19
+ "class_embed_type": null,
20
+ "class_embeddings_concat": false,
21
+ "conv_in_kernel": 3,
22
+ "conv_out_kernel": 3,
23
+ "cross_attention_dim": 2048,
24
+ "cross_attention_norm": null,
25
+ "down_block_types": [
26
+ "DownBlock2D",
27
+ "CrossAttnDownBlock2D",
28
+ "CrossAttnDownBlock2D"
29
+ ],
30
+ "downsample_padding": 1,
31
+ "dual_cross_attention": false,
32
+ "encoder_hid_dim": null,
33
+ "encoder_hid_dim_type": null,
34
+ "flip_sin_to_cos": true,
35
+ "freq_shift": 0,
36
+ "in_channels": 4,
37
+ "layers_per_block": 2,
38
+ "mid_block_only_cross_attention": null,
39
+ "mid_block_scale_factor": 1,
40
+ "mid_block_type": "UNetMidBlock2DCrossAttn",
41
+ "norm_eps": 1e-05,
42
+ "norm_num_groups": 32,
43
+ "num_attention_heads": null,
44
+ "num_class_embeds": null,
45
+ "only_cross_attention": false,
46
+ "out_channels": 4,
47
+ "projection_class_embeddings_input_dim": 2816,
48
+ "resnet_out_scale_factor": 1.0,
49
+ "resnet_skip_time_act": false,
50
+ "resnet_time_scale_shift": "default",
51
+ "sample_size": 128,
52
+ "time_cond_proj_dim": null,
53
+ "time_embedding_act_fn": null,
54
+ "time_embedding_dim": null,
55
+ "time_embedding_type": "positional",
56
+ "timestep_post_act": null,
57
+ "transformer_layers_per_block": [
58
+ 1,
59
+ 2,
60
+ 10
61
+ ],
62
+ "up_block_types": [
63
+ "CrossAttnUpBlock2D",
64
+ "CrossAttnUpBlock2D",
65
+ "UpBlock2D"
66
+ ],
67
+ "upcast_attention": null,
68
+ "use_linear_projection": true
69
+ }
70
+
unet/coreml_model.mlmodelc/analytics/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d62f58eec3dfa3d18157947a6b2aa9c7b196fde7d1243411b68d8d2fb5675334
3
+ size 243
unet/coreml_model.mlmodelc/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0dec953dfa693513f1658ce695c3c48c5354b2834c231e0e487ea9b13b944713
3
+ size 1717
unet/coreml_model.mlmodelc/metadata.json ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "shortDescription" : "Stable Diffusion generates images conditioned on text or other images as input through the diffusion process. Please refer to https:\/\/arxiv.org\/abs\/2112.10752 for details.",
4
+ "metadataOutputVersion" : "3.0",
5
+ "outputSchema" : [
6
+ {
7
+ "hasShapeFlexibility" : "0",
8
+ "isOptional" : "0",
9
+ "dataType" : "Float32",
10
+ "formattedType" : "MultiArray (Float32 1 × 4 × 128 × 128)",
11
+ "shortDescription" : "Same shape and dtype as the `sample` input. The predicted noise to facilitate the reverse diffusion (denoising) process",
12
+ "shape" : "[1, 4, 128, 128]",
13
+ "name" : "noise_pred",
14
+ "type" : "MultiArray"
15
+ }
16
+ ],
17
+ "version" : "\/Users\/kjpark\/Documents\/models\/dreamshaper_xl_4bit\/pretrained",
18
+ "modelParameters" : [
19
+
20
+ ],
21
+ "author" : "Please refer to the Model Card available at huggingface.co\/\/Users\/kjpark\/Documents\/models\/dreamshaper_xl_4bit\/pretrained",
22
+ "specificationVersion" : 7,
23
+ "storagePrecision" : "Mixed (Float16, Palettized (6 bits))",
24
+ "license" : "OpenRAIL++-M (https:\/\/huggingface.co\/stabilityai\/stable-diffusion-xl-base-1.0\/blob\/main\/LICENSE.md)",
25
+ "mlProgramOperationTypeHistogram" : {
26
+ "UpsampleNearestNeighbor" : 2,
27
+ "Ios16.reduceMean" : 92,
28
+ "Ios16.sin" : 2,
29
+ "Ios16.softmax" : 140,
30
+ "Split" : 70,
31
+ "Ios16.add" : 302,
32
+ "Concat" : 14,
33
+ "Ios16.realDiv" : 46,
34
+ "Ios16.square" : 46,
35
+ "ExpandDims" : 6,
36
+ "Ios16.sub" : 46,
37
+ "Ios16.cast" : 1,
38
+ "Ios16.conv" : 794,
39
+ "Ios16.constexprLutToDense" : 870,
40
+ "Ios16.gelu" : 70,
41
+ "Ios16.layerNorm" : 210,
42
+ "Ios16.batchNorm" : 46,
43
+ "Ios16.matmul" : 280,
44
+ "Ios16.reshape" : 676,
45
+ "Ios16.silu" : 38,
46
+ "Ios16.sqrt" : 46,
47
+ "Ios16.mul" : 212,
48
+ "Ios16.cos" : 2,
49
+ "SliceByIndex" : 4
50
+ },
51
+ "computePrecision" : "Mixed (Float16, Float32, Int32)",
52
+ "isUpdatable" : "0",
53
+ "availability" : {
54
+ "macOS" : "13.0",
55
+ "tvOS" : "16.0",
56
+ "visionOS" : "1.0",
57
+ "watchOS" : "9.0",
58
+ "iOS" : "16.0",
59
+ "macCatalyst" : "16.0"
60
+ },
61
+ "modelType" : {
62
+ "name" : "MLModelType_mlProgram"
63
+ },
64
+ "inputSchema" : [
65
+ {
66
+ "hasShapeFlexibility" : "0",
67
+ "isOptional" : "0",
68
+ "dataType" : "Float16",
69
+ "formattedType" : "MultiArray (Float16 1 × 4 × 128 × 128)",
70
+ "shortDescription" : "The low resolution latent feature maps being denoised through reverse diffusion",
71
+ "shape" : "[1, 4, 128, 128]",
72
+ "name" : "sample",
73
+ "type" : "MultiArray"
74
+ },
75
+ {
76
+ "hasShapeFlexibility" : "0",
77
+ "isOptional" : "0",
78
+ "dataType" : "Float16",
79
+ "formattedType" : "MultiArray (Float16 1)",
80
+ "shortDescription" : "A value emitted by the associated scheduler object to condition the model on a given noise schedule",
81
+ "shape" : "[1]",
82
+ "name" : "timestep",
83
+ "type" : "MultiArray"
84
+ },
85
+ {
86
+ "hasShapeFlexibility" : "0",
87
+ "isOptional" : "0",
88
+ "dataType" : "Float16",
89
+ "formattedType" : "MultiArray (Float16 1 × 2048 × 1 × 77)",
90
+ "shortDescription" : "Output embeddings from the associated text_encoder model to condition to generated image on text. A maximum of 77 tokens (~40 words) are allowed. Longer text is truncated. Shorter text does not reduce computation.",
91
+ "shape" : "[1, 2048, 1, 77]",
92
+ "name" : "encoder_hidden_states",
93
+ "type" : "MultiArray"
94
+ },
95
+ {
96
+ "hasShapeFlexibility" : "0",
97
+ "isOptional" : "0",
98
+ "dataType" : "Float16",
99
+ "formattedType" : "MultiArray (Float16 1 × 6)",
100
+ "shortDescription" : "Additional embeddings that if specified are added to the embeddings that are passed along to the UNet blocks.",
101
+ "shape" : "[1, 6]",
102
+ "name" : "time_ids",
103
+ "type" : "MultiArray"
104
+ },
105
+ {
106
+ "hasShapeFlexibility" : "0",
107
+ "isOptional" : "0",
108
+ "dataType" : "Float16",
109
+ "formattedType" : "MultiArray (Float16 1 × 1280)",
110
+ "shortDescription" : "Additional embeddings from text_encoder_2 that if specified are added to the embeddings that are passed along to the UNet blocks.",
111
+ "shape" : "[1, 1280]",
112
+ "name" : "text_embeds",
113
+ "type" : "MultiArray"
114
+ }
115
+ ],
116
+ "userDefinedMetadata" : {
117
+ "com.github.apple.ml-stable-diffusion.version" : "1.1.0",
118
+ "com.github.apple.coremltools.source" : "torch==2.4.0",
119
+ "com.github.apple.coremltools.version" : "7.2",
120
+ "com.github.apple.coremltools.source_dialect" : "TorchScript"
121
+ },
122
+ "generatedClassName" : "Stable_Diffusion_version__Users_kjpark_Documents_models_dreamshaper_xl_4bit_pretrained_unet",
123
+ "method" : "predict"
124
+ }
125
+ ]
unet/coreml_model.mlmodelc/model.mil ADDED
The diff for this file is too large to render. See raw diff
 
unet/coreml_model.mlmodelc/weights/weight.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:681e5eeb53db3c187e207ab4ad11aaa5c4e81774e4fe51cdefa88eec46b4cb96
3
+ size 1927032512
vae_decoder/config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "AutoencoderKL",
3
+ "_diffusers_version": "0.19.0.dev0",
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
+ "force_upcast": false,
18
+ "in_channels": 3,
19
+ "latent_channels": 4,
20
+ "layers_per_block": 2,
21
+ "norm_num_groups": 32,
22
+ "out_channels": 3,
23
+ "sample_size": 1024,
24
+ "scaling_factor": 0.13025,
25
+ "up_block_types": [
26
+ "UpDecoderBlock2D",
27
+ "UpDecoderBlock2D",
28
+ "UpDecoderBlock2D",
29
+ "UpDecoderBlock2D"
30
+ ]
31
+ }
32
+
vae_decoder/coreml_model.mlmodelc/analytics/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:334026589a5d44461397828b5365d2cb0fe8e4e0746efe7ff23432e84330091d
3
+ size 243
vae_decoder/coreml_model.mlmodelc/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:416ed5dcb73ffc557f85b0f448bd8775b76b15094f7df58a2d4b96bc4134454b
3
+ size 870
vae_decoder/coreml_model.mlmodelc/metadata.json ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "shortDescription" : "Stable Diffusion generates images conditioned on text and\/or other images as input through the diffusion process. Please refer to https:\/\/arxiv.org\/abs\/2112.10752 for details.",
4
+ "metadataOutputVersion" : "3.0",
5
+ "outputSchema" : [
6
+ {
7
+ "hasShapeFlexibility" : "0",
8
+ "isOptional" : "0",
9
+ "dataType" : "Float32",
10
+ "formattedType" : "MultiArray (Float32 1 × 3 × 1024 × 1024)",
11
+ "shortDescription" : "Generated image normalized to range [-1, 1]",
12
+ "shape" : "[1, 3, 1024, 1024]",
13
+ "name" : "image",
14
+ "type" : "MultiArray"
15
+ }
16
+ ],
17
+ "version" : "stabilityai\/stable-diffusion-xl-base-1.0",
18
+ "modelParameters" : [
19
+
20
+ ],
21
+ "author" : "Please refer to the Model Card available at huggingface.co\/stabilityai\/stable-diffusion-xl-base-1.0",
22
+ "specificationVersion" : 7,
23
+ "storagePrecision" : "Float16",
24
+ "license" : "OpenRAIL++-M (https:\/\/huggingface.co\/stabilityai\/stable-diffusion-xl-base-1.0\/blob\/main\/LICENSE.md)",
25
+ "mlProgramOperationTypeHistogram" : {
26
+ "Ios16.cast" : 1,
27
+ "Ios16.mul" : 2,
28
+ "Ios16.sqrt" : 30,
29
+ "Ios16.sub" : 30,
30
+ "Transpose" : 6,
31
+ "UpsampleNearestNeighbor" : 3,
32
+ "Ios16.conv" : 36,
33
+ "Ios16.add" : 46,
34
+ "Ios16.linear" : 4,
35
+ "Ios16.matmul" : 2,
36
+ "Ios16.realDiv" : 30,
37
+ "Ios16.reduceMean" : 60,
38
+ "Ios16.softmax" : 1,
39
+ "Ios16.batchNorm" : 29,
40
+ "Ios16.square" : 30,
41
+ "Ios16.reshape" : 65,
42
+ "Ios16.silu" : 29
43
+ },
44
+ "computePrecision" : "Mixed (Float16, Float32, Int32)",
45
+ "isUpdatable" : "0",
46
+ "availability" : {
47
+ "macOS" : "13.0",
48
+ "tvOS" : "16.0",
49
+ "visionOS" : "1.0",
50
+ "watchOS" : "9.0",
51
+ "iOS" : "16.0",
52
+ "macCatalyst" : "16.0"
53
+ },
54
+ "modelType" : {
55
+ "name" : "MLModelType_mlProgram"
56
+ },
57
+ "inputSchema" : [
58
+ {
59
+ "hasShapeFlexibility" : "0",
60
+ "isOptional" : "0",
61
+ "dataType" : "Float16",
62
+ "formattedType" : "MultiArray (Float16 1 × 4 × 128 × 128)",
63
+ "shortDescription" : "The denoised latent embeddings from the unet model after the last step of reverse diffusion",
64
+ "shape" : "[1, 4, 128, 128]",
65
+ "name" : "z",
66
+ "type" : "MultiArray"
67
+ }
68
+ ],
69
+ "userDefinedMetadata" : {
70
+ "com.github.apple.coremltools.source_dialect" : "TorchScript",
71
+ "com.github.apple.coremltools.source" : "torch==2.2.0",
72
+ "com.github.apple.coremltools.version" : "7.2"
73
+ },
74
+ "generatedClassName" : "Stable_Diffusion_version_stabilityai_stable_diffusion_xl_base_1_0_vae_decoder",
75
+ "method" : "predict"
76
+ }
77
+ ]
vae_decoder/coreml_model.mlmodelc/model.mil ADDED
The diff for this file is too large to render. See raw diff
 
vae_decoder/coreml_model.mlmodelc/weights/weight.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b6dced84df022c469c52e6369393bcd62bd47df2327e7eedaa750e9a705332a
3
+ size 98993280
vae_encoder/config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "AutoencoderKL",
3
+ "_diffusers_version": "0.19.0.dev0",
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
+ "force_upcast": false,
18
+ "in_channels": 3,
19
+ "latent_channels": 4,
20
+ "layers_per_block": 2,
21
+ "norm_num_groups": 32,
22
+ "out_channels": 3,
23
+ "sample_size": 1024,
24
+ "scaling_factor": 0.13025,
25
+ "up_block_types": [
26
+ "UpDecoderBlock2D",
27
+ "UpDecoderBlock2D",
28
+ "UpDecoderBlock2D",
29
+ "UpDecoderBlock2D"
30
+ ]
31
+ }
32
+
vae_encoder/coreml_model.mlmodelc/analytics/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e44d9c0d47fd3c820932cb3fd5a709c70694f479f12c048a1367f655d21aa1cb
3
+ size 243
vae_encoder/coreml_model.mlmodelc/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc44873ad4c7ab4d3a0c951b65616d2bb4e633f1c1835af8041dfcd97d0f73e2
3
+ size 874
vae_encoder/coreml_model.mlmodelc/metadata.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "shortDescription" : "Stable Diffusion generates images conditioned on text and\/or other images as input through the diffusion process. Please refer to https:\/\/arxiv.org\/abs\/2112.10752 for details.",
4
+ "metadataOutputVersion" : "3.0",
5
+ "outputSchema" : [
6
+ {
7
+ "hasShapeFlexibility" : "0",
8
+ "isOptional" : "0",
9
+ "dataType" : "Float32",
10
+ "formattedType" : "MultiArray (Float32 1 × 8 × 128 × 128)",
11
+ "shortDescription" : "The latent embeddings from the unet model from the input image.",
12
+ "shape" : "[1, 8, 128, 128]",
13
+ "name" : "latent",
14
+ "type" : "MultiArray"
15
+ }
16
+ ],
17
+ "version" : "stabilityai\/stable-diffusion-xl-base-1.0",
18
+ "modelParameters" : [
19
+
20
+ ],
21
+ "author" : "Please refer to the Model Card available at huggingface.co\/stabilityai\/stable-diffusion-xl-base-1.0",
22
+ "specificationVersion" : 7,
23
+ "storagePrecision" : "Float32",
24
+ "license" : "OpenRAIL++-M (https:\/\/huggingface.co\/stabilityai\/stable-diffusion-xl-base-1.0\/blob\/main\/LICENSE.md)",
25
+ "mlProgramOperationTypeHistogram" : {
26
+ "Pad" : 3,
27
+ "Ios16.mul" : 2,
28
+ "Ios16.sqrt" : 22,
29
+ "Ios16.sub" : 22,
30
+ "Transpose" : 6,
31
+ "Ios16.conv" : 28,
32
+ "Ios16.add" : 34,
33
+ "Ios16.linear" : 4,
34
+ "Ios16.matmul" : 2,
35
+ "Ios16.realDiv" : 22,
36
+ "Ios16.reduceMean" : 44,
37
+ "Ios16.softmax" : 1,
38
+ "Ios16.batchNorm" : 21,
39
+ "Ios16.square" : 22,
40
+ "Ios16.reshape" : 49,
41
+ "Ios16.silu" : 21
42
+ },
43
+ "computePrecision" : "Mixed (Float32, Int32)",
44
+ "isUpdatable" : "0",
45
+ "availability" : {
46
+ "macOS" : "13.0",
47
+ "tvOS" : "16.0",
48
+ "visionOS" : "1.0",
49
+ "watchOS" : "9.0",
50
+ "iOS" : "16.0",
51
+ "macCatalyst" : "16.0"
52
+ },
53
+ "modelType" : {
54
+ "name" : "MLModelType_mlProgram"
55
+ },
56
+ "inputSchema" : [
57
+ {
58
+ "hasShapeFlexibility" : "0",
59
+ "isOptional" : "0",
60
+ "dataType" : "Float32",
61
+ "formattedType" : "MultiArray (Float32 1 × 3 × 1024 × 1024)",
62
+ "shortDescription" : "The input image to base the initial latents on normalized to range [-1, 1]",
63
+ "shape" : "[1, 3, 1024, 1024]",
64
+ "name" : "x",
65
+ "type" : "MultiArray"
66
+ }
67
+ ],
68
+ "userDefinedMetadata" : {
69
+ "com.github.apple.coremltools.source_dialect" : "TorchScript",
70
+ "com.github.apple.coremltools.version" : "7.2",
71
+ "com.github.apple.coremltools.source" : "torch==2.2.0"
72
+ },
73
+ "generatedClassName" : "Stable_Diffusion_version_stabilityai_stable_diffusion_xl_base_1_0_vae_encoder",
74
+ "method" : "predict"
75
+ }
76
+ ]
vae_encoder/coreml_model.mlmodelc/model.mil ADDED
The diff for this file is too large to render. See raw diff
 
vae_encoder/coreml_model.mlmodelc/weights/weight.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7a5eade1f3e6997e664a65e26ac86ba2a3205674910e151f98a9d91f13cd272b
3
+ size 136668992