psychedelicious
e822897b1c
feat(nodes): add prototype heuristic image resize node
...
Uses the fancy cnet resize that retains edges.
2024-04-30 08:10:59 -04:00
dunkeroni
f262b9032d
fix: changed validation to not error on connection
2024-04-28 12:48:56 -04:00
dunkeroni
71c3197eab
fix: denoise latents accepts CFG lists as input
2024-04-28 12:48:56 -04:00
psychedelicious
5b8f77f990
tidy(nodes): move cnet mode literals to utils
...
Now they can be used in type signatures without circular imports.
2024-04-25 13:20:09 +10:00
psychedelicious
1bef13db37
feat(nodes): restore unet check on CreateGradientMaskInvocation
...
Special handling for inpainting models
2024-04-23 07:32:53 -04:00
dunkeroni
bc12d6654e
chore: comments and ruff
2024-04-23 07:32:53 -04:00
dunkeroni
6d7c8d5f57
remove unet test
2024-04-23 07:32:53 -04:00
dunkeroni
781de914f4
fix threshhold
2024-04-23 07:32:53 -04:00
dunkeroni
c094bad233
add unet check in gradient mask node
2024-04-23 07:32:53 -04:00
dunkeroni
0063014f2b
gradient mask node test for inpaint
2024-04-23 07:32:53 -04:00
psychedelicious
a00e703144
feat(nodes): image mask to tensor invocation
...
Thanks @JPPhoto!
2024-04-20 11:32:08 -04:00
psychedelicious
ea527f5fe1
feat(nodes): add beta classification to mask tensor nodes
2024-04-19 09:32:56 -04:00
psychedelicious
aace364677
feat(nodes): add InvertTensorMaskInvocation
2024-04-19 09:32:56 -04:00
psychedelicious
602a59066e
fix(nodes): handle invert in alpha_mask_to_tensor
2024-04-19 09:32:56 -04:00
psychedelicious
8911017bd1
feat(ui): selectable & draggable layers
2024-04-19 09:32:56 -04:00
psychedelicious
fc26f3e430
feat(nodes): add alpha mask to tensor invocation
2024-04-19 09:32:56 -04:00
blessedcoolant
6bab040d24
Merge branch 'main' into ip-adapter-style-comp
2024-04-16 21:14:06 +05:30
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
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
blessedcoolant
540d506ec9
fix: Incorrect default clip vision opt in the node
2024-04-05 15:06:33 -04:00