|
8 | 8 | from enum import Enum |
9 | 9 | from pathlib import Path |
10 | 10 |
|
11 | | -from prompt_toolkit import HTML, prompt |
| 11 | +from prompt_toolkit import prompt |
12 | 12 | from prompt_toolkit.completion import FuzzyWordCompleter, PathCompleter |
13 | 13 | from prompt_toolkit.validation import Validator |
14 | 14 | from rich import box, print |
@@ -98,39 +98,6 @@ def choose_version(available_releases: tuple | None = None) -> str: |
98 | 98 | return "stable" if response == "" else response |
99 | 99 |
|
100 | 100 |
|
101 | | -def user_wants_auto_configuration() -> bool: |
102 | | - """Prompt the user to choose between manual and auto configuration.""" |
103 | | - console.rule("InvokeAI Configuration Section") |
104 | | - console.print( |
105 | | - Panel( |
106 | | - Group( |
107 | | - "\n".join( |
108 | | - [ |
109 | | - "Libraries are installed and InvokeAI will now set up its root directory and configuration. Choose between:", |
110 | | - "", |
111 | | - " * AUTOMATIC configuration: install reasonable defaults and a minimal set of starter models.", |
112 | | - " * MANUAL configuration: manually inspect and adjust configuration options and pick from a larger set of starter models.", |
113 | | - "", |
114 | | - "Later you can fine tune your configuration by selecting option [6] 'Change InvokeAI startup options' from the invoke.bat/invoke.sh launcher script.", |
115 | | - ] |
116 | | - ), |
117 | | - ), |
118 | | - box=box.MINIMAL, |
119 | | - padding=(1, 1), |
120 | | - ) |
121 | | - ) |
122 | | - choice = ( |
123 | | - prompt( |
124 | | - HTML("Choose <b><a></b>utomatic or <b><m></b>anual configuration [a/m] (a): "), |
125 | | - validator=Validator.from_callable( |
126 | | - lambda n: n == "" or n.startswith(("a", "A", "m", "M")), error_message="Please select 'a' or 'm'" |
127 | | - ), |
128 | | - ) |
129 | | - or "a" |
130 | | - ) |
131 | | - return choice.lower().startswith("a") |
132 | | - |
133 | | - |
134 | 101 | def confirm_install(dest: Path) -> bool: |
135 | 102 | if dest.exists(): |
136 | 103 | print(f":stop_sign: Directory {dest} already exists!") |
@@ -351,34 +318,6 @@ def windows_long_paths_registry() -> None: |
351 | 318 | ) |
352 | 319 |
|
353 | 320 |
|
354 | | -def introduction() -> None: |
355 | | - """ |
356 | | - Display a banner when starting configuration of the InvokeAI application |
357 | | - """ |
358 | | - |
359 | | - console.rule() |
360 | | - |
361 | | - console.print( |
362 | | - Panel( |
363 | | - title=":art: Configuring InvokeAI :art:", |
364 | | - renderable=Group( |
365 | | - "", |
366 | | - "[b]This script will:", |
367 | | - "", |
368 | | - "1. Configure the InvokeAI application directory", |
369 | | - "2. Help download the Stable Diffusion weight files", |
370 | | - " and other large models that are needed for text to image generation", |
371 | | - "3. Create initial configuration files.", |
372 | | - "", |
373 | | - "[i]At any point you may interrupt this program and resume later.", |
374 | | - "", |
375 | | - "[b]For the best user experience, please enlarge or maximize this window", |
376 | | - ), |
377 | | - ) |
378 | | - ) |
379 | | - console.line(2) |
380 | | - |
381 | | - |
382 | 321 | def _platform_specific_help() -> Text | None: |
383 | 322 | if OS == "Darwin": |
384 | 323 | text = Text.from_markup( |
|
0 commit comments