1
0
Fork 0

fix(api): sort models without discarding

This commit is contained in:
Sean Sube 2023-01-16 20:58:08 -06:00
parent 353a65513f
commit b09feda474
1 changed files with 6 additions and 3 deletions

View File

@ -218,15 +218,18 @@ def load_models(context: ServerContext):
path.join(context.model_path, 'diffusion-*'))]
diffusion_models.extend([
get_model_name(f) for f in glob(path.join(context.model_path, 'stable-diffusion-*'))])
diffusion_models = list(set(diffusion_models)).sort()
diffusion_models = list(set(diffusion_models))
diffusion_models.sort()
correction_models = [
get_model_name(f) for f in glob(path.join(context.model_path, 'correction-*'))]
correction_models = list(set(correction_models)).sort()
correction_models = list(set(correction_models))
correction_models.sort()
upscaling_models = [
get_model_name(f) for f in glob(path.join(context.model_path, 'upscaling-*'))]
upscaling_models = list(set(upscaling_models)).sort()
upscaling_models = list(set(upscaling_models))
upscaling_models.sort()
def load_params(context: ServerContext):