init static method

void init()

Implementation

static void init() {
  if (PytorchFfi.initiated) {
    return;
  }
  print("PytorchFfi initialization");
  PytorchFfi.initiated = true;
  PytorchFfi.loadModelManager =
      IsolateManager.create(_loadModel, concurrent: 2, isDebug: false);
  PytorchFfi.imageModelInferenceManager = IsolateManager.create(
      _imageModelInference,
      concurrent: 2,
      isDebug: false);
}