ModelRegistry
The model catalog and the load doors.
``ModelRegistry.builtin()`` is the one registry. ``list()`` enumerates
every registered family; ``open(source)`` resolves a source to its
family without loading weights; each ``load_<kind>(source, ...)`` loads
a model of that kind, taking a :class:`LoadOptions` or its fields as
keyword arguments.
__init__
__init__(self) -> 'None'
Initialize self. See help(type(self)) for accurate signature.
builtin
builtinThe shared registry.
The shared registry.
kinds
kinds() -> 'list[str]'
The model kinds a load door exists for.
list
list(self) -> 'list[Any]'
Every registered model family (ModelEntry objects).
load_kind
load_kind(self, kind: 'str', source: 'str', options: 'LoadOptions | None' = None, **overrides: 'Any') -> 'Any'
Load a model through the door named kind (one of
ModelRegistry.kinds()).
open
open(self, source: 'str', *, revision: 'str' = 'main', token: 'str | None' = None, cache_dir: 'str | None' = None, offline: 'bool' = False, any_weight_option: 'bool' = False) -> 'Any'
Resolve a source to its identity (family, architecture, model type, variant) without loading weights.