[mob][photos] Fix in isolate message

This commit is contained in:
laurenspriem
2024-07-26 17:39:34 +02:00
parent e205b07e60
commit 3cc05d5c42
2 changed files with 4 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ enum MLComputerOperation {
}
class MLComputer {
final _logger = Logger('MLComputerIsolate');
final _logger = Logger('MLComputer');
final _initLock = Lock();
final _functionLock = Lock();
@@ -99,7 +99,7 @@ class MLComputer {
break;
case MLComputerOperation.runClipText:
final textEmbedding = await ClipTextEncoder.predict(args);
sendPort.send(List.from(textEmbedding, growable: false));
sendPort.send(List<double>.from(textEmbedding, growable: false));
break;
}
} catch (e, stackTrace) {
@@ -158,8 +158,8 @@ class MLComputer {
}
Future<List<double>> runClipText(String query) async {
await _ensureLoadedClipTextModel();
try {
await _ensureLoadedClipTextModel();
final int clipAddress = ClipTextEncoder.instance.sessionAddress;
final textEmbedding = await _runInIsolate(
(

View File

@@ -99,7 +99,7 @@ class MLIndexingIsolate {
);
addresses.add(address);
}
sendPort.send(List.from(addresses, growable: false));
sendPort.send(List<int>.from(addresses, growable: false));
break;
case MLIndexingOperation.releaseModels:
final modelNames = args['modelNames'] as List<String>;