Split out worker related things to a separate service definition.

This commit is contained in:
alex committed 2023-05-08 22:12:24 -07:00
1 parent ace2c07aa1
commit 2e5a37ea4b
28 files changed
+1271 -359

No files matched your search

@@ -32,15 +32,6 @@ public actor ModelManager {
var results: [SdModelInfo] = []
for simpleInfo in modelInfos.values {
var info = try SdModelInfo(jsonString: simpleInfo.jsonString())
if let maybeLoaded = modelStates[info.name] {
info.isLoaded = await maybeLoaded.isModelLoaded()
if let loadedComputeUnits = await maybeLoaded.loadedModelComputeUnits() {
info.loadedComputeUnits = loadedComputeUnits
}
} else {
info.isLoaded = false
info.loadedComputeUnits = .init()
}
if info.attention == .splitEinSum {
info.supportedComputeUnits = [