alexwengg commited on
Commit
cdaea5e
·
verified ·
1 Parent(s): c94edcb

fix(vocoder): rank-stable anchor for macOS 14 Espresso (FluidAudio#836)

Browse files

Replace reduce_mean(keep_dims=false) -> rank-0 -> expand_dims with a single reduce_mean(axes=[1,2]) producing [1] directly. macOS 14's Espresso runtime mangles the rank-0 intermediate into rank 2, failing every prediction under all compute-unit presets. anchor is discarded by all hosts; x_pre verified bit-exact vs previous artifacts. Applies to ANE, ANE-zh, ANE-ja (ja vocoder is byte-identical to en).

ANE-ja/KokoroVocoder.mlmodelc/analytics/coremldata.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8c7c1a25a46ad46b1068905ece8f841c4bd23df23306551bad175d0da28ae74b
3
  size 243
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cc4f1e6436597c6d458a845570d9d0ace458813ff90f225d08e0e713496b463
3
  size 243
ANE-ja/KokoroVocoder.mlmodelc/coremldata.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e73aaf146c7543c0f75f544ac52e3287fa4eaa7e9a04bf3ac6a94d0023f16c00
3
  size 626
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:71bac80d2f2f077fefc0d66cdc39c0faaa96540b3a6149093ef29de01b1f8764
3
  size 626
ANE-ja/KokoroVocoder.mlmodelc/metadata.json CHANGED
@@ -1,147 +1,143 @@
1
  [
2
  {
3
- "metadataOutputVersion" : "3.0",
4
- "storagePrecision" : "Mixed (Float16, Palettized (8 bits))",
5
- "outputSchema" : [
6
  {
7
- "hasShapeFlexibility" : "0",
8
- "isOptional" : "0",
9
- "dataType" : "Float16",
10
- "formattedType" : "MultiArray (Float16 1)",
11
- "shortDescription" : "",
12
- "shape" : "[1]",
13
- "name" : "anchor",
14
- "type" : "MultiArray"
15
  },
16
  {
17
- "hasShapeFlexibility" : "0",
18
- "isOptional" : "0",
19
- "dataType" : "Float16",
20
- "formattedType" : "MultiArray (Float16)",
21
- "shortDescription" : "",
22
- "shape" : "[]",
23
- "name" : "x_pre",
24
- "type" : "MultiArray"
25
  }
26
  ],
27
- "modelParameters" : [
28
-
29
- ],
30
- "specificationVersion" : 8,
31
- "mlProgramOperationTypeHistogram" : {
32
- "Ios17.mul" : 161,
33
- "Ios17.linear" : 46,
34
- "Ios17.cos" : 36,
35
- "Ios16.constexprLutToDense" : 101,
36
- "Ios17.conv" : 54,
37
- "Ios17.leakyRelu" : 13,
38
- "Ios17.concat" : 6,
39
- "Ios17.add" : 193,
40
- "Ios17.convTranspose" : 3,
41
- "Ios17.sliceByIndex" : 2,
42
- "UpsampleNearestNeighbor" : 1,
43
- "Ios16.reduceMean" : 1,
44
- "Ios17.expandDims" : 4,
45
- "Ios17.instanceNorm" : 42,
46
- "Ios17.reshape" : 46,
47
- "Split" : 46,
48
- "Ios17.squeeze" : 1
49
  },
50
- "computePrecision" : "Mixed (Float16, Float32, Int32)",
51
- "isUpdatable" : "0",
52
- "stateSchema" : [
53
-
54
- ],
55
- "availability" : {
56
- "macOS" : "14.0",
57
- "tvOS" : "17.0",
58
- "visionOS" : "1.0",
59
- "watchOS" : "10.0",
60
- "iOS" : "17.0",
61
- "macCatalyst" : "17.0"
62
  },
63
- "modelType" : {
64
- "name" : "MLModelType_mlProgram"
65
  },
66
- "userDefinedMetadata" : {
67
- "com.github.apple.coremltools.conversion_date" : "2026-04-27",
68
- "com.github.apple.coremltools.source" : "torch==2.11.0",
69
- "com.github.apple.coremltools.version" : "9.0",
70
- "com.github.apple.coremltools.source_dialect" : "TorchScript"
71
  },
72
- "inputSchema" : [
73
  {
74
- "dataType" : "Float16",
75
- "hasShapeFlexibility" : "1",
76
- "isOptional" : "0",
77
- "shapeFlexibility" : "1 × 512 × 1...2000",
78
- "shapeRange" : "[[1, 1], [512, 512], [1, 2000]]",
79
- "formattedType" : "MultiArray (Float16 1 × 512 × 120)",
80
- "type" : "MultiArray",
81
- "shape" : "[1, 512, 120]",
82
- "name" : "asr",
83
- "shortDescription" : ""
84
  },
85
  {
86
- "dataType" : "Float16",
87
- "hasShapeFlexibility" : "1",
88
- "isOptional" : "0",
89
- "shapeFlexibility" : "1 × 2...4000",
90
- "shapeRange" : "[[1, 1], [2, 4000]]",
91
- "formattedType" : "MultiArray (Float16 1 × 240)",
92
- "type" : "MultiArray",
93
- "shape" : "[1, 240]",
94
- "name" : "F0_curve",
95
- "shortDescription" : ""
96
  },
97
  {
98
- "dataType" : "Float16",
99
- "hasShapeFlexibility" : "1",
100
- "isOptional" : "0",
101
- "shapeFlexibility" : "1 × 2...4000",
102
- "shapeRange" : "[[1, 1], [2, 4000]]",
103
- "formattedType" : "MultiArray (Float16 1 × 240)",
104
- "type" : "MultiArray",
105
- "shape" : "[1, 240]",
106
- "name" : "N_pred",
107
- "shortDescription" : ""
108
  },
109
  {
110
- "dataType" : "Float16",
111
- "hasShapeFlexibility" : "1",
112
- "isOptional" : "0",
113
- "shapeFlexibility" : "1 × 256 × 1...40000",
114
- "shapeRange" : "[[1, 1], [256, 256], [1, 40000]]",
115
- "formattedType" : "MultiArray (Float16 1 × 256 × 2400)",
116
- "type" : "MultiArray",
117
- "shape" : "[1, 256, 2400]",
118
- "name" : "x_source_0",
119
- "shortDescription" : ""
120
  },
121
  {
122
- "dataType" : "Float16",
123
- "hasShapeFlexibility" : "1",
124
- "isOptional" : "0",
125
- "shapeFlexibility" : "1 × 128 × 1...240001",
126
- "shapeRange" : "[[1, 1], [128, 128], [1, 240001]]",
127
- "formattedType" : "MultiArray (Float16 1 × 128 × 14401)",
128
- "type" : "MultiArray",
129
- "shape" : "[1, 128, 14401]",
130
- "name" : "x_source_1",
131
- "shortDescription" : ""
132
  },
133
  {
134
- "hasShapeFlexibility" : "0",
135
- "isOptional" : "0",
136
- "dataType" : "Float16",
137
- "formattedType" : "MultiArray (Float16 1 × 128)",
138
- "shortDescription" : "",
139
- "shape" : "[1, 128]",
140
- "name" : "style_timbre",
141
- "type" : "MultiArray"
142
  }
143
  ],
144
- "generatedClassName" : "KokoroVocoder",
145
- "method" : "predict"
146
  }
147
  ]
 
1
  [
2
  {
3
+ "metadataOutputVersion": "3.0",
4
+ "storagePrecision": "Mixed (Float16, Palettized (8 bits))",
5
+ "outputSchema": [
6
  {
7
+ "hasShapeFlexibility": "0",
8
+ "isOptional": "0",
9
+ "dataType": "Float16",
10
+ "formattedType": "MultiArray (Float16 1)",
11
+ "shortDescription": "",
12
+ "shape": "[1]",
13
+ "name": "anchor",
14
+ "type": "MultiArray"
15
  },
16
  {
17
+ "hasShapeFlexibility": "0",
18
+ "isOptional": "0",
19
+ "dataType": "Float16",
20
+ "formattedType": "MultiArray (Float16)",
21
+ "shortDescription": "",
22
+ "shape": "[]",
23
+ "name": "x_pre",
24
+ "type": "MultiArray"
25
  }
26
  ],
27
+ "modelParameters": [],
28
+ "specificationVersion": 8,
29
+ "mlProgramOperationTypeHistogram": {
30
+ "Ios17.mul": 161,
31
+ "Ios17.linear": 46,
32
+ "Ios17.cos": 36,
33
+ "Ios16.constexprLutToDense": 101,
34
+ "Ios17.conv": 54,
35
+ "Ios17.leakyRelu": 13,
36
+ "Ios17.concat": 6,
37
+ "Ios17.add": 193,
38
+ "Ios17.convTranspose": 3,
39
+ "Ios17.sliceByIndex": 2,
40
+ "UpsampleNearestNeighbor": 1,
41
+ "Ios16.reduceMean": 1,
42
+ "Ios17.expandDims": 3,
43
+ "Ios17.instanceNorm": 42,
44
+ "Ios17.reshape": 46,
45
+ "Split": 46,
46
+ "Ios17.squeeze": 1
 
 
47
  },
48
+ "computePrecision": "Mixed (Float16, Float32, Int32)",
49
+ "isUpdatable": "0",
50
+ "stateSchema": [],
51
+ "availability": {
52
+ "macOS": "14.0",
53
+ "tvOS": "17.0",
54
+ "visionOS": "1.0",
55
+ "watchOS": "10.0",
56
+ "iOS": "17.0",
57
+ "macCatalyst": "17.0"
 
 
58
  },
59
+ "modelType": {
60
+ "name": "MLModelType_mlProgram"
61
  },
62
+ "userDefinedMetadata": {
63
+ "com.github.apple.coremltools.conversion_date": "2026-04-27",
64
+ "com.github.apple.coremltools.source": "torch==2.11.0",
65
+ "com.github.apple.coremltools.version": "9.0",
66
+ "com.github.apple.coremltools.source_dialect": "TorchScript"
67
  },
68
+ "inputSchema": [
69
  {
70
+ "dataType": "Float16",
71
+ "hasShapeFlexibility": "1",
72
+ "isOptional": "0",
73
+ "shapeFlexibility": "1 \u00d7 512 \u00d7 1...2000",
74
+ "shapeRange": "[[1, 1], [512, 512], [1, 2000]]",
75
+ "formattedType": "MultiArray (Float16 1 \u00d7 512 \u00d7 120)",
76
+ "type": "MultiArray",
77
+ "shape": "[1, 512, 120]",
78
+ "name": "asr",
79
+ "shortDescription": ""
80
  },
81
  {
82
+ "dataType": "Float16",
83
+ "hasShapeFlexibility": "1",
84
+ "isOptional": "0",
85
+ "shapeFlexibility": "1 \u00d7 2...4000",
86
+ "shapeRange": "[[1, 1], [2, 4000]]",
87
+ "formattedType": "MultiArray (Float16 1 \u00d7 240)",
88
+ "type": "MultiArray",
89
+ "shape": "[1, 240]",
90
+ "name": "F0_curve",
91
+ "shortDescription": ""
92
  },
93
  {
94
+ "dataType": "Float16",
95
+ "hasShapeFlexibility": "1",
96
+ "isOptional": "0",
97
+ "shapeFlexibility": "1 \u00d7 2...4000",
98
+ "shapeRange": "[[1, 1], [2, 4000]]",
99
+ "formattedType": "MultiArray (Float16 1 \u00d7 240)",
100
+ "type": "MultiArray",
101
+ "shape": "[1, 240]",
102
+ "name": "N_pred",
103
+ "shortDescription": ""
104
  },
105
  {
106
+ "dataType": "Float16",
107
+ "hasShapeFlexibility": "1",
108
+ "isOptional": "0",
109
+ "shapeFlexibility": "1 \u00d7 256 \u00d7 1...40000",
110
+ "shapeRange": "[[1, 1], [256, 256], [1, 40000]]",
111
+ "formattedType": "MultiArray (Float16 1 \u00d7 256 \u00d7 2400)",
112
+ "type": "MultiArray",
113
+ "shape": "[1, 256, 2400]",
114
+ "name": "x_source_0",
115
+ "shortDescription": ""
116
  },
117
  {
118
+ "dataType": "Float16",
119
+ "hasShapeFlexibility": "1",
120
+ "isOptional": "0",
121
+ "shapeFlexibility": "1 \u00d7 128 \u00d7 1...240001",
122
+ "shapeRange": "[[1, 1], [128, 128], [1, 240001]]",
123
+ "formattedType": "MultiArray (Float16 1 \u00d7 128 \u00d7 14401)",
124
+ "type": "MultiArray",
125
+ "shape": "[1, 128, 14401]",
126
+ "name": "x_source_1",
127
+ "shortDescription": ""
128
  },
129
  {
130
+ "hasShapeFlexibility": "0",
131
+ "isOptional": "0",
132
+ "dataType": "Float16",
133
+ "formattedType": "MultiArray (Float16 1 \u00d7 128)",
134
+ "shortDescription": "",
135
+ "shape": "[1, 128]",
136
+ "name": "style_timbre",
137
+ "type": "MultiArray"
138
  }
139
  ],
140
+ "generatedClassName": "KokoroVocoder",
141
+ "method": "predict"
142
  }
143
  ]
ANE-ja/KokoroVocoder.mlmodelc/model.mil CHANGED
@@ -1,5 +1,5 @@
1
  program(1.0)
2
- [buildInfo = dict<tensor<string, []>, tensor<string, []>>({{"coremlc-component-MIL", "3520.4.1"}, {"coremlc-version", "3520.5.1"}})]
3
  {
4
  func main<ios17>(tensor<fp16, [1, ?]> F0_curve, tensor<fp16, [1, ?]> N_pred, tensor<fp16, [1, 512, ?]> asr, tensor<fp16, [1, 128]> style_timbre, tensor<fp16, [1, 256, ?]> x_source_0, tensor<fp16, [1, 128, ?]> x_source_1) [FlexibleShapeInformation = tuple<tuple<tensor<string, []>, dict<tensor<string, []>, tensor<int32, [?]>>>, tuple<tensor<string, []>, dict<tensor<string, []>, list<tensor<int32, [2]>, ?>>>>((("DefaultShapes", {{"F0_curve", [1, 240]}, {"N_pred", [1, 240]}, {"asr", [1, 512, 120]}, {"x_source_0", [1, 256, 2400]}, {"x_source_1", [1, 128, 14401]}}), ("RangeDims", {{"F0_curve", [[1, 1], [2, 4000]]}, {"N_pred", [[1, 1], [2, 4000]]}, {"asr", [[1, 1], [512, 512], [1, 2000]]}, {"x_source_0", [[1, 1], [256, 256], [1, 40000]]}, {"x_source_1", [[1, 1], [128, 128], [1, 240001]]}})))] {
5
  tensor<int32, [1]> input_1_axes_0 = const()[name = tensor<string, []>("input_1_axes_0"), val = tensor<int32, [1]>([1])];
@@ -1533,8 +1533,7 @@ program(1.0)
1533
  tensor<fp32, []> var_2519 = const()[name = tensor<string, []>("op_2519"), val = tensor<fp32, []>(0x1.47ae14p-7)];
1534
  tensor<fp16, [1, 128, ?]> x_pre = leaky_relu(alpha = var_2519, x = _inversed_input_cast_fp16)[name = tensor<string, []>("x_pre_cast_fp16")];
1535
  tensor<bool, []> var_2522_keep_dims_0 = const()[name = tensor<string, []>("op_2522_keep_dims_0"), val = tensor<bool, []>(false)];
1536
- tensor<fp16, []> var_2522_cast_fp16 = reduce_mean(keep_dims = var_2522_keep_dims_0, x = x_pre)[name = tensor<string, []>("op_2522_cast_fp16")];
1537
- tensor<int32, [1]> var_2524_axes_0 = const()[name = tensor<string, []>("op_2524_axes_0"), val = tensor<int32, [1]>([0])];
1538
- tensor<fp16, [1]> anchor = expand_dims(axes = var_2524_axes_0, x = var_2522_cast_fp16)[name = tensor<string, []>("op_2524_cast_fp16")];
1539
  } -> (anchor, x_pre);
1540
  }
 
1
  program(1.0)
2
+ [buildInfo = dict<tensor<string, []>, tensor<string, []>>({{"coremlc-component-MIL", "3520.4.1"}, {"coremlc-version", "3520.5.1.2"}})]
3
  {
4
  func main<ios17>(tensor<fp16, [1, ?]> F0_curve, tensor<fp16, [1, ?]> N_pred, tensor<fp16, [1, 512, ?]> asr, tensor<fp16, [1, 128]> style_timbre, tensor<fp16, [1, 256, ?]> x_source_0, tensor<fp16, [1, 128, ?]> x_source_1) [FlexibleShapeInformation = tuple<tuple<tensor<string, []>, dict<tensor<string, []>, tensor<int32, [?]>>>, tuple<tensor<string, []>, dict<tensor<string, []>, list<tensor<int32, [2]>, ?>>>>((("DefaultShapes", {{"F0_curve", [1, 240]}, {"N_pred", [1, 240]}, {"asr", [1, 512, 120]}, {"x_source_0", [1, 256, 2400]}, {"x_source_1", [1, 128, 14401]}}), ("RangeDims", {{"F0_curve", [[1, 1], [2, 4000]]}, {"N_pred", [[1, 1], [2, 4000]]}, {"asr", [[1, 1], [512, 512], [1, 2000]]}, {"x_source_0", [[1, 1], [256, 256], [1, 40000]]}, {"x_source_1", [[1, 1], [128, 128], [1, 240001]]}})))] {
5
  tensor<int32, [1]> input_1_axes_0 = const()[name = tensor<string, []>("input_1_axes_0"), val = tensor<int32, [1]>([1])];
 
1533
  tensor<fp32, []> var_2519 = const()[name = tensor<string, []>("op_2519"), val = tensor<fp32, []>(0x1.47ae14p-7)];
1534
  tensor<fp16, [1, 128, ?]> x_pre = leaky_relu(alpha = var_2519, x = _inversed_input_cast_fp16)[name = tensor<string, []>("x_pre_cast_fp16")];
1535
  tensor<bool, []> var_2522_keep_dims_0 = const()[name = tensor<string, []>("op_2522_keep_dims_0"), val = tensor<bool, []>(false)];
1536
+ tensor<int32, [2]> var_2524_axes_0 = const()[name = tensor<string, []>("op_2524_axes_0"), val = tensor<int32, [2]>([1, 2])];
1537
+ tensor<fp16, [1]> anchor = reduce_mean(axes = var_2524_axes_0, keep_dims = var_2522_keep_dims_0, x = x_pre)[name = tensor<string, []>("op_2522_cast_fp16")];
 
1538
  } -> (anchor, x_pre);
1539
  }
ANE-zh/KokoroVocoder.mlmodelc/analytics/coremldata.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:12bf39f5117a2fe2645b0158d75d71a99b328b237f1add55a1511d0e2ee3b456
3
  size 243
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:80953c7c1509d2f2d16e822a1a64e173addf98810e34df868c340bd184e10d56
3
  size 243
ANE-zh/KokoroVocoder.mlmodelc/coremldata.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:24ad83fed32d94eff2b3d9d70159140057ebad500b2a7f8fb54b0be0204b1cd2
3
  size 627
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:64c49e62863d689ca4482681373e6466cc6cdb02edadd30c5a33ab19dc9e7ab3
3
  size 627
ANE-zh/KokoroVocoder.mlmodelc/metadata.json CHANGED
@@ -1,147 +1,143 @@
1
  [
2
  {
3
- "metadataOutputVersion" : "3.0",
4
- "storagePrecision" : "Mixed (Float16, Palettized (8 bits))",
5
- "outputSchema" : [
6
  {
7
- "hasShapeFlexibility" : "0",
8
- "isOptional" : "0",
9
- "dataType" : "Float16",
10
- "formattedType" : "MultiArray (Float16 1)",
11
- "shortDescription" : "",
12
- "shape" : "[1]",
13
- "name" : "anchor",
14
- "type" : "MultiArray"
15
  },
16
  {
17
- "hasShapeFlexibility" : "0",
18
- "isOptional" : "0",
19
- "dataType" : "Float16",
20
- "formattedType" : "MultiArray (Float16)",
21
- "shortDescription" : "",
22
- "shape" : "[]",
23
- "name" : "x_pre",
24
- "type" : "MultiArray"
25
  }
26
  ],
27
- "modelParameters" : [
28
-
29
- ],
30
- "specificationVersion" : 8,
31
- "mlProgramOperationTypeHistogram" : {
32
- "Ios17.mul" : 161,
33
- "Ios17.linear" : 46,
34
- "Ios17.cos" : 36,
35
- "Ios16.constexprLutToDense" : 101,
36
- "Ios17.conv" : 54,
37
- "Ios17.leakyRelu" : 13,
38
- "Ios17.concat" : 6,
39
- "Ios17.add" : 193,
40
- "Ios17.convTranspose" : 3,
41
- "Ios17.sliceByIndex" : 2,
42
- "UpsampleNearestNeighbor" : 1,
43
- "Ios16.reduceMean" : 1,
44
- "Ios17.expandDims" : 4,
45
- "Ios17.instanceNorm" : 42,
46
- "Ios17.reshape" : 46,
47
- "Split" : 46,
48
- "Ios17.squeeze" : 1
49
  },
50
- "computePrecision" : "Mixed (Float16, Float32, Int32)",
51
- "isUpdatable" : "0",
52
- "stateSchema" : [
53
-
54
- ],
55
- "availability" : {
56
- "macOS" : "14.0",
57
- "tvOS" : "17.0",
58
- "visionOS" : "1.0",
59
- "watchOS" : "10.0",
60
- "iOS" : "17.0",
61
- "macCatalyst" : "17.0"
62
  },
63
- "modelType" : {
64
- "name" : "MLModelType_mlProgram"
65
  },
66
- "userDefinedMetadata" : {
67
- "com.github.apple.coremltools.conversion_date" : "2026-05-03",
68
- "com.github.apple.coremltools.source" : "torch==2.11.0",
69
- "com.github.apple.coremltools.version" : "9.0",
70
- "com.github.apple.coremltools.source_dialect" : "TorchScript"
71
  },
72
- "inputSchema" : [
73
  {
74
- "dataType" : "Float16",
75
- "hasShapeFlexibility" : "1",
76
- "isOptional" : "0",
77
- "shapeFlexibility" : "1 × 512 × 1...2000",
78
- "shapeRange" : "[[1, 1], [512, 512], [1, 2000]]",
79
- "formattedType" : "MultiArray (Float16 1 × 512 × 133)",
80
- "type" : "MultiArray",
81
- "shape" : "[1, 512, 133]",
82
- "name" : "asr",
83
- "shortDescription" : ""
84
  },
85
  {
86
- "dataType" : "Float16",
87
- "hasShapeFlexibility" : "1",
88
- "isOptional" : "0",
89
- "shapeFlexibility" : "1 × 2...4000",
90
- "shapeRange" : "[[1, 1], [2, 4000]]",
91
- "formattedType" : "MultiArray (Float16 1 × 266)",
92
- "type" : "MultiArray",
93
- "shape" : "[1, 266]",
94
- "name" : "F0_curve",
95
- "shortDescription" : ""
96
  },
97
  {
98
- "dataType" : "Float16",
99
- "hasShapeFlexibility" : "1",
100
- "isOptional" : "0",
101
- "shapeFlexibility" : "1 × 2...4000",
102
- "shapeRange" : "[[1, 1], [2, 4000]]",
103
- "formattedType" : "MultiArray (Float16 1 × 266)",
104
- "type" : "MultiArray",
105
- "shape" : "[1, 266]",
106
- "name" : "N_pred",
107
- "shortDescription" : ""
108
  },
109
  {
110
- "dataType" : "Float16",
111
- "hasShapeFlexibility" : "1",
112
- "isOptional" : "0",
113
- "shapeFlexibility" : "1 × 256 × 1...40000",
114
- "shapeRange" : "[[1, 1], [256, 256], [1, 40000]]",
115
- "formattedType" : "MultiArray (Float16 1 × 256 × 2660)",
116
- "type" : "MultiArray",
117
- "shape" : "[1, 256, 2660]",
118
- "name" : "x_source_0",
119
- "shortDescription" : ""
120
  },
121
  {
122
- "dataType" : "Float16",
123
- "hasShapeFlexibility" : "1",
124
- "isOptional" : "0",
125
- "shapeFlexibility" : "1 × 128 × 1...240001",
126
- "shapeRange" : "[[1, 1], [128, 128], [1, 240001]]",
127
- "formattedType" : "MultiArray (Float16 1 × 128 × 15961)",
128
- "type" : "MultiArray",
129
- "shape" : "[1, 128, 15961]",
130
- "name" : "x_source_1",
131
- "shortDescription" : ""
132
  },
133
  {
134
- "hasShapeFlexibility" : "0",
135
- "isOptional" : "0",
136
- "dataType" : "Float16",
137
- "formattedType" : "MultiArray (Float16 1 × 128)",
138
- "shortDescription" : "",
139
- "shape" : "[1, 128]",
140
- "name" : "style_timbre",
141
- "type" : "MultiArray"
142
  }
143
  ],
144
- "generatedClassName" : "KokoroVocoder",
145
- "method" : "predict"
146
  }
147
  ]
 
1
  [
2
  {
3
+ "metadataOutputVersion": "3.0",
4
+ "storagePrecision": "Mixed (Float16, Palettized (8 bits))",
5
+ "outputSchema": [
6
  {
7
+ "hasShapeFlexibility": "0",
8
+ "isOptional": "0",
9
+ "dataType": "Float16",
10
+ "formattedType": "MultiArray (Float16 1)",
11
+ "shortDescription": "",
12
+ "shape": "[1]",
13
+ "name": "anchor",
14
+ "type": "MultiArray"
15
  },
16
  {
17
+ "hasShapeFlexibility": "0",
18
+ "isOptional": "0",
19
+ "dataType": "Float16",
20
+ "formattedType": "MultiArray (Float16)",
21
+ "shortDescription": "",
22
+ "shape": "[]",
23
+ "name": "x_pre",
24
+ "type": "MultiArray"
25
  }
26
  ],
27
+ "modelParameters": [],
28
+ "specificationVersion": 8,
29
+ "mlProgramOperationTypeHistogram": {
30
+ "Ios17.mul": 161,
31
+ "Ios17.linear": 46,
32
+ "Ios17.cos": 36,
33
+ "Ios16.constexprLutToDense": 101,
34
+ "Ios17.conv": 54,
35
+ "Ios17.leakyRelu": 13,
36
+ "Ios17.concat": 6,
37
+ "Ios17.add": 193,
38
+ "Ios17.convTranspose": 3,
39
+ "Ios17.sliceByIndex": 2,
40
+ "UpsampleNearestNeighbor": 1,
41
+ "Ios16.reduceMean": 1,
42
+ "Ios17.expandDims": 3,
43
+ "Ios17.instanceNorm": 42,
44
+ "Ios17.reshape": 46,
45
+ "Split": 46,
46
+ "Ios17.squeeze": 1
 
 
47
  },
48
+ "computePrecision": "Mixed (Float16, Float32, Int32)",
49
+ "isUpdatable": "0",
50
+ "stateSchema": [],
51
+ "availability": {
52
+ "macOS": "14.0",
53
+ "tvOS": "17.0",
54
+ "visionOS": "1.0",
55
+ "watchOS": "10.0",
56
+ "iOS": "17.0",
57
+ "macCatalyst": "17.0"
 
 
58
  },
59
+ "modelType": {
60
+ "name": "MLModelType_mlProgram"
61
  },
62
+ "userDefinedMetadata": {
63
+ "com.github.apple.coremltools.conversion_date": "2026-05-03",
64
+ "com.github.apple.coremltools.source": "torch==2.11.0",
65
+ "com.github.apple.coremltools.version": "9.0",
66
+ "com.github.apple.coremltools.source_dialect": "TorchScript"
67
  },
68
+ "inputSchema": [
69
  {
70
+ "dataType": "Float16",
71
+ "hasShapeFlexibility": "1",
72
+ "isOptional": "0",
73
+ "shapeFlexibility": "1 \u00d7 512 \u00d7 1...2000",
74
+ "shapeRange": "[[1, 1], [512, 512], [1, 2000]]",
75
+ "formattedType": "MultiArray (Float16 1 \u00d7 512 \u00d7 133)",
76
+ "type": "MultiArray",
77
+ "shape": "[1, 512, 133]",
78
+ "name": "asr",
79
+ "shortDescription": ""
80
  },
81
  {
82
+ "dataType": "Float16",
83
+ "hasShapeFlexibility": "1",
84
+ "isOptional": "0",
85
+ "shapeFlexibility": "1 \u00d7 2...4000",
86
+ "shapeRange": "[[1, 1], [2, 4000]]",
87
+ "formattedType": "MultiArray (Float16 1 \u00d7 266)",
88
+ "type": "MultiArray",
89
+ "shape": "[1, 266]",
90
+ "name": "F0_curve",
91
+ "shortDescription": ""
92
  },
93
  {
94
+ "dataType": "Float16",
95
+ "hasShapeFlexibility": "1",
96
+ "isOptional": "0",
97
+ "shapeFlexibility": "1 \u00d7 2...4000",
98
+ "shapeRange": "[[1, 1], [2, 4000]]",
99
+ "formattedType": "MultiArray (Float16 1 \u00d7 266)",
100
+ "type": "MultiArray",
101
+ "shape": "[1, 266]",
102
+ "name": "N_pred",
103
+ "shortDescription": ""
104
  },
105
  {
106
+ "dataType": "Float16",
107
+ "hasShapeFlexibility": "1",
108
+ "isOptional": "0",
109
+ "shapeFlexibility": "1 \u00d7 256 \u00d7 1...40000",
110
+ "shapeRange": "[[1, 1], [256, 256], [1, 40000]]",
111
+ "formattedType": "MultiArray (Float16 1 \u00d7 256 \u00d7 2660)",
112
+ "type": "MultiArray",
113
+ "shape": "[1, 256, 2660]",
114
+ "name": "x_source_0",
115
+ "shortDescription": ""
116
  },
117
  {
118
+ "dataType": "Float16",
119
+ "hasShapeFlexibility": "1",
120
+ "isOptional": "0",
121
+ "shapeFlexibility": "1 \u00d7 128 \u00d7 1...240001",
122
+ "shapeRange": "[[1, 1], [128, 128], [1, 240001]]",
123
+ "formattedType": "MultiArray (Float16 1 \u00d7 128 \u00d7 15961)",
124
+ "type": "MultiArray",
125
+ "shape": "[1, 128, 15961]",
126
+ "name": "x_source_1",
127
+ "shortDescription": ""
128
  },
129
  {
130
+ "hasShapeFlexibility": "0",
131
+ "isOptional": "0",
132
+ "dataType": "Float16",
133
+ "formattedType": "MultiArray (Float16 1 \u00d7 128)",
134
+ "shortDescription": "",
135
+ "shape": "[1, 128]",
136
+ "name": "style_timbre",
137
+ "type": "MultiArray"
138
  }
139
  ],
140
+ "generatedClassName": "KokoroVocoder",
141
+ "method": "predict"
142
  }
143
  ]
ANE-zh/KokoroVocoder.mlmodelc/model.mil CHANGED
@@ -1,5 +1,5 @@
1
  program(1.0)
2
- [buildInfo = dict<tensor<string, []>, tensor<string, []>>({{"coremlc-component-MIL", "3520.4.1"}, {"coremlc-version", "3520.5.1"}})]
3
  {
4
  func main<ios17>(tensor<fp16, [1, ?]> F0_curve, tensor<fp16, [1, ?]> N_pred, tensor<fp16, [1, 512, ?]> asr, tensor<fp16, [1, 128]> style_timbre, tensor<fp16, [1, 256, ?]> x_source_0, tensor<fp16, [1, 128, ?]> x_source_1) [FlexibleShapeInformation = tuple<tuple<tensor<string, []>, dict<tensor<string, []>, tensor<int32, [?]>>>, tuple<tensor<string, []>, dict<tensor<string, []>, list<tensor<int32, [2]>, ?>>>>((("DefaultShapes", {{"F0_curve", [1, 266]}, {"N_pred", [1, 266]}, {"asr", [1, 512, 133]}, {"x_source_0", [1, 256, 2660]}, {"x_source_1", [1, 128, 15961]}}), ("RangeDims", {{"F0_curve", [[1, 1], [2, 4000]]}, {"N_pred", [[1, 1], [2, 4000]]}, {"asr", [[1, 1], [512, 512], [1, 2000]]}, {"x_source_0", [[1, 1], [256, 256], [1, 40000]]}, {"x_source_1", [[1, 1], [128, 128], [1, 240001]]}})))] {
5
  tensor<int32, [1]> input_1_axes_0 = const()[name = tensor<string, []>("input_1_axes_0"), val = tensor<int32, [1]>([1])];
@@ -1533,8 +1533,7 @@ program(1.0)
1533
  tensor<fp32, []> var_2519 = const()[name = tensor<string, []>("op_2519"), val = tensor<fp32, []>(0x1.47ae14p-7)];
1534
  tensor<fp16, [1, 128, ?]> x_pre = leaky_relu(alpha = var_2519, x = _inversed_input_cast_fp16)[name = tensor<string, []>("x_pre_cast_fp16")];
1535
  tensor<bool, []> var_2522_keep_dims_0 = const()[name = tensor<string, []>("op_2522_keep_dims_0"), val = tensor<bool, []>(false)];
1536
- tensor<fp16, []> var_2522_cast_fp16 = reduce_mean(keep_dims = var_2522_keep_dims_0, x = x_pre)[name = tensor<string, []>("op_2522_cast_fp16")];
1537
- tensor<int32, [1]> var_2524_axes_0 = const()[name = tensor<string, []>("op_2524_axes_0"), val = tensor<int32, [1]>([0])];
1538
- tensor<fp16, [1]> anchor = expand_dims(axes = var_2524_axes_0, x = var_2522_cast_fp16)[name = tensor<string, []>("op_2524_cast_fp16")];
1539
  } -> (anchor, x_pre);
1540
  }
 
1
  program(1.0)
2
+ [buildInfo = dict<tensor<string, []>, tensor<string, []>>({{"coremlc-component-MIL", "3520.4.1"}, {"coremlc-version", "3520.5.1.2"}})]
3
  {
4
  func main<ios17>(tensor<fp16, [1, ?]> F0_curve, tensor<fp16, [1, ?]> N_pred, tensor<fp16, [1, 512, ?]> asr, tensor<fp16, [1, 128]> style_timbre, tensor<fp16, [1, 256, ?]> x_source_0, tensor<fp16, [1, 128, ?]> x_source_1) [FlexibleShapeInformation = tuple<tuple<tensor<string, []>, dict<tensor<string, []>, tensor<int32, [?]>>>, tuple<tensor<string, []>, dict<tensor<string, []>, list<tensor<int32, [2]>, ?>>>>((("DefaultShapes", {{"F0_curve", [1, 266]}, {"N_pred", [1, 266]}, {"asr", [1, 512, 133]}, {"x_source_0", [1, 256, 2660]}, {"x_source_1", [1, 128, 15961]}}), ("RangeDims", {{"F0_curve", [[1, 1], [2, 4000]]}, {"N_pred", [[1, 1], [2, 4000]]}, {"asr", [[1, 1], [512, 512], [1, 2000]]}, {"x_source_0", [[1, 1], [256, 256], [1, 40000]]}, {"x_source_1", [[1, 1], [128, 128], [1, 240001]]}})))] {
5
  tensor<int32, [1]> input_1_axes_0 = const()[name = tensor<string, []>("input_1_axes_0"), val = tensor<int32, [1]>([1])];
 
1533
  tensor<fp32, []> var_2519 = const()[name = tensor<string, []>("op_2519"), val = tensor<fp32, []>(0x1.47ae14p-7)];
1534
  tensor<fp16, [1, 128, ?]> x_pre = leaky_relu(alpha = var_2519, x = _inversed_input_cast_fp16)[name = tensor<string, []>("x_pre_cast_fp16")];
1535
  tensor<bool, []> var_2522_keep_dims_0 = const()[name = tensor<string, []>("op_2522_keep_dims_0"), val = tensor<bool, []>(false)];
1536
+ tensor<int32, [2]> var_2524_axes_0 = const()[name = tensor<string, []>("op_2524_axes_0"), val = tensor<int32, [2]>([1, 2])];
1537
+ tensor<fp16, [1]> anchor = reduce_mean(axes = var_2524_axes_0, keep_dims = var_2522_keep_dims_0, x = x_pre)[name = tensor<string, []>("op_2522_cast_fp16")];
 
1538
  } -> (anchor, x_pre);
1539
  }
ANE-zh/KokoroVocoder.mlpackage/Data/com.apple.CoreML/model.mlmodel CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fb36344f47c7c0da6e39b928edd8e2d0393246d84cf807e5d74855eef37dfebd
3
- size 255855
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2f75fb1b4053a8232ca8b9ff66f03b57e07e3e434ea1379c8a7d3f1a2ed3ffe2
3
+ size 255742
ANE-zh/KokoroVocoder.mlpackage/Manifest.json CHANGED
@@ -1,18 +1,18 @@
1
  {
2
  "fileFormatVersion": "1.0.0",
3
  "itemInfoEntries": {
4
- "43E7FECC-0F8F-4FFD-8BEA-805B89C6839F": {
5
  "author": "com.apple.CoreML",
6
  "description": "CoreML Model Weights",
7
  "name": "weights",
8
  "path": "com.apple.CoreML/weights"
9
  },
10
- "D8E47693-058B-43E2-BD65-9D1DDE555FD0": {
11
  "author": "com.apple.CoreML",
12
  "description": "CoreML Model Specification",
13
  "name": "model.mlmodel",
14
  "path": "com.apple.CoreML/model.mlmodel"
15
  }
16
  },
17
- "rootModelIdentifier": "D8E47693-058B-43E2-BD65-9D1DDE555FD0"
18
  }
 
1
  {
2
  "fileFormatVersion": "1.0.0",
3
  "itemInfoEntries": {
4
+ "4133C074-3053-45F2-AC5B-F5F7E3B18557": {
5
  "author": "com.apple.CoreML",
6
  "description": "CoreML Model Weights",
7
  "name": "weights",
8
  "path": "com.apple.CoreML/weights"
9
  },
10
+ "53B59843-E250-456F-93B0-21CEC56666F1": {
11
  "author": "com.apple.CoreML",
12
  "description": "CoreML Model Specification",
13
  "name": "model.mlmodel",
14
  "path": "com.apple.CoreML/model.mlmodel"
15
  }
16
  },
17
+ "rootModelIdentifier": "53B59843-E250-456F-93B0-21CEC56666F1"
18
  }
ANE/KokoroVocoder.mlmodelc/analytics/coremldata.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8c7c1a25a46ad46b1068905ece8f841c4bd23df23306551bad175d0da28ae74b
3
  size 243
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cc4f1e6436597c6d458a845570d9d0ace458813ff90f225d08e0e713496b463
3
  size 243
ANE/KokoroVocoder.mlmodelc/coremldata.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e73aaf146c7543c0f75f544ac52e3287fa4eaa7e9a04bf3ac6a94d0023f16c00
3
  size 626
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:71bac80d2f2f077fefc0d66cdc39c0faaa96540b3a6149093ef29de01b1f8764
3
  size 626
ANE/KokoroVocoder.mlmodelc/metadata.json CHANGED
@@ -1,147 +1,143 @@
1
  [
2
  {
3
- "metadataOutputVersion" : "3.0",
4
- "storagePrecision" : "Mixed (Float16, Palettized (8 bits))",
5
- "outputSchema" : [
6
  {
7
- "hasShapeFlexibility" : "0",
8
- "isOptional" : "0",
9
- "dataType" : "Float16",
10
- "formattedType" : "MultiArray (Float16 1)",
11
- "shortDescription" : "",
12
- "shape" : "[1]",
13
- "name" : "anchor",
14
- "type" : "MultiArray"
15
  },
16
  {
17
- "hasShapeFlexibility" : "0",
18
- "isOptional" : "0",
19
- "dataType" : "Float16",
20
- "formattedType" : "MultiArray (Float16)",
21
- "shortDescription" : "",
22
- "shape" : "[]",
23
- "name" : "x_pre",
24
- "type" : "MultiArray"
25
  }
26
  ],
27
- "modelParameters" : [
28
-
29
- ],
30
- "specificationVersion" : 8,
31
- "mlProgramOperationTypeHistogram" : {
32
- "Ios17.mul" : 161,
33
- "Ios17.linear" : 46,
34
- "Ios17.cos" : 36,
35
- "Ios16.constexprLutToDense" : 101,
36
- "Ios17.conv" : 54,
37
- "Ios17.leakyRelu" : 13,
38
- "Ios17.concat" : 6,
39
- "Ios17.add" : 193,
40
- "Ios17.convTranspose" : 3,
41
- "Ios17.sliceByIndex" : 2,
42
- "UpsampleNearestNeighbor" : 1,
43
- "Ios16.reduceMean" : 1,
44
- "Ios17.expandDims" : 4,
45
- "Ios17.instanceNorm" : 42,
46
- "Ios17.reshape" : 46,
47
- "Split" : 46,
48
- "Ios17.squeeze" : 1
49
  },
50
- "computePrecision" : "Mixed (Float16, Float32, Int32)",
51
- "isUpdatable" : "0",
52
- "stateSchema" : [
53
-
54
- ],
55
- "availability" : {
56
- "macOS" : "14.0",
57
- "tvOS" : "17.0",
58
- "visionOS" : "1.0",
59
- "watchOS" : "10.0",
60
- "iOS" : "17.0",
61
- "macCatalyst" : "17.0"
62
  },
63
- "modelType" : {
64
- "name" : "MLModelType_mlProgram"
65
  },
66
- "userDefinedMetadata" : {
67
- "com.github.apple.coremltools.conversion_date" : "2026-04-27",
68
- "com.github.apple.coremltools.source" : "torch==2.11.0",
69
- "com.github.apple.coremltools.version" : "9.0",
70
- "com.github.apple.coremltools.source_dialect" : "TorchScript"
71
  },
72
- "inputSchema" : [
73
  {
74
- "dataType" : "Float16",
75
- "hasShapeFlexibility" : "1",
76
- "isOptional" : "0",
77
- "shapeFlexibility" : "1 × 512 × 1...2000",
78
- "shapeRange" : "[[1, 1], [512, 512], [1, 2000]]",
79
- "formattedType" : "MultiArray (Float16 1 × 512 × 120)",
80
- "type" : "MultiArray",
81
- "shape" : "[1, 512, 120]",
82
- "name" : "asr",
83
- "shortDescription" : ""
84
  },
85
  {
86
- "dataType" : "Float16",
87
- "hasShapeFlexibility" : "1",
88
- "isOptional" : "0",
89
- "shapeFlexibility" : "1 × 2...4000",
90
- "shapeRange" : "[[1, 1], [2, 4000]]",
91
- "formattedType" : "MultiArray (Float16 1 × 240)",
92
- "type" : "MultiArray",
93
- "shape" : "[1, 240]",
94
- "name" : "F0_curve",
95
- "shortDescription" : ""
96
  },
97
  {
98
- "dataType" : "Float16",
99
- "hasShapeFlexibility" : "1",
100
- "isOptional" : "0",
101
- "shapeFlexibility" : "1 × 2...4000",
102
- "shapeRange" : "[[1, 1], [2, 4000]]",
103
- "formattedType" : "MultiArray (Float16 1 × 240)",
104
- "type" : "MultiArray",
105
- "shape" : "[1, 240]",
106
- "name" : "N_pred",
107
- "shortDescription" : ""
108
  },
109
  {
110
- "dataType" : "Float16",
111
- "hasShapeFlexibility" : "1",
112
- "isOptional" : "0",
113
- "shapeFlexibility" : "1 × 256 × 1...40000",
114
- "shapeRange" : "[[1, 1], [256, 256], [1, 40000]]",
115
- "formattedType" : "MultiArray (Float16 1 × 256 × 2400)",
116
- "type" : "MultiArray",
117
- "shape" : "[1, 256, 2400]",
118
- "name" : "x_source_0",
119
- "shortDescription" : ""
120
  },
121
  {
122
- "dataType" : "Float16",
123
- "hasShapeFlexibility" : "1",
124
- "isOptional" : "0",
125
- "shapeFlexibility" : "1 × 128 × 1...240001",
126
- "shapeRange" : "[[1, 1], [128, 128], [1, 240001]]",
127
- "formattedType" : "MultiArray (Float16 1 × 128 × 14401)",
128
- "type" : "MultiArray",
129
- "shape" : "[1, 128, 14401]",
130
- "name" : "x_source_1",
131
- "shortDescription" : ""
132
  },
133
  {
134
- "hasShapeFlexibility" : "0",
135
- "isOptional" : "0",
136
- "dataType" : "Float16",
137
- "formattedType" : "MultiArray (Float16 1 × 128)",
138
- "shortDescription" : "",
139
- "shape" : "[1, 128]",
140
- "name" : "style_timbre",
141
- "type" : "MultiArray"
142
  }
143
  ],
144
- "generatedClassName" : "KokoroVocoder",
145
- "method" : "predict"
146
  }
147
  ]
 
1
  [
2
  {
3
+ "metadataOutputVersion": "3.0",
4
+ "storagePrecision": "Mixed (Float16, Palettized (8 bits))",
5
+ "outputSchema": [
6
  {
7
+ "hasShapeFlexibility": "0",
8
+ "isOptional": "0",
9
+ "dataType": "Float16",
10
+ "formattedType": "MultiArray (Float16 1)",
11
+ "shortDescription": "",
12
+ "shape": "[1]",
13
+ "name": "anchor",
14
+ "type": "MultiArray"
15
  },
16
  {
17
+ "hasShapeFlexibility": "0",
18
+ "isOptional": "0",
19
+ "dataType": "Float16",
20
+ "formattedType": "MultiArray (Float16)",
21
+ "shortDescription": "",
22
+ "shape": "[]",
23
+ "name": "x_pre",
24
+ "type": "MultiArray"
25
  }
26
  ],
27
+ "modelParameters": [],
28
+ "specificationVersion": 8,
29
+ "mlProgramOperationTypeHistogram": {
30
+ "Ios17.mul": 161,
31
+ "Ios17.linear": 46,
32
+ "Ios17.cos": 36,
33
+ "Ios16.constexprLutToDense": 101,
34
+ "Ios17.conv": 54,
35
+ "Ios17.leakyRelu": 13,
36
+ "Ios17.concat": 6,
37
+ "Ios17.add": 193,
38
+ "Ios17.convTranspose": 3,
39
+ "Ios17.sliceByIndex": 2,
40
+ "UpsampleNearestNeighbor": 1,
41
+ "Ios16.reduceMean": 1,
42
+ "Ios17.expandDims": 3,
43
+ "Ios17.instanceNorm": 42,
44
+ "Ios17.reshape": 46,
45
+ "Split": 46,
46
+ "Ios17.squeeze": 1
 
 
47
  },
48
+ "computePrecision": "Mixed (Float16, Float32, Int32)",
49
+ "isUpdatable": "0",
50
+ "stateSchema": [],
51
+ "availability": {
52
+ "macOS": "14.0",
53
+ "tvOS": "17.0",
54
+ "visionOS": "1.0",
55
+ "watchOS": "10.0",
56
+ "iOS": "17.0",
57
+ "macCatalyst": "17.0"
 
 
58
  },
59
+ "modelType": {
60
+ "name": "MLModelType_mlProgram"
61
  },
62
+ "userDefinedMetadata": {
63
+ "com.github.apple.coremltools.conversion_date": "2026-04-27",
64
+ "com.github.apple.coremltools.source": "torch==2.11.0",
65
+ "com.github.apple.coremltools.version": "9.0",
66
+ "com.github.apple.coremltools.source_dialect": "TorchScript"
67
  },
68
+ "inputSchema": [
69
  {
70
+ "dataType": "Float16",
71
+ "hasShapeFlexibility": "1",
72
+ "isOptional": "0",
73
+ "shapeFlexibility": "1 \u00d7 512 \u00d7 1...2000",
74
+ "shapeRange": "[[1, 1], [512, 512], [1, 2000]]",
75
+ "formattedType": "MultiArray (Float16 1 \u00d7 512 \u00d7 120)",
76
+ "type": "MultiArray",
77
+ "shape": "[1, 512, 120]",
78
+ "name": "asr",
79
+ "shortDescription": ""
80
  },
81
  {
82
+ "dataType": "Float16",
83
+ "hasShapeFlexibility": "1",
84
+ "isOptional": "0",
85
+ "shapeFlexibility": "1 \u00d7 2...4000",
86
+ "shapeRange": "[[1, 1], [2, 4000]]",
87
+ "formattedType": "MultiArray (Float16 1 \u00d7 240)",
88
+ "type": "MultiArray",
89
+ "shape": "[1, 240]",
90
+ "name": "F0_curve",
91
+ "shortDescription": ""
92
  },
93
  {
94
+ "dataType": "Float16",
95
+ "hasShapeFlexibility": "1",
96
+ "isOptional": "0",
97
+ "shapeFlexibility": "1 \u00d7 2...4000",
98
+ "shapeRange": "[[1, 1], [2, 4000]]",
99
+ "formattedType": "MultiArray (Float16 1 \u00d7 240)",
100
+ "type": "MultiArray",
101
+ "shape": "[1, 240]",
102
+ "name": "N_pred",
103
+ "shortDescription": ""
104
  },
105
  {
106
+ "dataType": "Float16",
107
+ "hasShapeFlexibility": "1",
108
+ "isOptional": "0",
109
+ "shapeFlexibility": "1 \u00d7 256 \u00d7 1...40000",
110
+ "shapeRange": "[[1, 1], [256, 256], [1, 40000]]",
111
+ "formattedType": "MultiArray (Float16 1 \u00d7 256 \u00d7 2400)",
112
+ "type": "MultiArray",
113
+ "shape": "[1, 256, 2400]",
114
+ "name": "x_source_0",
115
+ "shortDescription": ""
116
  },
117
  {
118
+ "dataType": "Float16",
119
+ "hasShapeFlexibility": "1",
120
+ "isOptional": "0",
121
+ "shapeFlexibility": "1 \u00d7 128 \u00d7 1...240001",
122
+ "shapeRange": "[[1, 1], [128, 128], [1, 240001]]",
123
+ "formattedType": "MultiArray (Float16 1 \u00d7 128 \u00d7 14401)",
124
+ "type": "MultiArray",
125
+ "shape": "[1, 128, 14401]",
126
+ "name": "x_source_1",
127
+ "shortDescription": ""
128
  },
129
  {
130
+ "hasShapeFlexibility": "0",
131
+ "isOptional": "0",
132
+ "dataType": "Float16",
133
+ "formattedType": "MultiArray (Float16 1 \u00d7 128)",
134
+ "shortDescription": "",
135
+ "shape": "[1, 128]",
136
+ "name": "style_timbre",
137
+ "type": "MultiArray"
138
  }
139
  ],
140
+ "generatedClassName": "KokoroVocoder",
141
+ "method": "predict"
142
  }
143
  ]
ANE/KokoroVocoder.mlmodelc/model.mil CHANGED
@@ -1,5 +1,5 @@
1
  program(1.0)
2
- [buildInfo = dict<tensor<string, []>, tensor<string, []>>({{"coremlc-component-MIL", "3520.4.1"}, {"coremlc-version", "3520.5.1"}})]
3
  {
4
  func main<ios17>(tensor<fp16, [1, ?]> F0_curve, tensor<fp16, [1, ?]> N_pred, tensor<fp16, [1, 512, ?]> asr, tensor<fp16, [1, 128]> style_timbre, tensor<fp16, [1, 256, ?]> x_source_0, tensor<fp16, [1, 128, ?]> x_source_1) [FlexibleShapeInformation = tuple<tuple<tensor<string, []>, dict<tensor<string, []>, tensor<int32, [?]>>>, tuple<tensor<string, []>, dict<tensor<string, []>, list<tensor<int32, [2]>, ?>>>>((("DefaultShapes", {{"F0_curve", [1, 240]}, {"N_pred", [1, 240]}, {"asr", [1, 512, 120]}, {"x_source_0", [1, 256, 2400]}, {"x_source_1", [1, 128, 14401]}}), ("RangeDims", {{"F0_curve", [[1, 1], [2, 4000]]}, {"N_pred", [[1, 1], [2, 4000]]}, {"asr", [[1, 1], [512, 512], [1, 2000]]}, {"x_source_0", [[1, 1], [256, 256], [1, 40000]]}, {"x_source_1", [[1, 1], [128, 128], [1, 240001]]}})))] {
5
  tensor<int32, [1]> input_1_axes_0 = const()[name = tensor<string, []>("input_1_axes_0"), val = tensor<int32, [1]>([1])];
@@ -1533,8 +1533,7 @@ program(1.0)
1533
  tensor<fp32, []> var_2519 = const()[name = tensor<string, []>("op_2519"), val = tensor<fp32, []>(0x1.47ae14p-7)];
1534
  tensor<fp16, [1, 128, ?]> x_pre = leaky_relu(alpha = var_2519, x = _inversed_input_cast_fp16)[name = tensor<string, []>("x_pre_cast_fp16")];
1535
  tensor<bool, []> var_2522_keep_dims_0 = const()[name = tensor<string, []>("op_2522_keep_dims_0"), val = tensor<bool, []>(false)];
1536
- tensor<fp16, []> var_2522_cast_fp16 = reduce_mean(keep_dims = var_2522_keep_dims_0, x = x_pre)[name = tensor<string, []>("op_2522_cast_fp16")];
1537
- tensor<int32, [1]> var_2524_axes_0 = const()[name = tensor<string, []>("op_2524_axes_0"), val = tensor<int32, [1]>([0])];
1538
- tensor<fp16, [1]> anchor = expand_dims(axes = var_2524_axes_0, x = var_2522_cast_fp16)[name = tensor<string, []>("op_2524_cast_fp16")];
1539
  } -> (anchor, x_pre);
1540
  }
 
1
  program(1.0)
2
+ [buildInfo = dict<tensor<string, []>, tensor<string, []>>({{"coremlc-component-MIL", "3520.4.1"}, {"coremlc-version", "3520.5.1.2"}})]
3
  {
4
  func main<ios17>(tensor<fp16, [1, ?]> F0_curve, tensor<fp16, [1, ?]> N_pred, tensor<fp16, [1, 512, ?]> asr, tensor<fp16, [1, 128]> style_timbre, tensor<fp16, [1, 256, ?]> x_source_0, tensor<fp16, [1, 128, ?]> x_source_1) [FlexibleShapeInformation = tuple<tuple<tensor<string, []>, dict<tensor<string, []>, tensor<int32, [?]>>>, tuple<tensor<string, []>, dict<tensor<string, []>, list<tensor<int32, [2]>, ?>>>>((("DefaultShapes", {{"F0_curve", [1, 240]}, {"N_pred", [1, 240]}, {"asr", [1, 512, 120]}, {"x_source_0", [1, 256, 2400]}, {"x_source_1", [1, 128, 14401]}}), ("RangeDims", {{"F0_curve", [[1, 1], [2, 4000]]}, {"N_pred", [[1, 1], [2, 4000]]}, {"asr", [[1, 1], [512, 512], [1, 2000]]}, {"x_source_0", [[1, 1], [256, 256], [1, 40000]]}, {"x_source_1", [[1, 1], [128, 128], [1, 240001]]}})))] {
5
  tensor<int32, [1]> input_1_axes_0 = const()[name = tensor<string, []>("input_1_axes_0"), val = tensor<int32, [1]>([1])];
 
1533
  tensor<fp32, []> var_2519 = const()[name = tensor<string, []>("op_2519"), val = tensor<fp32, []>(0x1.47ae14p-7)];
1534
  tensor<fp16, [1, 128, ?]> x_pre = leaky_relu(alpha = var_2519, x = _inversed_input_cast_fp16)[name = tensor<string, []>("x_pre_cast_fp16")];
1535
  tensor<bool, []> var_2522_keep_dims_0 = const()[name = tensor<string, []>("op_2522_keep_dims_0"), val = tensor<bool, []>(false)];
1536
+ tensor<int32, [2]> var_2524_axes_0 = const()[name = tensor<string, []>("op_2524_axes_0"), val = tensor<int32, [2]>([1, 2])];
1537
+ tensor<fp16, [1]> anchor = reduce_mean(axes = var_2524_axes_0, keep_dims = var_2522_keep_dims_0, x = x_pre)[name = tensor<string, []>("op_2522_cast_fp16")];
 
1538
  } -> (anchor, x_pre);
1539
  }
ANE/KokoroVocoder.mlpackage/Data/com.apple.CoreML/model.mlmodel CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5435ae53f7d14e998ceca6574fefc934954b2c0460e00a32dbc8179a2c1a50f7
3
- size 255854
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18481f9531abd0d01cf6fe6b8837b98263e8a63d87db56324d49ed57cc5c75fa
3
+ size 255741
ANE/KokoroVocoder.mlpackage/Manifest.json CHANGED
@@ -1,18 +1,18 @@
1
  {
2
  "fileFormatVersion": "1.0.0",
3
  "itemInfoEntries": {
4
- "8B8CAD76-5234-4AC3-9F94-3C90B26C1548": {
5
  "author": "com.apple.CoreML",
6
  "description": "CoreML Model Weights",
7
  "name": "weights",
8
  "path": "com.apple.CoreML/weights"
9
  },
10
- "A680BF92-9E9C-4D0B-AD35-4EDFFEDCBA56": {
11
  "author": "com.apple.CoreML",
12
  "description": "CoreML Model Specification",
13
  "name": "model.mlmodel",
14
  "path": "com.apple.CoreML/model.mlmodel"
15
  }
16
  },
17
- "rootModelIdentifier": "A680BF92-9E9C-4D0B-AD35-4EDFFEDCBA56"
18
  }
 
1
  {
2
  "fileFormatVersion": "1.0.0",
3
  "itemInfoEntries": {
4
+ "511D8B74-593C-4045-BFEF-041A9B672CD4": {
5
  "author": "com.apple.CoreML",
6
  "description": "CoreML Model Weights",
7
  "name": "weights",
8
  "path": "com.apple.CoreML/weights"
9
  },
10
+ "7E37220E-3B3B-46AB-9567-C022BED16A19": {
11
  "author": "com.apple.CoreML",
12
  "description": "CoreML Model Specification",
13
  "name": "model.mlmodel",
14
  "path": "com.apple.CoreML/model.mlmodel"
15
  }
16
  },
17
+ "rootModelIdentifier": "7E37220E-3B3B-46AB-9567-C022BED16A19"
18
  }