InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: Crash when everything loaded

Open NaughtDZ opened this issue 3 years ago • 8 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

Windows

GPU

cuda

VRAM

8GB

What happened?

run invoke.bat Everything is fine Load over show"Enjoy fun" And Crashed... So fast i even cant get screenshot...I didnt see any error information...

Screenshots

No response

Additional context

No response

Contact Details

No response

NaughtDZ avatar Dec 15 '22 11:12 NaughtDZ

Do you run invoke.bat by doubleclicking the file? If so, do the other way. In the File Explorer, click the folder name bar twice, type cmd in it and press enter. You will get a more permanent console that will not close when the application ends. In it, type .\invoke.bat and see the results.

Barafu avatar Dec 15 '22 12:12 Barafu

Do you run invoke.bat by doubleclicking the file? If so, do the other way. In the File Explorer, click the folder name bar twice, type cmd in it and press enter. You will get a more permanent console that will not close when the application ends. In it, type .\invoke.bat and see the results.

ah,this it. and it shows: ............ Installing clipseg model for text-based masking......success Installing model for NSFW content detection... AutoFeatureExtractor... StableDiffusionSafetyChecker... ...success

** Model Installation Successful ** You're all set! You may now launch InvokeAI using one of these two commands: Web version: python scripts/invoke.py --web (connect to http://localhost:9090) Command-line version: python scripts/invoke.py

If you installed manually, remember to activate the 'invokeai' environment before running invoke.py. If you installed using the automated installation script, execute "invoke.sh" (Linux/Mac) or "invoke.bat" (Windows) to start InvokeAI.

Have fun!


Therefore, I need to manually start AI with --web in instead of double clicking invoke. bat?

NaughtDZ avatar Dec 15 '22 14:12 NaughtDZ

It seems that somehow your installation was not finished. Does doubliclick work now? Anyway, while you can start everything with python scripts/invoke.py --web, you need to activate the proper environment first. Every time. You don't want to do that, so try staying with invoke.bat

Barafu avatar Dec 15 '22 14:12 Barafu

' python scripts/invoke.py --web ' Is not working , I must run this

