InvokeAI/invokeai/backend
Lincoln Stein a3cb5da130
Improve RAM<->VRAM memory copy performance in LoRA patching and elsewhere (#6490)
* allow model patcher to optimize away the unpatching step when feasible

* remove lazy_offloading functionality

* allow model patcher to optimize away the unpatching step when feasible

* remove lazy_offloading functionality

* do not save original weights if there is a CPU copy of state dict

* Update invokeai/backend/model_manager/load/load_base.py

Co-authored-by: Ryan Dick <ryanjdick3@gmail.com>

* documentation fixes requested during penultimate review

* add non-blocking=True parameters to several torch.nn.Module.to() calls, for slight performance increases

* fix ruff errors

* prevent crash on non-cuda-enabled systems

---------

Co-authored-by: Lincoln Stein <lstein@gmail.com>
Co-authored-by: Kent Keirsey <31807370+hipsterusername@users.noreply.github.com>
Co-authored-by: Ryan Dick <ryanjdick3@gmail.com>
2024-06-13 17:10:03 +00: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 feat(mm): rename "blake3" to "blake3_multi" 2024-03-22 08:26:36 +11:00
model_manager Improve RAM<->VRAM memory copy performance in LoRA patching and elsewhere (#6490) 2024-06-13 17:10:03 +00:00
onnx Improve RAM<->VRAM memory copy performance in LoRA patching and elsewhere (#6490) 2024-06-13 17:10:03 +00:00
stable_diffusion cleanup: seamless unused older code cleanup 2024-05-13 08:11:08 +10:00
tiles feat(nodes): extract LATENT_SCALE_FACTOR to constants.py 2024-03-01 10:42:33 +11:00
util fix safe_filename() on windows 2024-04-28 14:42:40 -04:00
__init__.py consolidate model manager parts into a single class 2024-03-01 10:42:33 +11:00
lora.py Improve RAM<->VRAM memory copy performance in LoRA patching and elsewhere (#6490) 2024-06-13 17:10:03 +00:00
model_patcher.py Improve RAM<->VRAM memory copy performance in LoRA patching and elsewhere (#6490) 2024-06-13 17:10:03 +00: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