mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
add --no-interactive mode
This commit is contained in:
parent
19b6c671a6
commit
fbfffe028f
@ -7,6 +7,7 @@
|
||||
# Coauthor: Kevin Turner http://github.com/keturn
|
||||
#
|
||||
print('Loading Python libraries...\n')
|
||||
import argparse
|
||||
import clip
|
||||
import sys
|
||||
import transformers
|
||||
@ -17,7 +18,6 @@ import zipfile
|
||||
import traceback
|
||||
import getpass
|
||||
import requests
|
||||
|
||||
from urllib import request
|
||||
from tqdm import tqdm
|
||||
from omegaconf import OmegaConf
|
||||
@ -500,7 +500,16 @@ def download_safety_checker():
|
||||
|
||||
#-------------------------------------
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(description='InvokeAI model downloader')
|
||||
parser.add_argument('--interactive',
|
||||
dest='interactive',
|
||||
action=argparse.BooleanOptionalAction,
|
||||
default=True,
|
||||
help='run in interactive mode (default)')
|
||||
opt = parser.parse_args()
|
||||
|
||||
try:
|
||||
if opt.interactive:
|
||||
introduction()
|
||||
print('** WEIGHT SELECTION **')
|
||||
choice = user_wants_to_download_weights()
|
||||
@ -514,6 +523,7 @@ if __name__ == '__main__':
|
||||
print('\n** DOWNLOADING WEIGHTS **')
|
||||
successfully_downloaded = download_weight_datasets(models, access_token)
|
||||
update_config_file(successfully_downloaded)
|
||||
else:
|
||||
print('\n** DOWNLOADING SUPPORT MODELS **')
|
||||
download_bert()
|
||||
download_kornia()
|
||||
|
Loading…
Reference in New Issue
Block a user