Commit Graph

8622 Commits

Author SHA1 Message Date
Ryan Dick
984e609c61 (minor) Tweak field ordering and field names for tiling nodes. 2023-11-30 07:53:27 -08:00
Ryan Dick
57e70aaf50 Change input field ordering of CropLatentsCoreInvocation to match ImageCropInvocation. 2023-11-30 07:53:27 -08:00
Ryan Dick
bfdef120d1 Re-organize merge_tiles_with_linear_blending(...) to merge rows horizontally first and then vertically. This change achieves slightly more natural blending on the corners where 4 tiles overlap. 2023-11-30 07:53:27 -08:00
Ryan Dick
32da359ba5 Infer a tight-fitting output image size from the passed tiles in MergeTilesToImageInvocation. 2023-11-30 07:53:27 -08:00
Ryan Dick
b19ed36b43 Add width and height fields to TileToPropertiesInvocation output to avoid having to calculate them with math nodes. 2023-11-30 07:53:27 -08:00
Ryan Dick
e5a212b5c8 Update tiling nodes to use width-before-height field ordering convention. 2023-11-30 07:53:27 -08:00
Ryan Dick
9b863fb9bc Rename CropLatentsInvocation -> CropLatentsCoreInvocation to prevent conflict with custom node. And other minor tidying. 2023-11-30 07:53:27 -08:00
Ryan Dick
7cab51745b Improve documentation of CropLatentsInvocation. 2023-11-30 07:53:27 -08:00
Ryan Dick
18c6ff427e Use LATENT_SCALE_FACTOR = 8 constant in CropLatentsInvocation. 2023-11-30 07:53:27 -08:00
Ryan Dick
843f2d71d6 Copy CropLatentsInvocation from 74647fa9c1/images_to_grids.py (L1117C1-L1167C80). 2023-11-30 07:53:27 -08:00
Ryan Dick
67540c9ee0 (minor) Add 'Invocation' suffix to all tiling node classes. 2023-11-30 07:53:27 -08:00
Ryan Dick
7f816c9243 Tidy up tiles invocations, add documentation. 2023-11-30 07:53:27 -08:00
Ryan Dick
76b888de17 Add unit tests for merge_tiles_with_linear_blending(...). 2023-11-30 07:53:27 -08:00
Ryan Dick
65a16be299 Add unit tests for calc_tiles_with_overlap(...) and fix a bug in its implementation. 2023-11-30 07:53:27 -08:00
Ryan Dick
1c8ff0ae66 Add unit tests for tile paste(...) util function. 2023-11-30 07:53:27 -08:00
Ryan Dick
29eade4880 Add nodes for tile splitting and merging. The main motivation for these nodes is for use in tiled upscaling workflows. 2023-11-30 07:53:27 -08:00
Hosted Weblate
86fd1d5b22 translationBot(ui): update translation files
Updated by "Cleanup translation files" hook in Weblate.

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invokeai/web-ui/
Translation: InvokeAI/Web UI
2023-12-01 00:40:48 +11:00
psychedelicious
909b78a1cb fix(ui): fix missing images not handled
- Reset init image, control adapter images, and node image fields when their selected image fails to load
- Only do this if the app is connected via socket (this indicates that the image is "really" gone, and there isn't just a transient network issue)

It's possible for image parameters/nodes/states to have reference a deleted image. For example, a resize image node might have an image set on it, and the workflow saved. The workflow contains a hard reference to that image.

The image is deleted and the workflow loaded again later. The deleted image is still in that workflow, but the app doesn't detect that. The result is that the workflow/graph appears to be valid, but will fail on invoke.

This creates a really confusing user experience, where when somebody shares a workflow with an image baked into it, and another person opens it, everything *looks* ok, but the workflow fails with a mysterious error about a missing image.

The problem affects node images, control adapter images and the img2img init image. Resetting the image when it fails to load *and* socket is connected resolves this in a simple way.

The problem also affects canvas images, but we have handle that by displaying an error fallback image, so no change is made there.
2023-12-01 00:35:06 +11:00
psychedelicious
2f81f9fb22 fix(ui): add missing star image translation key 2023-12-01 00:33:04 +11:00
psychedelicious
a6d4e4ed57 fix(ui): fix enum parsing for optional enums
Closes #5121

- Parse `anyOf` for enums (present when they are optional)
- Consolidate `FieldTypeParseError` and `UnsupportedFieldTypeError` into `FieldParseError` (there was no difference in handling and it simplifies things a bit)
2023-11-30 05:01:29 -08:00
ymgenesis
3e01c396e1
CenterPadCrop node (#3861)
* add centerpadcrop node

- Allows users to add padding to or crop images from the center
- Also outputs a white mask with the dimensions of the output image for use with outpainting

* add CenterPadCrop to NODES.md

Updates NODES.md with CenterPadCrop entry.

* remove mask & output class

- Remove "ImageMaskOutput" where both image and mask are output
- Remove ability to output mask from node

---------

Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
2023-11-30 21:15:59 +11:00
Damian Stewart
0beb08686c
Add CFG Rescale option for supporting zero-terminal SNR models (#4335)
* add support for CFG rescale

* fix typo

* move rescale position and tweak docs

* move input position

* implement suggestions from github and discord

* cleanup unused code

* add back dropped FieldDescription

* fix(ui): revert unrelated UI changes

* chore(nodes): bump denoise_latents version 1.4.0 -> 1.5.0

* feat(nodes): add cfg_rescale_multiplier to metadata node

* feat(ui): add cfg rescale multiplier to linear UI

- add param to state
- update graph builders
- add UI under advanced
- add metadata handling & recall
- regen types

* chore: black

* fix(backend): make `StableDiffusionGeneratorPipeline._rescale_cfg()` staticmethod

This doesn't need access to class.

* feat(backend): add docstring for `_rescale_cfg()` method

* feat(ui): update cfg rescale mult translation string

---------

Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
2023-11-30 20:55:20 +11:00
Ryan Dick
693c6cf5e4 Add support for IPAdapterFull models. The changes are based on this upstream PR: https://github.com/tencent-ailab/IP-Adapter/pull/139 . 2023-11-29 15:07:21 -08:00
skunkworxdark
77933a0a85 Update prompt.py
bumped version to 1.0.1
2023-11-29 23:40:10 +11:00
skunkworxdark
2a087bf161 Update prompt.py
Use UTF-8 encoding on reading prompts from files to allow Unicode characters to load correctly. 
The following examples currently will not load correctly from a file:

Hello, 世界!
😭🤮 💔
2023-11-29 23:40:10 +11:00
Millun Atluri
b0fe57ec80
Update communityNodes.md (#5184)
Added New Match Histogram node
Updated XYGrid nodes and Prompt Tools nodes

## What type of PR is this? (check all applicable)

- [ ] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Optimization
- [x] Documentation Update
- [ ] Community Node Submission


## Have you discussed this change with the InvokeAI team?
- [ ] Yes
- [ ] No, because:

      
## Have you updated all relevant documentation?
- [ ] Yes
- [ ] No


## Description


## Related Tickets & Documents

<!--
For pull requests that relate or close an issue, please include them
below. 

For example having the text: "closes #1234" would connect the current
pull
request to issue 1234.  And when we merge the pull request, Github will
automatically close the issue.
-->

- Related Issue #
- Closes #

## QA Instructions, Screenshots, Recordings

<!-- 
Please provide steps on how to test changes, any hardware or 
software specifications as well as any other pertinent information. 
-->

## Added/updated tests?

- [ ] Yes
- [ ] No : _please replace this line with details on why tests
      have not been included_

## [optional] Are there any post deployment tasks we need to perform?
2023-11-29 14:10:26 +11:00
Millun Atluri
09cb40786f
(fix) Update communityNodes.md installation instructions
Update custom node instructions to be clearer
2023-11-29 14:08:50 +11:00
Millun Atluri
18ecfc0521
Merge branch 'main' into patch-2 2023-11-29 14:07:13 +11:00
psychedelicious
59d932e9c1 chore(ui): lint 2023-11-29 11:06:07 +11:00
psychedelicious
578c8ce5dd feat(ui): enforce absolute import paths
- add & configure `eslint-plug-path`
2023-11-29 11:06:07 +11:00
psychedelicious
3d4874dc34 feat(ui): "Polymorphic" -> "CollectionOrScalar"
This new name more accurately represents that these are fields with a type of `T | T[]`, where the "base" type must be the same on both sides of the union.
2023-11-29 10:49:31 +11:00
psychedelicious
5aaf2e8873 fix(ui): fix typing of FIELD_VALUE_FALLBACK_MAP 2023-11-29 10:49:31 +11:00
psychedelicious
f3fd0f6d73 fix(ui): remove unused schema/type/guard 2023-11-29 10:49:31 +11:00
psychedelicious
4468581d2e fix(nodes): remove extraneous del 2023-11-29 10:49:31 +11:00
psychedelicious
da642b7aad feat(ui): update comments in field.ts 2023-11-29 10:49:31 +11:00
psychedelicious
b379e3d187 fix(ui): fix capitalization 2023-11-29 10:49:31 +11:00
psychedelicious
6867c79185 fix(tests): remove deprecated arg 2023-11-29 10:49:31 +11:00
psychedelicious
a1705dc6b3 fix(nodes): fix loading node pack display 2023-11-29 10:49:31 +11:00
psychedelicious
4af4486dd9 feat(nodes,ui): add detection of custom nodes
Custom nodes have a new attribute `node_pack` indicating the node pack they came from.

- This is displayed in the UI in the icon icon tooltip.
- If a workflow is loaded and a node is unavailable, its node pack will be displayed (if it is known).
- If a workflow is migrated from v1 to v2, and the node is unknown, it falls back to "Unknown". If the missing node pack is installed and the node is updated, the node pack will be updated as expected.
2023-11-29 10:49:31 +11:00
psychedelicious
282a7f32d3 feat(ui): improve openapi schema types
We can use the autogenerated types to avoid types
2023-11-29 10:49:31 +11:00
psychedelicious
4c6a88a642 feat(ui): update readme 2023-11-29 10:49:31 +11:00
psychedelicious
e41d0b9a76 feat(ui): add links to relevant files in workflows doc 2023-11-29 10:49:31 +11:00
psychedelicious
a02090b06b feat(ui): update workflows design & implementation docs 2023-11-29 10:49:31 +11:00
psychedelicious
0d9a546d74 feat(ui): organize migrations files 2023-11-29 10:49:31 +11:00
psychedelicious
8d99113bef feat(ui): organize node utils 2023-11-29 10:49:31 +11:00
psychedelicious
4309f3bd58 feat(ui): tidy node-related types 2023-11-29 10:49:31 +11:00
psychedelicious
42370939a8 feat(ui): update workflows design & implementation docs (wip) 2023-11-29 10:49:31 +11:00
psychedelicious
654591cbf3 feat(ui): make buildFieldInputTemplate arg name consistent 2023-11-29 10:49:31 +11:00
psychedelicious
ad9c954a58 feat(ui): move field output template builder to own file 2023-11-29 10:49:31 +11:00
psychedelicious
a703e1b3d3 feat(ui): add errors for invalid polymorphic types 2023-11-29 10:49:31 +11:00