Lincoln Stein
52274087f3
close #4536
2023-10-12 21:24:07 -04:00
psychedelicious
9646157ad5
fix: fix test imports
2023-10-12 12:15:06 -04:00
Ryan Dick
40f9e49b5e
Demote model cache logs from warning to debug based on the conversation here: https://discord.com/channels/1020123559063990373/1049495067846524939/1161647290189090816
2023-10-11 12:02:46 -04:00
Ryan Dick
61242bf86a
Fix bug in skip_torch_weight_init() where the original behavior of torch.nn.Conv*d modules wasn't being restored correctly.
2023-10-10 10:05:50 -04:00
Ryan Dick
58b56e9b1e
Add a skip_torch_weight_init() context manager to improve model load times (from disk).
2023-10-09 14:12:56 -04:00
Lincoln Stein
fe0cf2c160
remove hardcoded subfolder name from model downloader
2023-10-08 17:45:39 -04:00
Ryan Dick
971ccfb081
Refactor multi-IP-Adapter to clean up the interface around changing scales.
2023-10-06 20:43:43 -04:00
Ryan Dick
43a3c3c7ea
Fix typo in setting IP-Adapter scales.
2023-10-06 20:43:43 -04:00
Ryan Dick
4df1cdb34d
Tidy _prepare_attention_processors(...) logic.
2023-10-06 20:43:43 -04:00
Ryan Dick
d8d0c9af09
Fix handling of scales with multiple IP-Adapters.
2023-10-06 20:43:43 -04:00
Ryan Dick
26b91a538a
Fixes to get IP-Adapter tests working with new multi-IP-Adapter support.
2023-10-06 20:43:43 -04:00
Ryan Dick
7ca456d674
Update IP-Adapter model to enable running multiple IP-Adapters at once. (Not tested yet.)
2023-10-06 20:43:43 -04:00
Ryan Dick
78828b6b9c
WIP - Accept a list of IPAdapterFields in DenoiseLatents.
2023-10-06 20:43:43 -04:00
Ryan Dick
4f97bd4418
Merge branch 'main' into ryan/model-tests
2023-10-06 19:47:28 -04:00
Ryan Dick
e0e001758a
Remove @slow decorator in favor of @pytest.mark.slow.
2023-10-06 18:26:06 -04:00
Ryan Dick
096d195d6e
Merge branch 'main' into ryan/model-cache-logging-only
2023-10-06 09:52:45 -04:00
Ryan Dick
1c8b1fbc53
POC of a test that depends on models.
2023-10-05 15:35:58 -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
fbe6452c45
Add support for IPAdapterPlusXL based on 6219530507
.
2023-10-04 22:35:17 -04: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
psychedelicious
045d3f6139
chore: flake8
2023-09-28 13:49:31 +10:00
Lincoln Stein
f6bbcd0589
remove dangling debug statement
2023-09-27 22:26:26 -04:00
Lincoln Stein
ada22a799e
remove dangling debug statement
2023-09-27 22:26:06 -04:00
Lincoln Stein
034af2d9f8
enable downloading from subfolders for repo_ids
2023-09-27 22:11:56 -04:00
Ryan Dick
0fc14afcf0
Merge branch 'main' into bug/ip-adapter-calc-size
2023-09-27 09:42:51 -04:00
Lincoln Stein
3fd27b1aa9
run correct version of black
2023-09-26 08:03:34 -04:00
Lincoln Stein
d59e534cad
use heuristic to select RAM cache size during headless install; blackified
2023-09-26 08:03:34 -04:00
Ryan Dick
399ebe443e
Fix IP-Adapter calculation of memory footprint.
2023-09-25 18:28:10 -04:00
Lincoln Stein
43ebd68313
Merge branch 'main' into install/install-ip-adapters
2023-09-24 23:19:25 -04:00