InvokeAI/invokeai/backend
psychedelicious c7562dd6c0
fix(backend): mps should not use non_blocking
We can get black outputs when moving tensors from CPU to MPS. It appears MPS to CPU is fine. See:
- https://github.com/pytorch/pytorch/issues/107455
- https://discuss.pytorch.org/t/should-we-set-non-blocking-to-true/38234/28

Changes:
- Add properties for each device on `TorchDevice` as a convenience.
- Add `get_non_blocking` static method on `TorchDevice`. This utility takes a torch device and returns the flag to be used for non_blocking when moving a tensor to the device provided.
- Update model patching and caching APIs to use this new utility.

Fixes: #6545
2024-06-27 19:15:23 +10:00
..
image_util Merge branch 'main' into lstein/feat/simple-mm2-api 2024-05-17 22:54:03 -04:00
ip_adapter Improve RAM<->VRAM memory copy performance in LoRA patching and elsewhere (#6490) 2024-06-13 17:10:03 +00:00
model_hash Run ruff 2024-06-26 21:46:59 +10:00
model_manager fix(backend): mps should not use non_blocking 2024-06-27 19:15:23 +10:00
onnx Improve RAM<->VRAM memory copy performance in LoRA patching and elsewhere (#6490) 2024-06-13 17:10:03 +00:00
stable_diffusion Fix handling of init_timestep in StableDiffusionGeneratorPipeline and improve its documentation. 2024-06-26 12:51:51 -04:00
tiles feat(nodes): extract LATENT_SCALE_FACTOR to constants.py 2024-03-01 10:42:33 +11:00
util fix(backend): mps should not use non_blocking 2024-06-27 19:15:23 +10:00
__init__.py consolidate model manager parts into a single class 2024-03-01 10:42:33 +11:00
lora.py fix(backend): mps should not use non_blocking 2024-06-27 19:15:23 +10:00
model_patcher.py fix(backend): mps should not use non_blocking 2024-06-27 19:15:23 +10:00
raw_model.py Improve RAM<->VRAM memory copy performance in LoRA patching and elsewhere (#6490) 2024-06-13 17:10:03 +00:00
textual_inversion.py Improve RAM<->VRAM memory copy performance in LoRA patching and elsewhere (#6490) 2024-06-13 17:10:03 +00:00