mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix the merge script to correctly display models sorted by base
This commit is contained in:
parent
8e948d3f17
commit
c14aa30956
@ -131,6 +131,7 @@ class mergeModelsForm(npyscreen.FormMultiPageAction):
|
||||
values=[
|
||||
"Models Built on SD-1.x",
|
||||
"Models Built on SD-2.x",
|
||||
"Models Built on SDXL",
|
||||
],
|
||||
value=[self.current_base],
|
||||
columns=4,
|
||||
@ -309,7 +310,7 @@ class mergeModelsForm(npyscreen.FormMultiPageAction):
|
||||
else:
|
||||
return True
|
||||
|
||||
def get_model_names(self, base_model: Optional[BaseModelType] = None) -> List[str]:
|
||||
def get_model_names(self, base_model: BaseModelType = BaseModelType.StableDiffusion1) -> List[str]:
|
||||
model_names = [
|
||||
info["model_name"]
|
||||
for info in self.model_manager.list_models(model_type=ModelType.Main, base_model=base_model)
|
||||
@ -318,7 +319,8 @@ class mergeModelsForm(npyscreen.FormMultiPageAction):
|
||||
return sorted(model_names)
|
||||
|
||||
def _populate_models(self, value=None):
|
||||
base_model = tuple(BaseModelType)[value[0]]
|
||||
bases = ["sd-1", "sd-2", "sdxl"]
|
||||
base_model = BaseModelType(bases[value[0]])
|
||||
self.model_names = self.get_model_names(base_model)
|
||||
|
||||
models_plus_none = self.model_names.copy()
|
||||
|
Loading…
Reference in New Issue
Block a user