1
0
Fork 0

fix(api): dedupe models after removing extension

This commit is contained in:
Sean Sube 2023-01-16 20:28:29 -06:00
parent 7cd0345cd2
commit c0ca7cf62f
1 changed files with 4 additions and 0 deletions

View File

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