InvokeAI/invokeai/app
psychedelicious 8c15d14099 fix: use locale encoding
We have had a few bugs with v4 related to file encodings, especially on Windows.

Windows uses its own character encodings instead of `utf-8`, often `cp1252`. Some characters cannot be decoded using `utf-8`, causing `UnicodeDecodeError`.

There are a couple places where this can cause problems:
- In the installer bootstrap, we install or upgrade `pip` and decode the result, using `subprocess`.

  The input to this includes the user's home dir. In #6105, the user had one of the problematic characters in their username. `subprocess` attempts and fails to decode the username, which crashes the installer.

  To fix this, we need to use `locale.getpreferredencoding()` when executing the command.
- Similarly, in the model install service and config class, we attempt to load a yaml config file. If a problematic character is in the path to the file (which often includes the user's home dir), we can get the same error.

  One example is  #6129 in which the models.yaml migration fails.

  To fix this, we need to open the file with `locale.getpreferredencoding()`.
2024-04-04 15:30:47 +11:00
..
api feat(mm): more reliable mm scan folder 2024-04-04 07:58:11 +11:00
assets/images tweaks in response to psychedelicious review of PR 2023-07-26 15:27:04 +10:00
invocations fix: clip vision model auto param 2024-04-03 12:40:11 +05:30
services fix: use locale encoding 2024-04-04 15:30:47 +11:00
shared tidy(nodes): move all field things to fields.py 2024-03-01 10:42:33 +11:00
util feat(mm): move HF token helper to route 2024-03-20 15:05:25 +11:00
__init__.py fix: make invocation_context.py accessible to mkdocs 2024-03-01 10:42:33 +11:00
api_app.py Check for cuDNN version compatibility issues on startup. Prior to this check, the app would silently run with ~50% performance degradation caused by a cuDNN version mismatch. 2024-03-28 07:32:06 +11:00
run_app.py feat: single app entrypoint with CLI arg parsing 2024-03-19 09:24:28 +11:00