InvokeAI/invokeai/backend/model_manager
Lincoln Stein e93f4d632d
[util] Add generic torch device class (#6174)
* introduce new abstraction layer for GPU devices

* add unit test for device abstraction

* fix ruff

* convert TorchDeviceSelect into a stateless class

* move logic to select context-specific execution device into context API

* add mock hardware environments to pytest

* remove dangling mocker fixture

* fix unit test for running on non-CUDA systems

* remove unimplemented get_execution_device() call

* remove autocast precision

* Multiple changes:

1. Remove TorchDeviceSelect.get_execution_device(), as well as calls to
   context.models.get_execution_device().
2. Rename TorchDeviceSelect to TorchDevice
3. Added back the legacy public API defined in `invocation_api`, including
   choose_precision().
4. Added a config file migration script to accommodate removal of precision=autocast.

* add deprecation warnings to choose_torch_device() and choose_precision()

* fix test crash

* remove app_config argument from choose_torch_device() and choose_torch_dtype()

---------

Co-authored-by: Lincoln Stein <lstein@gmail.com>
2024-04-15 13:12:49 +00:00
..
load [util] Add generic torch device class (#6174) 2024-04-15 13:12:49 +00:00
metadata fix(mm): config.json to indicates diffusers model 2024-03-13 21:02:29 +11:00
util install model if diffusers or single file, cleaned up backend logic to not mess with existing model install 2024-03-13 21:02:29 +11:00
__init__.py [mm] Do not write diffuser model to disk when convert_cache set to zero (#6072) 2024-03-29 16:11:08 -04:00
config.py chore: rename IPAdapterDiffusersConfig to IPAdapterInvokeAIConfig 2024-04-03 12:40:10 +05:30
convert_ckpt_to_diffusers.py feat(mm): use same pattern for vae converter as others 2024-04-01 12:34:49 +11:00
libc_util.py Tidy names and locations of modules 2024-03-01 10:42:33 +11:00
merge.py [util] Add generic torch device class (#6174) 2024-04-15 13:12:49 +00:00
probe.py Update probe to always use cpu for loading models 2024-04-04 07:34:43 +11:00
search.py docs(mm): update ModelSearch 2024-03-28 12:35:41 +11:00
starter_models.py fix(mm): remove proteus model 2024-03-22 02:22:03 -07:00