From d4ed64df7d76d6db4dc2bfc01e3859bfd5263285 Mon Sep 17 00:00:00 2001 From: Eugene Brodsky Date: Thu, 25 Jan 2024 01:24:33 -0500 Subject: [PATCH] feat: add force-reinstall option to the updater --- invokeai/frontend/install/invokeai_update.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/invokeai/frontend/install/invokeai_update.py b/invokeai/frontend/install/invokeai_update.py index 663969624d..06c3520a89 100644 --- a/invokeai/frontend/install/invokeai_update.py +++ b/invokeai/frontend/install/invokeai_update.py @@ -182,9 +182,19 @@ def main(): print(f":exclamation: [bold red]'{release}' is not a recognized InvokeAI release.[/red bold]") extras = get_extras() + + console.line() + force_reinstall = Confirm.ask( + "[bold]Force reinstallation of all dependencies?[/] This [i]may[/] help fix a broken upgrade, but is usually not necessary.", + default=False, + ) + + console.line() flags = [] if (index_url := get_torch_extra_index_url()) is not None: flags.append(f"--extra-index-url {index_url}") + if force_reinstall: + flags.append("--force-reinstall") flags = " ".join(flags) print(f":crossed_fingers: Upgrading to [yellow]{release}[/yellow]")