Lincoln Stein
84f5cbdd97
make choose_torch_dtype() usable outside an invocation context
2024-04-16 19:19:19 -04:00
Lincoln Stein
edac01d4fb
reverse stupid hack
2024-04-16 18:13:59 -04:00
Lincoln Stein
eaadc55c7d
make pause/resume work in multithreaded environment
2024-04-16 16:55:56 -04:00
Lincoln Stein
89f8326c0b
Merge branch 'lstein/feat/multi-gpu' of github.com:invoke-ai/InvokeAI into lstein/feat/multi-gpu
2024-04-16 16:27:08 -04:00
Lincoln Stein
99558de178
device selection calls go through TorchDevice
2024-04-16 16:26:58 -04:00
Lincoln Stein
77130f108d
Merge branch 'main' into lstein/feat/multi-gpu
2024-04-16 16:14:27 -04:00
Lincoln Stein
371f5bc782
simplify logic for retrieving execution devices
2024-04-16 15:52:03 -04:00
Lincoln Stein
fb9b7fb63a
make object_serializer._new_name() thread-safe; add max_threads config
2024-04-16 15:23:49 -04:00
Lincoln Stein
bd833900a3
add tid to cache name to avoid non-safe uuid4 on windows
2024-04-16 15:02:06 -04:00
blessedcoolant
6bab040d24
Merge branch 'main' into ip-adapter-style-comp
2024-04-16 21:14:06 +05:30
Lincoln Stein
fce6b3e44c
maybe solve race issue
2024-04-16 13:09:26 +10:00
Lincoln Stein
a84f3058e2
revert object_serializer_forward_cache.py
2024-04-15 22:28:48 -04:00
Lincoln Stein
f7436f3bae
fixup config_default; patch TorchDevice to work dynamically
2024-04-15 22:15:50 -04:00
Lincoln Stein
7dd93cb810
fix merge issues; likely nonfunctional
2024-04-15 21:16:21 -04:00
blessedcoolant
b39ce642b6
cleanup: raise ValueErrors when target_blocks dont match base model
2024-04-16 04:12:30 +05:30
Lincoln Stein
e93f4d632d
[util] Add generic torch device class ( #6174 )
...
* introduce new abstraction layer for GPU devices
* add unit test for device abstraction
* fix ruff
* convert TorchDeviceSelect into a stateless class
* move logic to select context-specific execution device into context API
* add mock hardware environments to pytest
* remove dangling mocker fixture
* fix unit test for running on non-CUDA systems
* remove unimplemented get_execution_device() call
* remove autocast precision
* Multiple changes:
1. Remove TorchDeviceSelect.get_execution_device(), as well as calls to
context.models.get_execution_device().
2. Rename TorchDeviceSelect to TorchDevice
3. Added back the legacy public API defined in `invocation_api`, including
choose_precision().
4. Added a config file migration script to accommodate removal of precision=autocast.
* add deprecation warnings to choose_torch_device() and choose_precision()
* fix test crash
* remove app_config argument from choose_torch_device() and choose_torch_dtype()
---------
Co-authored-by: Lincoln Stein <lstein@gmail.com>
2024-04-15 13:12:49 +00:00
blessedcoolant
2d5786d3bb
fix: Incorrect composition blocks for SD1.5
2024-04-13 13:52:10 +05:30
blessedcoolant
27466ffa1a
chore: update the ip adapter node version
2024-04-13 13:39:08 +05:30
blessedcoolant
9fc73743b2
feat: support SD1.5
2024-04-13 12:30:39 +05:30
blessedcoolant
d4393e4170
chore: linter fixes
2024-04-13 12:14:45 +05:30
blessedcoolant
7a67fd6a06
Revert "chore: ruff fixes"
...
This reverts commit af36fe8c1e
.
2024-04-13 12:10:20 +05:30
blessedcoolant
af36fe8c1e
chore: ruff fixes
2024-04-13 12:08:52 +05:30
blessedcoolant
e9f16ac8c7
feat: add UI for IP Adapter Method
2024-04-13 12:06:59 +05:30
blessedcoolant
6ea183f0d4
wip: Initial Implementation IP Adapter Style & Comp Modes
2024-04-13 11:09:45 +05:30
psychedelicious
b18442ded4
fix(queue): poll queue on finished queue item
...
When a queue item is finished (completed, canceled, failed), immediately poll the queue for the next queue item.
Closes #6189
2024-04-12 07:31:47 +10:00
Lincoln Stein
dedf0c6ffa
fix ruff issues
2024-04-12 07:19:16 +10:00
Lincoln Stein
579082ac10
[mm] clear the cache entry for a model that got an OOM during loading
2024-04-12 07:19:16 +10:00
psychedelicious
026d095afe
fix(nodes): do not set seed on output latents from denoise latents
...
`LatentsField` objects have an optional `seed` field. This should only be populated when the latents are noise, generated from a seed.
`DenoiseLatentsInvocation` needs a seed value for scheduler initialization. It's used in a few places, and there is some logic for determining the seed to use with a series of fallbacks:
- Use the seed from the noise (a `LatentsField` object)
- Use the seed from the latents (a `LatentsField` object - normally it won't have a seed)
- Use `0` as a final fallback
In `DenoisLatentsInvocation`, we set the seed in the `LatentsOutput`, even though the output latents are not noise.
This is normally fine, but when we use refiner, we re-use the those same latents for the refiner denoise. This causes that characteristic same-seed-fried look on the refiner pass.
Simple fix - do not set the field in the output latents.
2024-04-11 07:21:50 -04:00
Jonathan
80d631118d
Fix field ordering
...
Changed fields to go in w/h x/y order.
2024-04-09 14:17:55 -05:00
Ryan Dick
0bdbfd4d1d
Add support for IP-Adapter masks.
2024-04-09 15:06:51 -04:00
Ryan Dick
2e27ed5f3d
Pass IP-Adapter scales through the cross_attn_kwargs pathway, since they are the same for all attention layers. This change also helps to prepare for adding IP-Adapter region masks.
2024-04-09 15:06:51 -04:00
Ryan Dick
babdc64b17
(minor) Fix typo in IP-Adapter field description.
2024-04-09 15:06:51 -04:00
Ryan Dick
4a828818da
Remove support for Prompt-to-Prompt cross-attention control (aka .swap()). This feature is not widely used. It does not work with SDXL and is incompatible with IP-Adapter and regional prompting. The implementation is also intertwined with both text embedding and the UNet attention layers, resulting in a high maintenance burden. For all of these reasons, we have decided to drop support.
2024-04-09 10:57:02 -04:00
psychedelicious
fe386252f3
Revert "feat(nodes): add prompt region from image nodes"
...
This reverts commit 3a531c5097
.
2024-04-09 08:12:12 -04:00
Ryan Dick
182810337c
Add utility to_standard_float_mask(...) to convert various mask formats to a standardized format.
2024-04-09 08:12:12 -04:00
Ryan Dick
338bf808d6
Rename MaskField to be a generice TensorField.
2024-04-09 08:12:12 -04:00
Ryan Dick
5b5a4204a1
Fix dimensions of mask produced by ExtractMasksAndPromptsInvocation. Also, added a clearer error message in case the same error is introduced in the future.
2024-04-09 08:12:12 -04:00
psychedelicious
926b8d0efe
feat(nodes): add prompt region from image nodes
2024-04-09 08:12:12 -04:00
Ryan Dick
9d9d1761f3
(minor) The latest ruff version has _slightly_ different formatting preferences.
2024-04-09 08:12:12 -04:00
Ryan Dick
dc64fec771
Add support for lists of prompt embeddings to be passed to the DenoiseLatents invocation, and add handling of the conditioning region masks in DenoiseLatents.
2024-04-09 08:12:12 -04:00
Ryan Dick
d1e45585d0
Add TextConditioningRegions to the TextConditioningData data structure.
2024-04-09 08:12:12 -04:00
Ryan Dick
e354c29b52
Rename ConditioningData -> TextConditioningData.
2024-04-09 08:12:12 -04:00
Ryan Dick
a7f363e654
Split ip_adapter_conditioning out from ConditioningData.
2024-04-09 08:12:12 -04:00
Ryan Dick
9b2162e564
Remove scheduler_args from ConditioningData structure.
2024-04-09 08:12:12 -04:00
Ryan Dick
4e64b26702
Update compel nodes to accept an optional prompt mask.
2024-04-09 08:12:12 -04:00
Ryan Dick
c22d772062
Add RectangleMaskInvocation.
2024-04-09 08:12:12 -04:00
Ryan Dick
d6be7662c9
Add a MaskField primitive, and add a mask to the ConditioningField primitive type.
2024-04-09 08:12:12 -04:00
fieldOfView
dca30d5462
(feat) add a method to get the path of an image from the invocation context
...
Fixes #6175
2024-04-08 18:42:55 +10:00
blessedcoolant
540d506ec9
fix: Incorrect default clip vision opt in the node
2024-04-05 15:06:33 -04:00
Lincoln Stein
812f10730f
adjust free vram calculation for models that will be removed by lazy offloading ( #6150 )
...
Co-authored-by: Lincoln Stein <lstein@gmail.com>
2024-04-04 22:51:12 -04:00