File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
swift/StableDiffusion/pipeline Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ public struct Decoder: ResourceManaging {
64
64
let result = results. features ( at: i)
65
65
let outputName = result. featureNames. first!
66
66
let output = result. featureValue ( for: outputName) !. multiArrayValue!
67
- return try CGImage . fromShapedArray ( MLShapedArray < Float32 > ( output) )
67
+ return try CGImage . fromShapedArray ( MLShapedArray < Float32 > ( converting : output) )
68
68
}
69
69
70
70
return images
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public struct Encoder: ResourceManaging {
63
63
}
64
64
let outputName = result. featureNames. first!
65
65
let outputValue = result. featureValue ( for: outputName) !. multiArrayValue!
66
- let output = MLShapedArray < Float32 > ( outputValue)
66
+ let output = MLShapedArray < Float32 > ( converting : outputValue)
67
67
68
68
// DiagonalGaussianDistribution
69
69
let mean = output [ 0 ] [ 0 ..< 4 ]
You can’t perform that action at this time.
0 commit comments