Eugene Brodsky
4036244ee9
(app) clarify log message when migrating old .cache
2024-12-04 17:02:08 +00:00
Eugene Brodsky
d06232d9ba
(config) ensure legacy model configs and node template are writable by the user even if the source files are read-only
2024-12-04 17:02:08 +00:00
psychedelicious
3305bad0c2
fix(app): queue item id check before setting cancel flag should use !=
instead of is not
...
The `is` operator compares references, not values. Thanks to a wonderfully unintuitive quirk of python, `is` works on integers from `-5` to `256`, inclusive.
Whenever integers in this range are used for a value, internally python returns a reference to a stable object in memory. When integers outside this range are used as a value, python creates a new object in memory for that integer.
See `PyLong_FromLong` documentation here: https://docs.python.org/3/c-api/long.html
Tying this back to our session processor, we were using `is` to compare the queue item ids for equality. Our queue item ids start at 0, and each queue item created increments this by one. So this comparison works only for the first 256 queue items on the machine.
Starting with the 257th queue item, the comparison starts returning `False`, and cancelation gets weird.
Easy fix - use `!=` instead of `is not`.
2024-12-02 23:22:58 -05:00
Mary Hipp
a6be26e174
fix(worker): only apply processor cancel logic if cancel event is for current queue item
2024-12-02 14:03:05 -08:00
Riku
159b00a490
fix(app): adjust session queue api type
2024-12-01 20:06:05 -08:00
Jonathan
6012b0f912
Update flux_text_encoder.py
...
Updated version number for FLUX Text Encoding.
2024-11-30 08:29:21 -05:00
Jonathan
bb0ed5dc8a
Update flux_denoise.py
...
Updated node version for FLUX Denoise.
2024-11-30 08:29:21 -05:00
psychedelicious
5910892c33
Merge remote-tracking branch 'origin/main' into ryan/flux-regional-prompting
2024-11-29 15:19:39 +10:00
Ryan Dick
8cfb032051
Add utility ImagePanelLayoutInvocation for working with In-Context LoRA workflows.
2024-11-26 20:58:31 -08:00
Ryan Dick
06a9d4e2b2
Use a Textarea component for the FluxTextEncoderInvocation prompt field.
2024-11-26 20:58:31 -08:00
Brandon Rising
ed46acee79
fix: Fail scan on InvalidMagicError in picklescan, update default for read_checkpoint_meta to scan unless explicitly told not to
2024-11-26 16:17:12 -05:00
Ryan Dick
53abdde242
Update Flux RegionalPromptingExtension to prepare both a mask with restricted image self-attention and a mask with unrestricted image self attention.
2024-11-25 22:04:23 +00:00
Ryan Dick
3741a6f5e0
Fix device handling for regional masks and apply the attention mask in the FLUX double stream block.
2024-11-25 16:02:03 +00:00
Ryan Dick
20356c0746
Fixup the logic for preparing FLUX regional prompt attention masks.
2024-11-21 22:46:25 +00:00
Ryan Dick
fda7aaa7ca
Pass RegionalPromptingExtension down to the CustomDoubleStreamBlockProcessor in FLUX.
2024-11-20 19:48:04 +00:00
Ryan Dick
85c616fa34
WIP - Pass prompt masks to FLUX model during denoising.
2024-11-20 18:51:43 +00:00
psychedelicious
f01210861b
chore: ruff
2024-11-19 07:02:37 -08:00
psychedelicious
872a6ef209
tidy(nodes): extract slerp
from lblend
to util fn
2024-11-19 07:02:37 -08:00
psychedelicious
4267e5ffc4
tidy(nodes): bring masked blend latents masking logic into invoke core
2024-11-19 07:02:37 -08:00
Brandon Rising
1fd80d54a4
Run Ruff
2024-11-19 07:02:37 -08:00
Brandon Rising
991f63e455
Store CIELab_to_UPLab.icc within the repo
2024-11-19 07:02:37 -08:00
Brandon Rising
6a1efd3527
Add validation to some of the node inputs
2024-11-19 07:02:37 -08:00
Brandon Rising
0eadc0dd9e
feat: Support a subset of composition nodes within base invokeai
2024-11-19 07:02:37 -08:00
psychedelicious
a0d62a5f41
feat(nodes): add minimum image count to ImageBatchInvocation
2024-11-18 19:12:27 -08:00
psychedelicious
6ab891a319
feat(nodes): add ImageBatchInvocation
2024-11-18 19:12:27 -08:00
psychedelicious
492de41316
feat(app): add Classification.Special
, used for batch nodes
2024-11-18 19:12:27 -08:00
psychedelicious
c064efc866
feat(app): add ImageField
as an allowed batching data type
2024-11-18 19:12:27 -08:00
Mary Hipp
51d0931898
remove GPL-3 licensed package easing-functions
2024-11-18 08:55:17 -05:00
psychedelicious
96a31a5563
feat(app): add more events when loading/running models
2024-11-15 05:49:05 +11:00
psychedelicious
067747eca9
feat(app): tweak model load events
...
- Pass in the `UtilInterface` to the `ModelsInterface` so we can call the simple `signal_progress` method instead of the complicated `emit_invocation_progress` method.
- Only emit load events when starting to load - not after.
- Add more detail to the messages, like submodel type
2024-11-15 05:49:05 +11:00
maryhipp
54c51e0a06
(worker) add progress images for downloading remote models
2024-11-15 05:49:05 +11:00
maryhipp
fdb8ca5165
(worker) use source if name is not available
2024-11-15 05:49:05 +11:00
maryhipp
9bbb5644af
(worker) add invocation_progress events to model loading
2024-11-15 05:49:05 +11:00
Ryan Dick
1cf7600f5b
Merge branch 'main' into ryan/sd3-image-to-image
2024-11-14 09:25:23 -08:00
Ryan Dick
eaf4e08c44
Use vae.parameters() for more efficient access of the first model parameter.
2024-11-13 23:32:40 +00:00
Mary Hipp
13cb5f0ba2
Merge remote-tracking branch 'origin/main' into ryan/sd3-image-to-image
2024-11-08 20:29:56 -05:00
maryhipp
04e4fb63af
add SD3 generation modes for metadata validation
2024-11-08 13:13:58 -05:00
David Burnett
2618ed0ae7
ruff complained
2024-11-08 10:31:53 +00:00
David Burnett
bb3cedddd5
Rework change based on comments
2024-11-08 10:27:47 +00:00
Ryan Dick
a0fefcd43f
Switch to using a custom scheduler implementation for SD3 rather than the diffusers FlowMatchEulerDiscreteScheduler. It is easier to work with and enables us to re-use the clip_timestep_schedule_fractional() utility from FLUX.
2024-11-07 22:46:52 +00:00
Ryan Dick
a5f8c23dee
Add inpainting support for SD3.
2024-11-07 20:21:43 +00:00
Ryan Dick
7bb4ea57c6
Add SD3ImageToLatentsInvocation.
2024-11-07 16:07:57 +00:00
Ryan Dick
75dc961bcb
Add image-to-image support for SD3 - WIP.
2024-11-07 15:48:35 +00:00
Jonathan
aa40161f26
Update flux_denoise.py
...
Added a bool to allow the node user to add noise in to initial latents (default) or to leave them alone.
2024-11-07 14:02:20 +00:00
Jonathan
2f6b035138
Update flux_denoise.py
...
Added a bool to allow the node user to add noise in to initial latents (default) or to leave them alone.
2024-11-07 08:44:10 -05:00
Mary Hipp
908db31e48
feat(api,ui): allow Whats New module to get content from back-end
2024-11-05 15:30:17 -05:00
brandonrising
2d78859171
Create bespoke latents to image node for sd3
2024-11-04 12:42:09 -05:00
maryhipp
78155344f6
update node fields for SD3 to match other SD nodes
2024-11-04 12:42:09 -05:00
Brandon Rising
e75903389f
Run ruff, fix bug in hf downloading code which failed to download parts of a model
2024-11-04 12:42:09 -05:00
Brandon Rising
27567052f2
Create new latent factors for sd35
2024-11-04 12:42:09 -05:00
maryhipp
befb629f46
add default workflow
2024-11-04 12:42:09 -05:00
maryhipp
78bd605617
(nodes,api): expose the submodels on SD3 model loader as optional, add types needed for CLIP-L and CLIP-G fields
2024-11-04 12:42:09 -05:00
Ryan Dick
1eca4f12c8
Make T5 encoder optonal in SD3 workflows.
2024-11-04 12:42:09 -05:00
Ryan Dick
f1de11d6bf
Make the default CFG for SD3 3.5.
2024-11-04 12:42:09 -05:00
Ryan Dick
9361ed9d70
Add progress images to SD3 and make denoising cancellable.
2024-11-04 12:42:09 -05:00
Brandon Rising
ebabf4f7a8
Setup Model and T5 Encoder selection fields for sd3 nodes
2024-11-04 12:42:09 -05:00
Ryan Dick
678436e07c
Add tqdm progress bar for SD3.
2024-11-04 12:42:09 -05:00
Ryan Dick
c620581699
Bug fixes to get SD3 text-to-image workflow running.
2024-11-04 12:42:09 -05:00
Ryan Dick
c331d42ce4
Temporary hack for testing SD3 model loader.
2024-11-04 12:42:09 -05:00
Ryan Dick
1ac9b502f1
Fix Sd3TextEncoderInvocation output type.
2024-11-04 12:42:09 -05:00
Ryan Dick
3fa478a12f
Initial draft of SD3DenoiseInvocation.
2024-11-04 12:42:09 -05:00
Ryan Dick
2d86298b7f
Add first draft of Sd3TextEncoderInvocation.
2024-11-04 12:42:09 -05:00
Ryan Dick
009cdb714c
Add Sd3ModelLoaderInvocation.
2024-11-04 12:42:09 -05:00
Ryan Dick
9d3f5427b4
Move FluxModelLoaderInvocation to its own file. model.py was getting bloated.
2024-11-04 12:42:09 -05:00
psychedelicious
be133408ac
fix(nodes): relaxed validation for segment anything
...
The validation on this node causes graph validation to valid. It must be validated _after_ instantiation.
Also, it was a bit too strict. The only case we explicitly do not handle is when both bboxes and points are provided. It's acceptable if neither are provided.
Closes #7248
2024-11-04 08:00:52 -05:00
dunkeroni
d6d436b59c
Merge branch 'invoke-ai:main' into t2i_resolution_hack
2024-10-31 15:52:24 -04:00
psychedelicious
7ff1b635c8
docs: clarify comments for invoke method return annotation validation
2024-10-31 16:21:07 +11:00
psychedelicious
7259da799c
feat(nodes): attempt to look up invoke return types by name
2024-10-31 16:21:07 +11:00
psychedelicious
90232806d9
feat(nodes): add validation for invoke method return types
2024-10-31 16:21:07 +11:00
Mary Hipp
bcb41399ca
feat(ui,api): support for HF tokens in UI, handle Unauthorized and Forbidden errors
2024-10-31 15:47:14 +11:00
psychedelicious
4e7d63761a
fix(nodes): nodes denylist handling
...
- Add method to force a rebuild of the pydantic type adapter for the union of invocations, which is used to validate graphs.
- Update the xfail'd test.
2024-10-31 15:22:14 +11:00
dunkeroni
47168b5505
chore: make ruff
2024-10-29 14:07:20 +11:00
dunkeroni
c74afbf332
convert to bgr on sdxl t2i
2024-10-29 14:07:20 +11:00
dunkeroni
34569a2410
Make T2I Adapters compatible with x8 resolutions
2024-10-27 15:38:22 -04:00
dunkeroni
f245d8e429
chore: make ruff
2024-10-25 23:43:33 -04:00
dunkeroni
5f015e76ba
convert to bgr on sdxl t2i
2024-10-25 23:04:17 -04:00
psychedelicious
ddd5b1087c
fix(nodes): return copies of objects in invocation ctx
...
Closes #6820
2024-10-25 08:26:09 -04:00
psychedelicious
c9a4516ab1
feat(nodes): add invert
to apply_tensor_mask_to_image
2024-10-25 08:12:14 -04:00
psychedelicious
380017041e
fix(app): mutating an image also changes the in-memory cached image
...
We use an in-memory cache for PIL images to reduce I/O. If a node mutates the image in any way, the cached image object is also updated (but the on-disk image file is not).
We've lucked out that this hasn't caused major issues in the past (well, maybe it has but we didn't understand them?) mainly because of a happy accident. When you call `context.images.get_pil` in a node, if you provide an image mode (e.g. `mode="RGB"`), we call `convert` on the image. This returns a copy. The node can do whatever it wants to that copy and nothing breaks.
However, when mode is not specified, we return the image directly. This is where we get in trouble - nodes that load the image like this, and then mutate the image, update the cache. Other nodes that reference that same image will now get the mutated version of it.
The fix is super simple - we make sure to return only copies from `get_pil`.
2024-10-25 10:22:22 +11:00
maryhipp
9cd47fa857
(api): update names of starter models, add ability to track previous_names so it does not mess up logic that prevents dupe starter model installs
2024-10-24 23:34:06 +11:00
psychedelicious
48a471bfb8
fix(nodes): apply_tensor_mask_to_image
transparent image handling
...
Fix an issue where if the input image is transparent in a region to be masked, that transparent region ends up opaque black. Need to respect the input image transparency by applying the mask to the alpha channel only.
2024-10-23 16:01:15 +11:00
psychedelicious
ff72315db2
feat(nodes): update SAM backend and nodes to work with SAM points
2024-10-23 16:01:15 +11:00
psychedelicious
ba09c1277f
feat(nodes): hacked together nodes for segment anything w/ points
2024-10-23 16:01:15 +11:00
psychedelicious
61496fdcbc
fix(nodes): load IP Adapter images as RGB
...
FLUX IP Adapter only works with RGB. Did the same for non-FLUX to be safe & consistent, though I don't think it's strictly necessary.
2024-10-23 08:34:15 +10:00
Ryan Dick
5cbe89afdd
Merge branch 'main' into ryan/flux-ip-adapter-cfg-2
2024-10-22 21:17:36 +00:00
Ryan Dick
d20b894a61
Add cfg_scale_start_step and cfg_scale_end_step to FLUX Denoise node.
2024-10-23 07:59:48 +11:00
Ryan Dick
20362448b9
Make negative_text_conditioning nullable on FLUX Denoise invocation.
2024-10-23 07:59:48 +11:00
Ryan Dick
5df10cc494
Add support for cfg_scale list on FLUX Denoise node.
2024-10-23 07:59:48 +11:00
Ryan Dick
da171114ea
Naive implementation of CFG for FLUX.
2024-10-23 07:59:48 +11:00
Mary Hipp
ffcec91d87
Merge branch 'ryan/flux-ip-adapter-cfg-2' of https://github.com/invoke-ai/InvokeAI into ryan/flux-ip-adapter-cfg-2
2024-10-22 15:23:35 -04:00
Mary Hipp
0a96466b60
feat(ui): add IP adapters to FLUX in linear UI
2024-10-22 15:22:56 -04:00
Ryan Dick
e48cab0276
Only allow a single image prompt for FLUX IP-Adapters (haven't really looked into this much, but punting on it for now).
2024-10-22 16:32:01 +00:00
psychedelicious
d1bb4c2c70
fix(nodes): FluxDenoiseInvocation.controlnet_vae
missing default=None
2024-10-22 10:54:15 +11:00
Ryan Dick
e8cd1bb3d8
Add FLUX IP-Adapter starter models.
2024-10-21 22:17:42 +00:00
Ryan Dick
90a906e203
Simplify handling of CLIP ViT selection for FLUX IP-Adapter invocation.
2024-10-21 19:54:59 +00:00
Ryan Dick
5546110127
Add FluxIPAdapterInvocation.
2024-10-21 18:27:40 +00:00
Ryan Dick
73bbb12f7a
Use a black image as the negative IP prompt for parity with X-Labs implementation.
2024-10-21 15:47:22 +00:00
Ryan Dick
dde54740c5
Test out IP-Adapter with CFG.
2024-10-21 15:47:17 +00:00
Ryan Dick
f70a8e2c1a
A bunch of HACKS to get ViT-L CLIP vision encoder working for FLUX IP-Adapter. Need to revisit how to clean this all up long term.
2024-10-21 15:43:00 +00:00
Ryan Dick
31ffd73423
Initial draft of integrating FLUX IP-Adapter inference support.
2024-10-21 15:42:56 +00:00