cd "I:\SD2.0\invokeai\.venv\Scripts" .\activate python I:\SD2.0\invokeai.venv\Scripts\invoke.py --web (connect to http://localhost:9090)

And it shows

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ I:\SD2.0\invokeai.venv\lib\site-packages\ldm\invoke\CLI.py:91 in main │ │ │ │ 88 │ │ │ 89 │ # creating a Generate object: │ │ 90 │ try: │ │ ❱ 91 │ │ gen = Generate( │ │ 92 │ │ │ conf = opt.conf, │ │ 93 │ │ │ model = opt.model, │ │ 94 │ │ │ sampler_name = opt.sampler_name, │ │ │ │ I:\SD2.0\invokeai.venv\lib\site-packages\ldm\generate.py:159 in init │ │ │ │ 156 │ │ │ weights = None, │ │ 157 │ │ │ config = None, │ │ 158 │ ): │ │ ❱ 159 │ │ mconfig = OmegaConf.load(conf) │ │ 160 │ │ self.height = None │ │ 161 │ │ self.width = None │ │ 162 │ │ self.model_cache = None │ │ │ │ I:\SD2.0\invokeai.venv\lib\site-packages\omegaconf\omegaconf.py:189 in load │ │ │ │ 186 │ │ from .utils import get_yaml_loader │ │ 187 │ │ │ │ 188 │ │ if isinstance(file, (str, pathlib.Path)): │ │ ❱ 189 │ │ │ with io.open(os.path.abspath(file_), "r", encoding="utf-8") as f: │ │ 190 │ │ │ │ obj = yaml.load(f, Loader=get_yaml_loader()) │ │ 191 │ │ elif getattr(file_, "read", None): │ │ 192 │ │ │ obj = yaml.load(file_, Loader=get_yaml_loader()) │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Naught\invokeai\configs\models.yaml'

During handling of the above exception, another exception occurred:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ I:\SD2.0\invokeai.venv\Scripts\invoke.py:4 in │ │ │ │ 1 #!I:\SD2.0\invokeai.venv\Scripts\python.exe │ │ 2 │ │ 3 import ldm.invoke.CLI │ │ ❱ 4 ldm.invoke.CLI.main() │ │ 5 │ │ 6 │ │ │ │ I:\SD2.0\invokeai.venv\lib\site-packages\ldm\invoke\CLI.py:106 in main │ │ │ │ 103 │ │ │ max_loaded_models=opt.max_loaded_models, │ │ 104 │ │ │ ) │ │ 105 │ except (FileNotFoundError, TypeError, AssertionError): │ │ ❱ 106 │ │ emergency_model_reconfigure() │ │ 107 │ │ sys.exit(-1) │ │ 108 │ except (IOError, KeyError) as e: │ │ 109 │ │ print(f'{e}. Aborting.') │ │ │ │ I:\SD2.0\invokeai.venv\lib\site-packages\ldm\invoke\CLI.py:945 in emergency_model_reconfigure │ │ │ │ 942 │ print('configure_invokeai is launching....\n') │ │ 943 │ │ │ 944 │ sys.argv = ['configure_invokeai','--interactive'] │ │ ❱ 945 │ import configure_invokeai │ │ 946 │ configure_invokeai.main() │ │ 947 │ │ 948 │ │ │ │ I:\SD2.0\invokeai.venv\Scripts\configure_invokeai.py:43 in │ │ │ │ 40 Default_config_file = './configs/models.yaml' │ │ 41 SD_Configs = './configs/stable-diffusion' │ │ 42 │ │ ❱ 43 assert os.path.exists(Dataset_path),"The configs directory cannot be found. Please run t │ │ 44 │ │ 45 Datasets = OmegaConf.load(Dataset_path) │ │ 46 completer = generic_completer(['yes','no']) │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ AssertionError: The configs directory cannot be found. Please run this script from within the invokeai runtime directory.


but why? I install it in I:\SD2.0\invokeai\ ,But it still try read "'C:\Users\Naught\invokeai\configs\models.yaml'"?

NaughtDZ avatar Dec 15 '22 14:12 NaughtDZ

I try reinstall it twice,but always have this problem. Redownload all model aroud 10G+ is painful...

NaughtDZ avatar Dec 15 '22 14:12 NaughtDZ

There are two directories. One, where the code is being installed. Mine, for example, is C:\Software\invokeai-man. It contains invoke.bat and the code. However, a modern application should assume that it is not allowed to write into a folder where it was installed into. So, there is a second folder, %USER_PROFILE%\invokeai, where it stores models, configs and produced images.

This is probably the same with all other apps you have installed into Program Files. Did you know that apps may not write into Program Files after installation?

As you say you need to redownload 10G+ every time, I make a guess that you somehow mixed those 2 folders into one? This won't do.

Barafu avatar Dec 15 '22 14:12 Barafu

There are two directories. One, where the code is being installed. Mine, for example, is C:\Software\invokeai-man. It contains invoke.bat and the code. However, a modern application should assume that it is not allowed to write into a folder where it was installed into. So, there is a second folder, %USER_PROFILE%\invokeai, where it stores models, configs and produced images.

This is probably the same with all other apps you have installed into Program Files. Did you know that apps may not write into Program Files after installation?

As you say you need to redownload 10G+ every time, I make a guess that you somehow mixed those 2 folders into one? This won't do.

Can I install all the files to a specified directory? I don't want to continue consuming the capacity of my C drive?

NaughtDZ avatar Dec 15 '22 14:12 NaughtDZ

When I was installing, the script actually asked me where to put the stuff. It only defaults to a user folder, but can be anywhere you can write into. Maybe you were pressing Enter too many times when installing? But don't mix the two folders together.

Lets do once again. [THIS] is the installation instructions. The only prerequisites are Python 3.10 (3.9 will do) and VC redistibutable 2015-2020 . I tested the installer on a clean new machine 3 times just today, it works.

Barafu avatar Dec 15 '22 15:12 Barafu

There has been no activity in this issue for 14 days. If this issue is still being experienced, please reply with an updated confirmation that the issue is still being experienced with the latest release.

github-actions[bot] avatar Mar 14 '23 06:03 github-actions[bot]