mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
tidy(installer): remove unused messages
This commit is contained in:
parent
f592ad3649
commit
3490aee247
@ -8,7 +8,7 @@ import platform
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
from pathlib import Path
|
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.completion import FuzzyWordCompleter, PathCompleter
|
||||||
from prompt_toolkit.validation import Validator
|
from prompt_toolkit.validation import Validator
|
||||||
from rich import box, print
|
from rich import box, print
|
||||||
@ -98,39 +98,6 @@ def choose_version(available_releases: tuple | None = None) -> str:
|
|||||||
return "stable" if response == "" else response
|
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 <b><a></b>utomatic or <b><m></b>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:
|
def confirm_install(dest: Path) -> bool:
|
||||||
if dest.exists():
|
if dest.exists():
|
||||||
print(f":stop_sign: Directory {dest} already 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:
|
def _platform_specific_help() -> Text | None:
|
||||||
if OS == "Darwin":
|
if OS == "Darwin":
|
||||||
text = Text.from_markup(
|
text = Text.from_markup(
|
||||||
|
Loading…
Reference in New Issue
Block a user