From adb85036e611fc2e1cacdcf0b8ab32ba42e96e20 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Sun, 30 Jul 2023 10:17:04 -0400 Subject: [PATCH] dependency tweaks to avoid installing/uninstalling pkgs --- installer/lib/installer.py | 5 ++++- invokeai/frontend/install/model_install.py | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/installer/lib/installer.py b/installer/lib/installer.py index e0a72b34aa..551ab72aa6 100644 --- a/installer/lib/installer.py +++ b/installer/lib/installer.py @@ -13,7 +13,7 @@ from pathlib import Path from tempfile import TemporaryDirectory from typing import Union -SUPPORTED_PYTHON = ">=3.9.0,<3.11" +SUPPORTED_PYTHON = ">=3.9.0,<=3.11.100" INSTALLER_REQS = ["rich", "semver", "requests", "plumbum", "prompt-toolkit"] BOOTSTRAP_VENV_PREFIX = "invokeai-installer-tmp" @@ -249,6 +249,9 @@ class InvokeAiInstance: pip[ "install", "--require-virtualenv", + "numpy~=1.24.0", # choose versions that won't be uninstalled during phase 2 + "urllib3~=1.26.0", + "requests~=2.28.0", "torch~=2.0.0", "torchmetrics==0.11.4", "torchvision>=0.14.1", diff --git a/invokeai/frontend/install/model_install.py b/invokeai/frontend/install/model_install.py index 0f2bc304fe..f552ac9077 100644 --- a/invokeai/frontend/install/model_install.py +++ b/invokeai/frontend/install/model_install.py @@ -256,6 +256,7 @@ class addModelsForm(CyclingForm, npyscreen.FormMultiPage): model_labels = [self.model_labels[x] for x in model_list] show_recommended = len(self.installed_models) == 0 + truncated = False if len(model_list) > 0: max_width = max([len(x) for x in model_labels]) columns = window_width // (max_width + 8) # 8 characters for "[x] " and padding @@ -274,10 +275,9 @@ class addModelsForm(CyclingForm, npyscreen.FormMultiPage): ) ) - truncation = False if len(model_labels) > MAX_OTHER_MODELS: model_labels = model_labels[0:MAX_OTHER_MODELS] - truncation = True + truncated = True widgets.update( models_selected=self.add_widget_intelligent( @@ -297,7 +297,7 @@ class addModelsForm(CyclingForm, npyscreen.FormMultiPage): models=model_list, ) - if truncation: + if truncated: widgets.update( warning_message=self.add_widget_intelligent( npyscreen.FixedText,