Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

1016 B
Raw Blame
"""
Init file for the model loader.
"""

from importlib import import_module
from pathlib import Path

from invokeai.backend.model_manager.load.load_base import (
    LoadedModel,
    LoadedModelWithoutConfig,
    ModelLoaderBase,
    StaleModelConfigError,
)
from invokeai.backend.model_manager.load.load_default import ModelLoader
from invokeai.backend.model_manager.load.model_cache.model_cache import ModelCache
from invokeai.backend.model_manager.load.model_loader_registry import ModelLoaderRegistry, ModelLoaderRegistryBase

# This registers the subclasses that implement loaders of specific model types
loaders = [x.stem for x in Path(Path(__file__).parent, "model_loaders").glob("*.py") if x.stem != "__init__"]
for module in loaders:
    import_module(f"{__package__}.model_loaders.{module}")

__all__ = [
    "LoadedModel",
    "LoadedModelWithoutConfig",
    "ModelCache",
    "ModelLoaderBase",
    "ModelLoader",
    "ModelLoaderRegistryBase",
    "ModelLoaderRegistry",
    "StaleModelConfigError",
]