mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix behavior when models.yaml missing entirely
This commit is contained in:
parent
8f5cded86e
commit
90cb7a6442
@ -92,7 +92,7 @@ def main():
|
||||
max_loaded_models=opt.max_loaded_models,
|
||||
)
|
||||
except (FileNotFoundError, TypeError, AssertionError):
|
||||
emergency_model_reconfigure(opt)
|
||||
emergency_model_reconfigure()
|
||||
sys.exit(-1)
|
||||
except (IOError, KeyError) as e:
|
||||
print(f'{e}. Aborting.')
|
||||
@ -914,11 +914,14 @@ def write_commands(opt, file_path:str, outfilepath:str):
|
||||
|
||||
def emergency_model_reconfigure():
|
||||
print()
|
||||
print('----------------------------------------------------------------------------------')
|
||||
print('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
|
||||
print(' You appear to have a missing or misconfigured model file(s). ')
|
||||
print(' The script will now exit and run configure_invokeai.py to help fix the problem.')
|
||||
print(' After reconfiguration is done, please relaunch invoke.py. ')
|
||||
print('----------------------------------------------------------------------------------')
|
||||
print('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
|
||||
print('configure_invokeai is launching....\n')
|
||||
|
||||
sys.argv = ['configure_invokeai','--interactive']
|
||||
import configure_invokeai
|
||||
configure_invokeai.main()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user