mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
(config) move configure_invokeai script to the config module for easier importing
This commit is contained in:
parent
071a438745
commit
88526b9294
@ -210,6 +210,10 @@ class InvokeAiInstance:
|
||||
Configure the InvokeAI runtime directory
|
||||
"""
|
||||
|
||||
from messages import introduction
|
||||
|
||||
introduction()
|
||||
|
||||
from ldm.invoke.config import configure_invokeai
|
||||
|
||||
configure_invokeai.main()
|
||||
|
0
ldm/invoke/config/__init__.py
Normal file
0
ldm/invoke/config/__init__.py
Normal file
@ -66,14 +66,6 @@ Config_preamble = '''# This file describes the alternative machine learning mode
|
||||
# was trained on.
|
||||
'''
|
||||
|
||||
#---------------------------------------------
|
||||
def introduction():
|
||||
print(
|
||||
'''Welcome to InvokeAI. This script will help download the Stable Diffusion weight files
|
||||
and other large models that are needed for text to image generation. At any point you may interrupt
|
||||
this program and resume later.\n'''
|
||||
)
|
||||
|
||||
#--------------------------------------------
|
||||
def postscript(errors: None):
|
||||
if not any(errors):
|
||||
@ -817,8 +809,6 @@ def main():
|
||||
Globals.root = os.path.expanduser(get_root(opt.root) or '')
|
||||
|
||||
try:
|
||||
introduction()
|
||||
|
||||
# We check for to see if the runtime directory is correctly initialized.
|
||||
if Globals.root == '' \
|
||||
or not os.path.exists(os.path.join(Globals.root,'invokeai.init')):
|
||||
|
11
scripts/configure_invokeai.py
Normal file
11
scripts/configure_invokeai.py
Normal file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright (c) 2022 Lincoln D. Stein (https://github.com/lstein)
|
||||
# Before running stable-diffusion on an internet-isolated machine,
|
||||
# run this script from one with internet connectivity. The
|
||||
# two machines must share a common .cache directory.
|
||||
|
||||
import warnings
|
||||
from ldm.invoke.config import configure_invokeai
|
||||
|
||||
if __name__ == '__main__':
|
||||
configure_invokeai.main()
|
Loading…
Reference in New Issue
Block a user