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
|
# Coauthor: Kevin Turner http://github.com/keturn
|
||||||
#
|
#
|
||||||
print('Loading Python libraries...\n')
|
print('Loading Python libraries...\n')
|
||||||
|
import argparse
|
||||||
import clip
|
import clip
|
||||||
import sys
|
import sys
|
||||||
import transformers
|
import transformers
|
||||||
@ -17,7 +18,6 @@ import zipfile
|
|||||||
import traceback
|
import traceback
|
||||||
import getpass
|
import getpass
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from urllib import request
|
from urllib import request
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
from omegaconf import OmegaConf
|
from omegaconf import OmegaConf
|
||||||
@ -500,7 +500,16 @@ def download_safety_checker():
|
|||||||
|
|
||||||
#-------------------------------------
|
#-------------------------------------
|
||||||
if __name__ == '__main__':
|
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:
|
try:
|
||||||
|
if opt.interactive:
|
||||||
introduction()
|
introduction()
|
||||||
print('** WEIGHT SELECTION **')
|
print('** WEIGHT SELECTION **')
|
||||||
choice = user_wants_to_download_weights()
|
choice = user_wants_to_download_weights()
|
||||||
@ -514,6 +523,7 @@ if __name__ == '__main__':
|
|||||||
print('\n** DOWNLOADING WEIGHTS **')
|
print('\n** DOWNLOADING WEIGHTS **')
|
||||||
successfully_downloaded = download_weight_datasets(models, access_token)
|
successfully_downloaded = download_weight_datasets(models, access_token)
|
||||||
update_config_file(successfully_downloaded)
|
update_config_file(successfully_downloaded)
|
||||||
|
else:
|
||||||
print('\n** DOWNLOADING SUPPORT MODELS **')
|
print('\n** DOWNLOADING SUPPORT MODELS **')
|
||||||
download_bert()
|
download_bert()
|
||||||
download_kornia()
|
download_kornia()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user