mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-03 16:35:03 -05:00
- ModelMetadataStoreService is now injected into ModelRecordStoreService (these two services are really joined at the hip, and should someday be merged) - ModelRecordStoreService is now injected into ModelManagerService - Reduced timeout value for the various installer and download wait*() methods - Introduced a Mock modelmanager for testing - Removed bare print() statement with _logger in the install helper backend. - Removed unused code from model loader init file - Made `locker` a private variable in the `LoadedModel` object. - Fixed up model merge frontend (will be deprecated anyway!)
50 lines
1.3 KiB
Python
50 lines
1.3 KiB
Python
"""
|
|
Initialization file for invokeai.backend.model_manager.metadata
|
|
|
|
Usage:
|
|
|
|
from invokeai.backend.model_manager.metadata import(
|
|
AnyModelRepoMetadata,
|
|
CommercialUsage,
|
|
LicenseRestrictions,
|
|
HuggingFaceMetadata,
|
|
CivitaiMetadata,
|
|
)
|
|
|
|
from invokeai.backend.model_manager.metadata.fetch import CivitaiMetadataFetch
|
|
|
|
data = CivitaiMetadataFetch().from_url("https://civitai.com/models/206883/split")
|
|
assert isinstance(data, CivitaiMetadata)
|
|
if data.allow_commercial_use:
|
|
print("Commercial use of this model is allowed")
|
|
"""
|
|
from .fetch import CivitaiMetadataFetch, HuggingFaceMetadataFetch, ModelMetadataFetchBase
|
|
from .metadata_base import (
|
|
AnyModelRepoMetadata,
|
|
AnyModelRepoMetadataValidator,
|
|
BaseMetadata,
|
|
CivitaiMetadata,
|
|
CommercialUsage,
|
|
HuggingFaceMetadata,
|
|
LicenseRestrictions,
|
|
ModelMetadataWithFiles,
|
|
RemoteModelFile,
|
|
UnknownMetadataException,
|
|
)
|
|
|
|
__all__ = [
|
|
"AnyModelRepoMetadata",
|
|
"AnyModelRepoMetadataValidator",
|
|
"CivitaiMetadata",
|
|
"CivitaiMetadataFetch",
|
|
"CommercialUsage",
|
|
"HuggingFaceMetadata",
|
|
"HuggingFaceMetadataFetch",
|
|
"LicenseRestrictions",
|
|
"ModelMetadataFetchBase",
|
|
"BaseMetadata",
|
|
"ModelMetadataWithFiles",
|
|
"RemoteModelFile",
|
|
"UnknownMetadataException",
|
|
]
|