mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
get Tuple type hint syntax right
This commit is contained in:
parent
5e8e3cf464
commit
b23c9f1da5
@ -67,7 +67,7 @@ class ModelManagerServiceBase(ABC):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def default_model(self) -> Union[Tuple(str, SDModelType),None]:
|
def default_model(self) -> Union[Tuple[str, SDModelType],None]:
|
||||||
"""
|
"""
|
||||||
Returns the name and typeof the default model, or None
|
Returns the name and typeof the default model, or None
|
||||||
if none is defined.
|
if none is defined.
|
||||||
@ -87,7 +87,7 @@ class ModelManagerServiceBase(ABC):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def model_names(self)->List[Tuple(str, SDModelType)]:
|
def model_names(self)->List[Tuple[str, SDModelType]]:
|
||||||
"""
|
"""
|
||||||
Returns a list of all the model names known.
|
Returns a list of all the model names known.
|
||||||
"""
|
"""
|
||||||
@ -352,7 +352,7 @@ class ModelManagerService(ModelManagerServiceBase):
|
|||||||
model_name,
|
model_name,
|
||||||
model_type)
|
model_type)
|
||||||
|
|
||||||
def default_model(self) -> Union[Tuple(str, SDModelType),None]:
|
def default_model(self) -> Union[Tuple[str, SDModelType],None]:
|
||||||
"""
|
"""
|
||||||
Returns the name of the default model, or None
|
Returns the name of the default model, or None
|
||||||
if none is defined.
|
if none is defined.
|
||||||
@ -369,7 +369,7 @@ class ModelManagerService(ModelManagerServiceBase):
|
|||||||
"""
|
"""
|
||||||
return self.mgr.model_info(model_name)
|
return self.mgr.model_info(model_name)
|
||||||
|
|
||||||
def model_names(self)->List[Tuple(str, SDModelType)]:
|
def model_names(self)->List[Tuple[str, SDModelType]]:
|
||||||
"""
|
"""
|
||||||
Returns a list of all the model names known.
|
Returns a list of all the model names known.
|
||||||
"""
|
"""
|
||||||
|
@ -377,7 +377,7 @@ class ModelManager(object):
|
|||||||
_cache = self.cache
|
_cache = self.cache
|
||||||
)
|
)
|
||||||
|
|
||||||
def default_model(self) -> Union[Tuple(str, SDModelType),None]:
|
def default_model(self) -> Union[Tuple[str, SDModelType],None]:
|
||||||
"""
|
"""
|
||||||
Returns the name of the default model, or None
|
Returns the name of the default model, or None
|
||||||
if none is defined.
|
if none is defined.
|
||||||
@ -413,7 +413,7 @@ class ModelManager(object):
|
|||||||
return None
|
return None
|
||||||
return self.config[self.create_key(model_name,model_type)]
|
return self.config[self.create_key(model_name,model_type)]
|
||||||
|
|
||||||
def model_names(self) -> List[Tuple(str, SDModelType)]:
|
def model_names(self) -> List[Tuple[str, SDModelType]]:
|
||||||
"""
|
"""
|
||||||
Return a list of (str, SDModelType) corresponding to all models
|
Return a list of (str, SDModelType) corresponding to all models
|
||||||
known to the configuration.
|
known to the configuration.
|
||||||
|
Loading…
Reference in New Issue
Block a user