mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
configure_invokeai.py enhancement
- Adds a new option to download <a>ll the models, in addition to <r>ecommended and <c>ustomized.
This commit is contained in:
parent
d7bf3f7d7b
commit
4cfb41d9ae
13
scripts/configure_invokeai.py
Normal file → Executable file
13
scripts/configure_invokeai.py
Normal file → Executable file
@ -108,11 +108,13 @@ completely skip this step.
|
|||||||
completer.complete_extensions(None) # turn off path-completion mode
|
completer.complete_extensions(None) # turn off path-completion mode
|
||||||
selection = None
|
selection = None
|
||||||
while selection is None:
|
while selection is None:
|
||||||
choice = input('Download <r>ecommended models, <c>ustomize the list, or <s>kip this step? [r]: ')
|
choice = input('Download <r>ecommended models, <a>ll models, <c>ustomized list, or <s>kip this step? [r]: ')
|
||||||
if choice.startswith(('r','R')) or len(choice)==0:
|
if choice.startswith(('r','R')) or len(choice)==0:
|
||||||
selection = 'recommended'
|
selection = 'recommended'
|
||||||
elif choice.startswith(('c','C')):
|
elif choice.startswith(('c','C')):
|
||||||
selection = 'customized'
|
selection = 'customized'
|
||||||
|
elif choice.startswith(('a','A')):
|
||||||
|
selection = 'all'
|
||||||
elif choice.startswith(('s','S')):
|
elif choice.startswith(('s','S')):
|
||||||
selection = 'skip'
|
selection = 'skip'
|
||||||
return selection
|
return selection
|
||||||
@ -167,6 +169,13 @@ def recommended_datasets()->dict:
|
|||||||
datasets[ds]=True
|
datasets[ds]=True
|
||||||
return datasets
|
return datasets
|
||||||
|
|
||||||
|
#---------------------------------------------
|
||||||
|
def all_datasets()->dict:
|
||||||
|
datasets = dict()
|
||||||
|
for ds in Datasets.keys():
|
||||||
|
datasets[ds]=True
|
||||||
|
return datasets
|
||||||
|
|
||||||
#-------------------------------Authenticate against Hugging Face
|
#-------------------------------Authenticate against Hugging Face
|
||||||
def authenticate():
|
def authenticate():
|
||||||
print('''
|
print('''
|
||||||
@ -526,6 +535,8 @@ def download_weights(opt:dict):
|
|||||||
|
|
||||||
if choice == 'recommended':
|
if choice == 'recommended':
|
||||||
models = recommended_datasets()
|
models = recommended_datasets()
|
||||||
|
elif choice == 'all':
|
||||||
|
models = all_datasets()
|
||||||
elif choice == 'customized':
|
elif choice == 'customized':
|
||||||
models = select_datasets(choice)
|
models = select_datasets(choice)
|
||||||
if models is None and yes_or_no('Quit?',default_yes=False):
|
if models is None and yes_or_no('Quit?',default_yes=False):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user