Ryan Dick
096d195d6e
Merge branch 'main' into ryan/model-cache-logging-only
2023-10-06 09:52:45 -04:00
Ryan Dick
78377469db
Add support for T2I-Adapter in node workflows ( #4612 )
...
* Bump diffusers to 0.21.2.
* Add T2IAdapterInvocation boilerplate.
* Add T2I-Adapter model to model-management.
* (minor) Tidy prepare_control_image(...).
* Add logic to run the T2I-Adapter models at the start of the DenoiseLatentsInvocation.
* Add logic for applying T2I-Adapter weights and accumulating.
* Add T2IAdapter to MODEL_CLASSES map.
* yarn typegen
* Add model probes for T2I-Adapter models.
* Add all of the frontend boilerplate required to use T2I-Adapter in the nodes editor.
* Add T2IAdapterModel.convert_if_required(...).
* Fix errors in T2I-Adapter input image sizing logic.
* Fix bug with handling of multiple T2I-Adapters.
* black / flake8
* Fix typo
* yarn build
* Add num_channels param to prepare_control_image(...).
* Link to upstream diffusers bugfix PR that currently requires a workaround.
* feat: Add Color Map Preprocessor
Needed for the color T2I Adapter
* feat: Add Color Map Preprocessor to Linear UI
* Revert "feat: Add Color Map Preprocessor"
This reverts commit a1119a00bf
.
* Revert "feat: Add Color Map Preprocessor to Linear UI"
This reverts commit bd8a9b82d8
.
* Fix T2I-Adapter field rendering in workflow editor.
* yarn build, yarn typegen
---------
Co-authored-by: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com>
Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
2023-10-05 16:29:16 +11:00
Ryan Dick
2479a59e5e
Re-enable garbage collection in model cache MemorySnapshots.
2023-10-03 15:18:47 -04:00
Ryan Dick
7d0ac2c36d
(minor) clean up typos.
2023-10-03 15:00:03 -04:00
Ryan Dick
519b892f0c
Add unit test for Struct_mallinfo2.__str__()
2023-10-03 14:25:34 -04:00
Ryan Dick
763dcacfd3
Add unit test for get_pretty_snapshot_diff(...).
2023-10-03 14:25:34 -04:00
Ryan Dick
22a84930f6
Disable garbage collection in ModelCache calls to MemorySnapshot in order minimize snapshot overhead.
2023-10-03 14:25:34 -04:00
Ryan Dick
d64e17e043
Add README with info about glib memory fragmentation caused by the model cache.
2023-10-03 14:25:34 -04:00
Ryan Dick
ba54277011
Catch a more specific exception in environments that do not have a libc shared library.
2023-10-03 14:25:34 -04:00
Ryan Dick
5915a4a51c
Minor fixes.
2023-10-03 14:25:34 -04:00
Ryan Dick
4580ba0d87
Remove logic to update model cache size estimates dynamically.
2023-10-03 14:25:34 -04:00
Ryan Dick
b9fd2e9e76
Improve get_pretty_snapshot_diff(...) message formatting.
2023-10-03 14:25:34 -04:00
Ryan Dick
75b65597af
Add malloc info to MemorySnapshot.
2023-10-03 14:25:34 -04:00
Ryan Dick
2a3c0ab5d2
Move MemorySnapshot to its own file.
2023-10-03 14:25:34 -04:00
Ryan Dick
7d61373b82
Add LibcUtil class.
2023-10-03 14:25:34 -04:00
Ryan Dick
7d65555a5a
Fix type error in torch device comparison.
2023-10-03 14:25:34 -04:00
Ryan Dick
123f2b2dbc
Update cache model size estimates based on changes in VRAM when moving models to/from CUDA.
2023-10-03 14:25:34 -04:00
Ryan Dick
1e4e42556e
Update model cache device comparison to treat 'cuda' and 'cuda:0' as the same device type.
2023-10-03 14:25:34 -04:00
Ryan Dick
1f6699ac43
Consolidate all model.to(...) calls in the model cache to use a utility function with better logging.
2023-10-03 14:25:34 -04:00
Ryan Dick
ace8665411
Add warning log if moving a model from cuda to cpu causes unexpected change in VRAM usage.
2023-10-03 14:25:34 -04:00
Ryan Dick
7fa5bae8fd
Add warning log if moving model from RAM to VRAM causes an unexpected change in VRAM usage.
2023-10-03 14:25:34 -04:00
Ryan Dick
f9faca7c91
Add warning log if model mis-reports its required cache memory before load from disk.
2023-10-03 14:25:34 -04:00
Ryan Dick
594fd3ba6d
Add debug logging of changes in RAM and VRAM for all model cache operations.
2023-10-03 14:25:34 -04:00
Ryan Dick
44d68f5ed5
Auto-format model_cache.py.
2023-10-03 14:25:34 -04:00
Ryan Dick
399ebe443e
Fix IP-Adapter calculation of memory footprint.
2023-09-25 18:28:10 -04:00
Lincoln Stein
a1d9e6b871
Merge branch 'main' into bugfix/probe_ip_adapter
2023-09-24 15:39:43 -04:00
Lincoln Stein
e34e6d6e80
enable v_prediction for sd-1 models
2023-09-24 12:22:29 -04:00
Lincoln Stein
86cb53342a
fix probing for ip_adapter folders
2023-09-23 22:32:03 -04:00
Lincoln Stein
25a71a1791
Merge branch 'main' into refactor/rename-get-logger
2023-09-23 14:49:07 -07:00
Kevin Turner
e487bcd0f7
feat(model management): guess whether a VAE is for SDXL based on its name
2023-09-20 12:07:12 -07:00
Kevin Turner
e0f8274f49
feat(model management): guess whether a VAE is for SDXL based on its name
2023-09-20 12:06:55 -07:00
Kevin Turner
f222b871e9
Merge remote-tracking branch 'origin/main' into feat/taesd
...
# Conflicts:
# invokeai/backend/model_management/model_probe.py
2023-09-20 10:46:55 -07:00
Ryan Dick
343df03a92
isort
2023-09-15 13:18:00 -04:00
Ryan Dick
b57acb7353
Merge branch 'main' into feat/ip-adapter
2023-09-15 13:15:25 -04:00
Kent Keirsey
afe9756667
Merge branch 'main' into feat/taesd
2023-09-15 12:19:19 -04:00
Ryan Dick
16664da5b6
black
2023-09-14 23:49:02 -04:00
Ryan Dick
990ce9a1da
Lookup IP-Adapter linked image encoder from disk instead of storing in model config metadata.
2023-09-14 23:06:57 -04:00
Ryan Dick
c2f074dc2f
Fix python static checks.
2023-09-14 16:48:47 -04:00
Ryan Dick
94c186bb4c
Fix bug in IPAdapter.to(...).
2023-09-14 15:45:25 -04:00
Ryan Dick
a22c8cb3a1
Improve robustness of check for IPAdapter vs IPAdapterPlus.
2023-09-14 15:25:41 -04:00
Ryan Dick
388554448a
Add CLIP Vision model to IP-Adapter info and use this to infer which model to use.
2023-09-14 11:57:53 -04:00
Ryan Dick
d5160648d0
Add support for downloading IP-Adapter models from HF.
2023-09-14 11:18:43 -04:00
Ryan Dick
6d0ea42a94
Get CLIPVision model download from HF working.
2023-09-14 09:54:10 -04:00
Ryan Dick
2c1100509f
Add BaseModelType.Any to be used by CLIPVisionModel.
2023-09-14 08:19:55 -04:00
Ryan Dick
77d135967f
Update IPAdapterModel to respect requested torch_dtype.
2023-09-13 21:06:42 -04:00
Ryan Dick
ebf26687cb
(minor) Remove unnecessary TODO.
2023-09-13 21:03:42 -04:00
Ryan
2f5e923008
Removed duplicate import in model_cache.py
2023-09-13 19:33:43 -04:00
Ryan
b7296000e4
made MPS calls conditional on MPS actually being the chosen device with backend available
2023-09-13 19:33:43 -04:00
Ryan
fab055995e
Add empty_cache() for MPS hardware.
2023-09-13 19:33:43 -04:00
Ryan Dick
1c8991a3df
Use CLIPVisionModel under model management for IP-Adapter.
2023-09-13 19:10:02 -04:00