From 3490aee2477ed464d2f6145cb5380338744da0b3 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 20 Mar 2024 21:43:13 +1100 Subject: [PATCH] tidy(installer): remove unused messages --- installer/lib/messages.py | 63 +-------------------------------------- 1 file changed, 1 insertion(+), 62 deletions(-) diff --git a/installer/lib/messages.py b/installer/lib/messages.py index 3e25f7bc30..88baa3e067 100644 --- a/installer/lib/messages.py +++ b/installer/lib/messages.py @@ -8,7 +8,7 @@ import platform from enum import Enum from pathlib import Path -from prompt_toolkit import HTML, prompt +from prompt_toolkit import prompt from prompt_toolkit.completion import FuzzyWordCompleter, PathCompleter from prompt_toolkit.validation import Validator from rich import box, print @@ -98,39 +98,6 @@ def choose_version(available_releases: tuple | None = None) -> str: return "stable" if response == "" else response -def user_wants_auto_configuration() -> bool: - """Prompt the user to choose between manual and auto configuration.""" - console.rule("InvokeAI Configuration Section") - console.print( - Panel( - Group( - "\n".join( - [ - "Libraries are installed and InvokeAI will now set up its root directory and configuration. Choose between:", - "", - " * AUTOMATIC configuration: install reasonable defaults and a minimal set of starter models.", - " * MANUAL configuration: manually inspect and adjust configuration options and pick from a larger set of starter models.", - "", - "Later you can fine tune your configuration by selecting option [6] 'Change InvokeAI startup options' from the invoke.bat/invoke.sh launcher script.", - ] - ), - ), - box=box.MINIMAL, - padding=(1, 1), - ) - ) - choice = ( - prompt( - HTML("Choose <a>utomatic or <m>anual configuration [a/m] (a): "), - validator=Validator.from_callable( - lambda n: n == "" or n.startswith(("a", "A", "m", "M")), error_message="Please select 'a' or 'm'" - ), - ) - or "a" - ) - return choice.lower().startswith("a") - - def confirm_install(dest: Path) -> bool: if dest.exists(): print(f":stop_sign: Directory {dest} already exists!") @@ -351,34 +318,6 @@ def windows_long_paths_registry() -> None: ) -def introduction() -> None: - """ - Display a banner when starting configuration of the InvokeAI application - """ - - console.rule() - - console.print( - Panel( - title=":art: Configuring InvokeAI :art:", - renderable=Group( - "", - "[b]This script will:", - "", - "1. Configure the InvokeAI application directory", - "2. Help download the Stable Diffusion weight files", - " and other large models that are needed for text to image generation", - "3. Create initial configuration files.", - "", - "[i]At any point you may interrupt this program and resume later.", - "", - "[b]For the best user experience, please enlarge or maximize this window", - ), - ) - ) - console.line(2) - - def _platform_specific_help() -> Text | None: if OS == "Darwin": text = Text.from_markup(