Upload 6 files
Browse files
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:b5c09e8cba81e2f8c4c5ff155c5f8a41ae5d2271e6e040c849c6d00f66087346
|
| 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:d57b9bd69997d46bf280e2ef570a2b2e2b3238c24ef6bb55ca8bf25baa2fb5ec
|
| 3 |
+
size 2081
|
unet/coreml_model.mlmodelc/metadata.json
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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" : "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" : "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" : 312,
|
| 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 |
+
"hasShapeFlexibility" : "0",
|
| 117 |
+
"isOptional" : "0",
|
| 118 |
+
"dataType" : "Float16",
|
| 119 |
+
"formattedType" : "MultiArray (Float16 1 × 320 × 128 × 128)",
|
| 120 |
+
"shortDescription" : "",
|
| 121 |
+
"shape" : "[1, 320, 128, 128]",
|
| 122 |
+
"name" : "additional_residual_0",
|
| 123 |
+
"type" : "MultiArray"
|
| 124 |
+
},
|
| 125 |
+
{
|
| 126 |
+
"hasShapeFlexibility" : "0",
|
| 127 |
+
"isOptional" : "0",
|
| 128 |
+
"dataType" : "Float16",
|
| 129 |
+
"formattedType" : "MultiArray (Float16 1 × 320 × 128 × 128)",
|
| 130 |
+
"shortDescription" : "",
|
| 131 |
+
"shape" : "[1, 320, 128, 128]",
|
| 132 |
+
"name" : "additional_residual_1",
|
| 133 |
+
"type" : "MultiArray"
|
| 134 |
+
},
|
| 135 |
+
{
|
| 136 |
+
"hasShapeFlexibility" : "0",
|
| 137 |
+
"isOptional" : "0",
|
| 138 |
+
"dataType" : "Float16",
|
| 139 |
+
"formattedType" : "MultiArray (Float16 1 × 320 × 128 × 128)",
|
| 140 |
+
"shortDescription" : "",
|
| 141 |
+
"shape" : "[1, 320, 128, 128]",
|
| 142 |
+
"name" : "additional_residual_2",
|
| 143 |
+
"type" : "MultiArray"
|
| 144 |
+
},
|
| 145 |
+
{
|
| 146 |
+
"hasShapeFlexibility" : "0",
|
| 147 |
+
"isOptional" : "0",
|
| 148 |
+
"dataType" : "Float16",
|
| 149 |
+
"formattedType" : "MultiArray (Float16 1 × 320 × 64 × 64)",
|
| 150 |
+
"shortDescription" : "",
|
| 151 |
+
"shape" : "[1, 320, 64, 64]",
|
| 152 |
+
"name" : "additional_residual_3",
|
| 153 |
+
"type" : "MultiArray"
|
| 154 |
+
},
|
| 155 |
+
{
|
| 156 |
+
"hasShapeFlexibility" : "0",
|
| 157 |
+
"isOptional" : "0",
|
| 158 |
+
"dataType" : "Float16",
|
| 159 |
+
"formattedType" : "MultiArray (Float16 1 × 640 × 64 × 64)",
|
| 160 |
+
"shortDescription" : "",
|
| 161 |
+
"shape" : "[1, 640, 64, 64]",
|
| 162 |
+
"name" : "additional_residual_4",
|
| 163 |
+
"type" : "MultiArray"
|
| 164 |
+
},
|
| 165 |
+
{
|
| 166 |
+
"hasShapeFlexibility" : "0",
|
| 167 |
+
"isOptional" : "0",
|
| 168 |
+
"dataType" : "Float16",
|
| 169 |
+
"formattedType" : "MultiArray (Float16 1 × 640 × 64 × 64)",
|
| 170 |
+
"shortDescription" : "",
|
| 171 |
+
"shape" : "[1, 640, 64, 64]",
|
| 172 |
+
"name" : "additional_residual_5",
|
| 173 |
+
"type" : "MultiArray"
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"hasShapeFlexibility" : "0",
|
| 177 |
+
"isOptional" : "0",
|
| 178 |
+
"dataType" : "Float16",
|
| 179 |
+
"formattedType" : "MultiArray (Float16 1 × 640 × 32 × 32)",
|
| 180 |
+
"shortDescription" : "",
|
| 181 |
+
"shape" : "[1, 640, 32, 32]",
|
| 182 |
+
"name" : "additional_residual_6",
|
| 183 |
+
"type" : "MultiArray"
|
| 184 |
+
},
|
| 185 |
+
{
|
| 186 |
+
"hasShapeFlexibility" : "0",
|
| 187 |
+
"isOptional" : "0",
|
| 188 |
+
"dataType" : "Float16",
|
| 189 |
+
"formattedType" : "MultiArray (Float16 1 × 1280 × 32 × 32)",
|
| 190 |
+
"shortDescription" : "",
|
| 191 |
+
"shape" : "[1, 1280, 32, 32]",
|
| 192 |
+
"name" : "additional_residual_7",
|
| 193 |
+
"type" : "MultiArray"
|
| 194 |
+
},
|
| 195 |
+
{
|
| 196 |
+
"hasShapeFlexibility" : "0",
|
| 197 |
+
"isOptional" : "0",
|
| 198 |
+
"dataType" : "Float16",
|
| 199 |
+
"formattedType" : "MultiArray (Float16 1 × 1280 × 32 × 32)",
|
| 200 |
+
"shortDescription" : "",
|
| 201 |
+
"shape" : "[1, 1280, 32, 32]",
|
| 202 |
+
"name" : "additional_residual_8",
|
| 203 |
+
"type" : "MultiArray"
|
| 204 |
+
},
|
| 205 |
+
{
|
| 206 |
+
"hasShapeFlexibility" : "0",
|
| 207 |
+
"isOptional" : "0",
|
| 208 |
+
"dataType" : "Float16",
|
| 209 |
+
"formattedType" : "MultiArray (Float16 1 × 1280 × 32 × 32)",
|
| 210 |
+
"shortDescription" : "",
|
| 211 |
+
"shape" : "[1, 1280, 32, 32]",
|
| 212 |
+
"name" : "additional_residual_9",
|
| 213 |
+
"type" : "MultiArray"
|
| 214 |
+
}
|
| 215 |
+
],
|
| 216 |
+
"userDefinedMetadata" : {
|
| 217 |
+
"com.github.apple.ml-stable-diffusion.version" : "1.1.0",
|
| 218 |
+
"com.github.apple.coremltools.source" : "torch==2.2.0",
|
| 219 |
+
"com.github.apple.coremltools.version" : "7.2",
|
| 220 |
+
"com.github.apple.coremltools.source_dialect" : "TorchScript"
|
| 221 |
+
},
|
| 222 |
+
"generatedClassName" : "Stable_Diffusion_version_stabilityai_stable_diffusion_xl_base_1_0_control_unet",
|
| 223 |
+
"method" : "predict"
|
| 224 |
+
}
|
| 225 |
+
]
|
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:7e4d55b05fb4422fb0c02291c56f2e5a00bd86708f093c273331df221c3e2c5b
|
| 3 |
+
size 1927032512
|