mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
c7562dd6c0
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 |
||
---|---|---|
.. | ||
__init__.py | ||
attention.py | ||
catch_sigint.py | ||
db_maintenance.py | ||
devices.py | ||
hotfixes.py | ||
logging.py | ||
mask.py | ||
mps_fixes.py | ||
silence_warnings.py | ||
test_utils.py | ||
util.py |