Sort models alphabetically
This commit is contained in:
parent
d5e01c80e3
commit
4b09e7e355
1 changed files with 1 additions and 0 deletions
|
@ -23,6 +23,7 @@ args = parser.parse_args()
|
||||||
loaded_preset = None
|
loaded_preset = None
|
||||||
available_models = sorted(set(map(lambda x : str(x.name).replace('.pt', ''), list(Path('models/').glob('*'))+list(Path('torch-dumps/').glob('*')))))
|
available_models = sorted(set(map(lambda x : str(x.name).replace('.pt', ''), list(Path('models/').glob('*'))+list(Path('torch-dumps/').glob('*')))))
|
||||||
available_models = [item for item in available_models if not item.endswith('.txt')]
|
available_models = [item for item in available_models if not item.endswith('.txt')]
|
||||||
|
available_models = sorted(available_models, key=str.lower)
|
||||||
available_presets = sorted(set(map(lambda x : str(x.name).split('.')[0], list(Path('presets').glob('*.txt')))))
|
available_presets = sorted(set(map(lambda x : str(x.name).split('.')[0], list(Path('presets').glob('*.txt')))))
|
||||||
|
|
||||||
def load_model(model_name):
|
def load_model(model_name):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue