MCPcopy Index your code
hub / github.com/mudler/LocalAI / build_engine

Function build_engine

backend/python/insightface/engines.py:566–573  ·  view source on GitHub ↗

Factory for the engine selected by LoadModel options.

(name: str)

Source from the content-addressed store, hash-verified

564
565
566def build_engine(name: str) -> FaceEngine:
567 """Factory for the engine selected by LoadModel options."""
568 key = name.strip().lower()
569 if key in ("", "insightface"):
570 return InsightFaceEngine()
571 if key in ("onnx_direct", "onnx-direct", "opencv"):
572 return OnnxDirectEngine()
573 raise ValueError(f"unknown engine: {name!r}")

Callers 1

LoadModelMethod · 0.90

Calls 2

InsightFaceEngineClass · 0.85
OnnxDirectEngineClass · 0.70

Tested by

no test coverage detected