Repository: nosiu/comfyui-instantId-faceswap
Branch: main
Commit: d125a2a5ef50
Files: 31
Total size: 908.4 KB
Directory structure:
gitextract_s796ovar/
├── .github/
│ └── workflows/
│ └── publish_action.yml
├── .gitignore
├── LICENSE
├── README.md
├── __init__.py
├── ip_adapter/
│ ├── instantId.py
│ └── resampler.py
├── nodes.py
├── pyproject.toml
├── requirements.txt
├── ui/
│ ├── dialogs.js
│ ├── extension.js
│ ├── helpers.js
│ ├── shaders.js
│ └── uiHelpers.js
├── utils.py
└── workflows/
├── auto_rotate.json
├── draw_kps.json
├── draw_kps_rotate.json
├── inpaint.json
├── promp2image.json
├── promp2image_detail_pass.json
├── prompts2img_2faces_enhancement.json
├── prop2image_latent_upscale.json
├── prop2image_latent_upscale_with_2d_randomizer.json
├── prop2image_latent_upscale_with_3d_and_2d_randomizer.json
├── prop2image_latent_upscale_with_3d_and_2d_randomizer_with_rotation.json
├── simple.json
├── simple_two_embeds.json
├── simple_with_adapter.json
└── very_simple.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/publish_action.yml
================================================
name: Publish to Comfy registry
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "pyproject.toml"
jobs:
publish-node:
name: Publish Custom Node to registry
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Publish Custom Node
uses: Comfy-Org/publish-node-action@main
with:
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
================================================
FILE: .gitignore
================================================
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.md
================================================
# ComfyUI InstantID FaceSwap v0.1.1
[About](#comfyui-instantid-faceswap-v011) | [Installation guide](#installation-guide) | [Custom nodes](#custom-nodes) | [Workflows](#workflows) | [Tips](#tips) | [Changelog](#changelog)
Implementation of [faceswap](https://github.com/nosiu/InstantID-faceswap/tree/main) based on [InstantID](https://github.com/InstantID/InstantID) for ComfyUI. \
Since version 0.1.0 it also allows generating people based on text.
**Works ONLY with SDXL checkpoints**


## Installation guide
[About](#comfyui-instantid-faceswap-v011) | [Installation guide](#installation-guide) | [Custom nodes](#custom-nodes) | [Workflows](#workflows) | [Tips](#tips) | [Changelog](#changelog)
1. Clone or download this repository and put it into **ComfyUI/custom_nodes**
2. Open commandline in the **ComfyUI/custom_nodes/comfyui-instantId-faceswap/** folder and type `pip install -r requirements.txt` to install dependencies
3. Manually download required files and create required folders:
- [antelopev2 models](https://huggingface.co/DIAMONIK7777/antelopev2/tree/main)
and put them into **ComfyUI/models/insightface/models/antelopev2** folder
- 1k3d68.onnx
- 2d106det.onnx
- genderage.onnx
- glintr100.onnx
- scrfd_10g_bnkps.onnx
- [IpAdapter and ControlNet](https://huggingface.co/InstantX/InstantID/tree/main)
- ip-adapter.bin - put it into **ComfyUI/models/ipadapter**
- ControlNetModel/diffusion_pytorch_model.safetensors and ControlNetModel/config.json - put those files in new folder in **ComfyUI/models/controlnet**
Newly added files hierarchy should look like this:
```
ComfyUI
\---models
\---ipadapter
ipadapter.bin
\---controlnet
\--- FOLDER_YOU_CREATED
config.json
diffusion_pytorch_model.safetensors
\---insightface
\---models
\antelopev2
1k3d68.onnx
2d106det.onnx
genderage.onnx
glintr100.onnx
scrfd_10g_bnkps.onnx
```
*Note You don't need to add the 'ipadapter', and 'controlnet' folders to this specific location if you already have them somewhere else (also you can rename ipadapter.bin and ControlNetModel to something of your liking).
Instead, You can edit `ComfyUI/extra_model_paths.yaml` and add folders containing those files to the config.
## Custom nodes
[About](#comfyui-instantid-faceswap-v011) | [Installation guide](#installation-guide) | [Custom nodes](#custom-nodes) | [Workflows](#workflows) | [Tips](#tips) | [Changelog](#changelog)
- ### Load Insightface:
Loads Insightface. Models need to be in a specific location. Check the [Installation guide](#installation-guide) for details.
- ### Load instantId adapter:
Loads the InstantId adapter and resampler. The model needs to be in a specific location. Check the [Installation guide](#installation-guide) for details. The resampler is used to prepare face embeds for ControlNet and the adapter.
- ### Apply instantId adapter:
Applies the InstantId adapter to the model. This is optional—you can achieve good results without using this node.
**Params:**
- **checkpoint** - SDXL checkpoint
- **instantId_adapter** - intantId adapter
- **face_conditioning** - face conditioning prepared by the resampler
- **strength** - strength of the instantId adapter
- ### Apply instantId ControlNet:
Applies InstantId ControlNet.
**Params:**
- **positive** - positive prompts
- **negative** - negative prompts
- **face_conditioning** - face conditioning prepared by the resampler
- **control_net** - instantId Controlnet
- **strength** - strength of instantId ControlNet
- ### Apply instantId and ControlNet:
A subgraph node that bundles several operations into a single node for convenience. It includes the following nodes: LoadInstantIdAdapter, FaceEmbedCombine, ControlNetLoader, InstantIdAdapterApply, and ControlNetInstantIdApply.
This node streamlines the process by loading the InstantId adapter, combining face embeddings, loading the ControlNet, and applying both the InstantId adapter and ControlNet in one step.
- ### FaceEmbed for instantId
Prepares face embeds for generation. You can chain multiple face embeds.
**Params:**
- **insightface** - insightface
- **face_image** - input image from which to extract embed data
- **face_embeds** (*optional*) - additional face embed(s)
- ### FaceEmbed Combine
Prepares face embeds for ControlNet and the adapter.
**Params:**
- **resampler** - resampler
- **face_embeds** - face_embeds
- ### Get Angle from face
Returns the angle (in degrees) by which the image must be rotated counterclockwise to align the face. Since there can be more than one face in the image, face search is performed only in the area of the drawn mask, enlarged by the pad parameter.
**Note:** If the face is rotated by an extreme angle, insightface won't be able to find the correct position of face keypoints, so the rotation angle might not always be accurate. In these cases, manually draw your own KPS.
**Params:**
- **insightface** - insightface
- **image** - image with the face to rotate
- **mask** - mask
- **rotate_mode** - available options:
- *none* - returns 0
- *loseless* - returns the closest angle to 90, 180, 270 degrees
- *any* - returns a specific angle by which the image should be rotated
- **pad_top** - how many pixels to enlarge the mask upwards
- **pad_right** - how many pixels to enlarge the mask to the right
- **pad_bottom** - how many pixels to enlarge the mask downwards
- **pad_left** - how many pixels to enlarge the mask to the left
- ### Get Angle from KPS data
Returns the angle (in degrees) by which the image must be rotated counterclockwise to align the face.
**Params:**
- **rotate_mode** - available options:
- *none* - returns 0
- *loseless* - returns the closest angle to 90, 180, 270 degrees
- *any* - returns a specific angle by which the image should be rotated
- ### Rotate Image
Rotates the image by the given angle and expands it.
**Params:**
- **image** - image
- **angle** - angle
- **counter_clockwise** - direction
- ### Remove rotation padding
Removes the expanded region added by two rotations (first to align the face, and second to return to the original position).
**Params:**
- **original_image** - image before rotation
- **rotated_image** - rotated image
- ### Draw KPS
Allows you to draw your own keypoints (KPS), useful when you get the error `"No face detected in pose image"` or when using InstantId to generate images from prompts only. Click and drag the KPS to move them around.
When you place your KPS in the desired position, this node will show the angle by which the image should be rotated to align the face.
You can adjust the opacity of each keypoint to sacrifice likeness, for example, when adding "glasses".
**Shortcuts:**\
**CTRL + DRAG** - move around\
**CTRL + WHEEL** - zoom in / out\
**ALT + WHEEL** - decrease / increase distance of other points from blue point (nose kps)
**Params:**
- **image_reference** (optional) - an image that serves as a background to more accurately match the appropriate points. If provided, the resulting image will have the width and height of this image.
- **width** - width of the image (disabled if `image_reference` is provided)
- **height** - height of the image (disabled if `image_reference` is provided)
- ### 3d KPS from image
Allows you to extract 3D keypoints (KPS) of a face from an image. This is useful when generating content from text prompts and wanting to rotate the face while preserving the distance between the eyes, nose, and mouth.
To use it, connect the `image` node, then click the **"Get KPS From Image"** button. Afterward, you can adjust the scale, position, and rotation of the face by clicking the **"Change KPS"** button.
**IMPORTANT:**
- Clicking Get KPS From Image will run InsightFace to extract KPS data, so it’s best not to use this in the middle of the generation process (this depends on your system's performance).
- You cannot manually change the distance between KPS in this node.
Once your KPS are placed in the desired position, the node will show the angle by which the image should be rotated to align the face.
You can adjust the opacity of each keypoint to sacrifice likeness, for example, when adding "glasses".
**Shortcuts:**\
**CTRL + DRAG** - move around\
**CTRL + WHEEL** - zoom in / out\
**ALT + WHEEL** - scale KPS
**Params:**
- **image** - an image of face from which KPS will be calculated
- **width** - width of the image
- **height** - height of the image
- ### Preprocess image for instantId:
Cuts out the mask area wrapped in a square, enlarges it in each direction by the `pad` parameter, and resizes it (to dimensions rounded down to multiples of 8). It also creates a control image for InstantId ControlNet.
**Note:** If the face is rotated by an extreme angle, the prepared `control_image` may be drawn incorrectly.
If the `insightface` param is not provided, it will not create a control image, and you can use this node as a regular node for inpainting (to cut the masked region with padding and later compose it).
**Params:**
- **image** - your pose image (the image in which the face will be swapped)
- **mask** - drawn mask (the area to be changed must contain the face; you can also mask other features like hair or hats and change them later with prompts)
- **insightface** (optional) - loaded insightface
- **width** - width of the image in pixels (check `resize_mode`)
- **height** - height of the image in pixels, check `resize_mode`
- **resize_mode** - available options:
- *auto* - automatically calculates the image size so that the area is `width` x ` height`.
For SDXL, you probably want to use this option with:
**width: 1024, height: 1024**
- *scale by width* - ignores provided `height` and calculates it based on the aspect ratio
- *scale by height* - ignores provided `width` and calculates it based on the aspect ratio
- *free* - uses the provided `width` and `height`
- **pad** - how many pixels to enlarge the mask in each direction
- ### Preprocess image for instantId (Advanced):
Same as **Preprocess Image for InstantId** with five additional parameters.
**Params:**
- **upscale_method** - *nearest-exact*, *bilinear*, *area*, *bicubic*, *lanczos*
- **pad_top** - how many pixels to enlarge the mask upwards
- **pad_right** - how many pixels to enlarge the mask to the right
- **pad_bottom** - how many pixels to enlarge the mask downwards
- **pad_left** - how many pixels to enlarge the mask to the left
- ### Randomize 2d KPS
Randomizes the position, angle, and rotation of the KPS based on the provided parameters.
**Params:**
- **angle_min** - minimum rotation angle. The rotation point is the center of the KPS,
- **angle_max** - maximum rotation angle, the rotation point is the center of the KPS,
- **scale_min** - minimum scaling value relative to the KPS center (1 means no scaling),
- **scale_max** - maximum scaling value relative to the KPS center (1 means no scaling),
- **translate_x** - value by which to shift the KPS along the X axis. For example, setting it to 200 will randomly select a shift value between -200 and 200,
- **translate_y** - value by which to shift the KPS along the Y axis. For example, setting it to 200 will randomly select a shift value between -200 and 200,
- **border** - edge threshold; if the KPS gets too close to the image border during translation, rotation, or scaling, it will be repositioned to this value
- ### Randomize 3d KPS
Randomizes the rotation of the KPS around three axes. Setting any of the parameters will randomly select a rotation angle around the corresponding axis. The rotation point is the center of the KPS.
Example: Setting rotate_x to 20 will rotate the KPS by a random angle between -20 and 20 degrees.
**Params:**
- **rotate_x** - rotation angle around the X axis,
- **rotaet_y** - rotation angle around the Y axis,
- **rotate_z** - rotation angle around the Z axis,
- ### Scale 2d KPS by
Scales the KPS data by a given factor.
**Params:**
- **scale**: scaling factor
- ### Scale 2d KPS
Scales the KPS data to the specified width and height.
**Params:**
- **width**: desired width,
- **height**: desired height
- ### Rotate 2d KPS
Rotates the KPS by the given angle and expands it.
**Params:**
- **angle**: rotation angle
- ### Crop 2d KPS
Crops the KPS.
**Params:**
- **x**: X coordinate of the top-left corner,
- **y**: Y coordinate of the top-left corner,
- **width**: width of the cropped area,
- **height**: height of the cropped area,
- ### Create KPS Image
Creates a control_image from `kps_data`
- ### Create mask from Kps
Creates a mask based on the KPS position.
**Params:**
- **grow_by** - expands the mask by adding extra space on all sides. The additional margin on each side is equal to the mask’s dimension divided by this value. For example, if the KPS width is 20 pixels and grow_by is set to 10, an extra 20/10 (i.e., 2 pixels) will be added to the left and right sides — resulting in a new width of 20 + 2 + 2 = 24 pixels. The same applies to the height.
## Workflows
[About](#comfyui-instantid-faceswap-v011) | [Installation guide](#installation-guide) | [Custom nodes](#custom-nodes) | [Workflows](#workflows) | [Tips](#tips) | [Changelog](#changelog)
You can find example workflows in the `/workflows` folder.
Nodes colors legend: \
**yellow** - node from this extension,\
**blue** - inputs, load your controlnets, models, images ...\
**purple** - you might want to configure those\
**cyan** - output images\
**green** - positive prompts\
**red** - negative prompts
If you set the mask blur options remember that it will shrink the area you masked
### simple.json
Face swap: Set your pose image, draw a mask, set your face reference (the face that will replace the masked area in the pose image), and that's it.
### simple_with_adapter.json
Same as `simple.json` with an additional node `Apply instantId adapter`
### simple_two_embeds.json
Same as `simple.json`, but allows you to provide two face references. You can use this to merge two different faces or just provide a second reference for the first face.
### draw_kps.json
Face swap: Set your pose image, draw a mask, set your face reference (the face that will replace the masked area in the pose image), and then click the "draw KPS" button on the `Draw KPS` node to set your KPS.
View Example Image
### draw_kps_rotate.json
Same as `draw_kps.json`, but it will also rotate the pose image. After setting your KPS, you should set the angle by which you want to rotate the image to align the face properly.
View Example Image
### auto_rotate.json
Same as `simple_with_adapter.json`, but it will automatically detect the angle of rotation based on the mask and padding set in the `Get Angle from Face` node.
### promp2image.json
Generates an image based only on the face reference and prompts. Set your face reference, draw the KPS where the face should be drawn, and add prompts like "man sitting in the park."
### promp2image_detail_pass.json
Same as `prompt2image.json`, but this one expects the KPS you draw to be small, so the face is not detailed (or may even be deformed). Second pass should fix the face.
### prompts2img_2faces_enhancement.json
A workflow that generates two faces in one image and enhances them one by one.
Set your face references and KPS for one image, then set a second KPS in another region of the picture. Good results depend on your prompts.
View Example Image

### inpaint.json
Since you can use the `Preprocess Image for InstantId` and `Preprocess Image for InstantId (Advanced)` nodes to resize your images with a mask, this workflow is useful for inpainting in general. This workflow shows you how to do it.
View Example Image

### prop2image_latent_upscale.json
Similar to `promp2image_detail_pass.json`, this workflow allows you to draw your KPS. The workflow will run a first pass at 50%, upscale the latent by `1.4`, and finish with a detail pass on the face area.
### prop2image_latent_upscale_with_2d_randomizer.json
Same as `prop2image_latent_upscale.json`, but it will randomize the position of the face within the image.
### prop2image_latent_upscale_with_3d_and_2d_randomizer.json
Similar to `prop2image_latent_upscale_with_2d_randomizer.json`, but instead of drawing your KPS, you retrieve them from a face image (in 3d).
Click the **"Get KPS from image"** button on the 3D KPS from Image node, then use the **"Change KPS"** button to adjust the position of your KPS. You can also randomize the 3D rotation in this workflow.
### prop2image_latent_upscale_with_3d_and_2d_randomizer_with_rotation.json
Exactly the same as `prop2image_latent_upscale_with_3d_and_2d_randomizer.json`, with one small addition: you can set the face rotation method during the last pass. The workflow will rotate the face to a "straight" position, process the image, and then composite it into the final result.
The default rotation is set to "any," so you might encounter some artifacts from the rotation. You can adjust this setting as needed.
## Tips
[About](#comfyui-instantid-faceswap-v011) | [Installation guide](#installation-guide) | [Custom nodes](#custom-nodes) | [Workflows](#workflows) | [Tips](#tips) | [Changelog](#changelog)
- Most workflows require you to draw a mask on the pose image.
- If you encounter the error `No face detected in pose image`, try drawing a larger mask or increasing the `pad` parameter or draw KPS yourself.
- You can adjust the opacity of each keypoint to preserve original features or rely more on your prompts without sacrificing the overall likeness of the face.
- You can modify more than just the face — add accessories like a hat, change hair, or even alter expressions.
- If you're changing a lot of elements unrelated to the face, it's a good idea to add a second pass focused primarily on the face area to enhance detail.
- To improve results, you can integrate other extensions such as ControlNet for inpainting, Fooocus inpaint, FaceShaper, Expression Lora, and many more.
- To understand the relationship between ControlNet and the adapter, check the official paper linked in the instantId repository: https://github.com/instantX-research/InstantID?tab=readme-ov-file
## Changelog
[About](#comfyui-instantid-faceswap-v011) | [Installation guide](#installation-guide) | [Custom nodes](#custom-nodes) | [Workflows](#workflows) | [Tips](#tips) | [Changelog](#changelog)
- ### 0.1.1 (03.03.2025)
- Introduced new nodes to ensure proper KPS size.
- Removed the ability to draw masks on the KPS node (a separate node is available for this).
- Added the ability to add transparency to individual KPS, providing similar functionality as `ControlNet Scale` but for specific parts of the face (e.g., adding glasses).
- The generation of KPS control images has been entirely moved to the backend (Python). You can still draw KPS manually, but this change reduces the creation of temporary files.
- Drawn KPS positions are now saved into the workflow.
- Added the ability to import 3D KPS positions from the face, allowing rotation, scaling, and movement of those points while preserving the distance between the eyes, nose, and mouth.
- Added options to randomize position, rotation, and KPS scaling to diversify final images.
- Added the ability to randomize 3D face rotation to further diversify results.
- To diversify results even further, you can use tools like [comfyui-text-randomizer](https://github.com/nosiu/comfyui-text-randomizer), which was created as a side project during the development of this repository.
**Note:** Some old workflows will not be compatible with this version.
- ### 0.1.0 (20.10.2024)
- The code was rewritten from scratch and now uses the ComfyUI backend. This allows you to chain LORAs or ControlNets as needed, providing greater control over the entire process.
For example, you can now draw your own KPS, enabling both text-to-image and image-to-image generation.
- Removed most dependencies (including Diffusers).
- Removed all old nodes and introduced new ones.
- The script that automatically generated workflows based on all faces in a specific catalog has been removed.
**Note:** Old workflows will not work with this version.
- ### 0.0.5 (25.02.2024)
- The `mask_strength` parameter has been fixed; it now functions correctly. Previously, it was stuck at *0.9999* regardless of the chosen value.
- The `ip_adapter_scale` parameter has been fixed. If you were using the xformers, this parameter could be stuck at *50*.
- Changed the method of processing face_embed(s).
- Added the `rotate_face` parameter. It will attempt to rotate the image to keep the face straight before processing and rotate it back to the original position afterward.
- ### 0.0.4 (14.02.2024)
- To save memory, you can run Comfy with the `--fp16-vae` argument to disable the default VAE upcasting to float32.
- Merged the old `resize` and `resize_to` options into just `resize` for the Faceswap generate node. To emulate the old behavior where resize was unchecked, select `don't`.
- Added a manual offload mechanism to save GPU memory.
- Changed the minimum and maximum values for `mask_strength` to range from 0.00 to 1.00.
- ### 0.0.3 (07.02.2024)
- Fixed an error that caused new face_embeds to be added when editing previous ones
- ### 0.0.2 (05.02.2024)
- Introducing workflow generator script - [more information here](#workflow-script-beta)
- Updating the dependency diffusers to version 0.26.x. Run either:
```bash
pip install -r requirements.txt
```
or
```bash
pip install -U diffusers~=0.26.0
```
- ### 0.0.1 (01.02.2024)
- Progress bar and latent preview added for generation node
================================================
FILE: __init__.py
================================================
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
WEB_DIRECTORY = './ui/'
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS', 'WEB_DIRECTORY']
================================================
FILE: ip_adapter/instantId.py
================================================
import torch
from comfy.ldm.modules.attention import optimized_attention
class InstantId(torch.nn.Module):
def __init__(self, ip_adapter):
super().__init__()
self.to_kvs = torch.nn.ModuleDict()
for key, value in ip_adapter.items():
k = key.replace(".weight", "").replace(".", "_")
self.to_kvs[k] = torch.nn.Linear(value.shape[1], value.shape[0], bias=False)
self.to_kvs[k].weight.data = value
# based on https://github.com/laksjdjf/IPAdapter-ComfyUI/blob/main/ip_adapter.py#L256
class CrossAttentionPatch:
def __init__(self, scale, instantId, cond, number):
self.scales = [scale]
self.instantIds = [instantId]
self.conds = [cond]
self.number = number
def set_new_condition(self, scale, instantId, cond, number):
self.scales.append(scale)
self.instantIds.append(instantId)
self.conds.append(cond)
self.number = number
def __call__(self, q, k, v, extra_options):
dtype = torch.float16
hidden_states = optimized_attention(q, k, v, extra_options["n_heads"])
for scale, cond, instantId in zip(self.scales, self.conds, self.instantIds):
k_cond = instantId.to_kvs[str(self.number*2+1) + "_to_k_ip"](cond).to(dtype=dtype)
v_cond = instantId.to_kvs[str(self.number*2+1) + "_to_v_ip"](cond).to(dtype=dtype)
ip_hidden_states = optimized_attention(q, k_cond, v_cond, extra_options["n_heads"])
hidden_states = hidden_states + ip_hidden_states * scale
return hidden_states.to(dtype=dtype)
================================================
FILE: ip_adapter/resampler.py
================================================
# modified from https://github.com/mlfoundations/open_flamingo/blob/main/open_flamingo/src/helpers.py
import math
import torch
import torch.nn as nn
# FFN
def FeedForward(dim, mult=4):
inner_dim = int(dim * mult)
return nn.Sequential(
nn.LayerNorm(dim),
nn.Linear(dim, inner_dim, bias=False),
nn.GELU(),
nn.Linear(inner_dim, dim, bias=False),
)
def reshape_tensor(x, heads):
bs, length, _ = x.shape
#(bs, length, width) --> (bs, length, n_heads, dim_per_head)
x = x.view(bs, length, heads, -1)
# (bs, length, n_heads, dim_per_head) --> (bs, n_heads, length, dim_per_head)
x = x.transpose(1, 2)
# (bs, n_heads, length, dim_per_head) --> (bs*n_heads, length, dim_per_head)
x = x.reshape(bs, heads, length, -1)
return x
class PerceiverAttention(nn.Module):
def __init__(self, *, dim, dim_head=64, heads=8):
super().__init__()
self.scale = dim_head**-0.5
self.dim_head = dim_head
self.heads = heads
inner_dim = dim_head * heads
self.norm1 = nn.LayerNorm(dim)
self.norm2 = nn.LayerNorm(dim)
self.to_q = nn.Linear(dim, inner_dim, bias=False)
self.to_kv = nn.Linear(dim, inner_dim * 2, bias=False)
self.to_out = nn.Linear(inner_dim, dim, bias=False)
def forward(self, x, latents):
"""
Args:
x (torch.Tensor): image features
shape (b, n1, D)
latent (torch.Tensor): latent features
shape (b, n2, D)
"""
x = self.norm1(x)
latents = self.norm2(latents)
b, l, _ = latents.shape
q = self.to_q(latents)
kv_input = torch.cat((x, latents), dim=-2)
k, v = self.to_kv(kv_input).chunk(2, dim=-1)
q = reshape_tensor(q, self.heads)
k = reshape_tensor(k, self.heads)
v = reshape_tensor(v, self.heads)
# attention
scale = 1 / math.sqrt(math.sqrt(self.dim_head))
weight = (q * scale) @ (k * scale).transpose(-2, -1) # More stable with f16 than dividing afterwards
weight = torch.softmax(weight.float(), dim=-1).type(weight.dtype)
out = weight @ v
out = out.permute(0, 2, 1, 3).reshape(b, l, -1)
return self.to_out(out)
class Resampler(nn.Module):
def __init__(
self,
dim=1024,
depth=8,
dim_head=64,
heads=16,
num_queries=8,
embedding_dim=768,
output_dim=1024,
ff_mult=4,
):
super().__init__()
self.latents = nn.Parameter(torch.randn(1, num_queries, dim) / dim**0.5)
self.proj_in = nn.Linear(embedding_dim, dim)
self.proj_out = nn.Linear(dim, output_dim)
self.norm_out = nn.LayerNorm(output_dim)
self.layers = nn.ModuleList([])
for _ in range(depth):
self.layers.append(
nn.ModuleList(
[
PerceiverAttention(dim=dim, dim_head=dim_head, heads=heads),
FeedForward(dim=dim, mult=ff_mult),
]
)
)
def forward(self, x):
latents = self.latents.repeat(x.size(0), 1, 1)
x = self.proj_in(x)
for attn, ff in self.layers:
latents = attn(x, latents) + latents
latents = ff(latents) + latents
latents = self.proj_out(latents)
return self.norm_out(latents)
================================================
FILE: nodes.py
================================================
import os
import cv2
import torch
import numpy as np
import json
import comfy.utils
import folder_paths
from urllib.parse import urlparse, parse_qs
from server import PromptServer
from aiohttp import web
from comfy_execution.graph_utils import GraphBuilder
from .ip_adapter.resampler import Resampler
from .ip_adapter.instantId import InstantId
from insightface.app import FaceAnalysis
from .utils import draw_kps, set_model_patch_replace, resize_to_fit_area, \
kps_rotate_2d, kps_rotate_3d, kps3d_to_kps2d, calculate_size_after_rotation, \
get_mask_bbox_with_padding,get_kps_from_image,get_angle, image_rotate_with_pad, \
get_bbox_from_kps
folder_paths.folder_names_and_paths["ipadapter"] = ([os.path.join(folder_paths.models_dir, "ipadapter")], folder_paths.supported_pt_extensions)
INSIGHTFACE_PATH = os.path.join(folder_paths.models_dir, "insightface")
CATEGORY_NAME = "InstantId Faceswap"
MAX_RESOLUTION = 16384
#==============================================================================
# get key points and landmarks position as 3d points and send it back to frontend when requested
routes = PromptServer.instance.routes
@routes.post('/get_keypoints_for_instantId')
async def proxy_handle(request):
post = await request.json()
try:
app = FaceAnalysis(
name="antelopev2",
root=INSIGHTFACE_PATH,
providers=["CPUExecutionProvider", "CUDAExecutionProvider"]
)
app.prepare(ctx_id=0, det_size=(640, 640))
parsed_url = urlparse(post['image'])
queries = parse_qs(parsed_url.query)
path = os.path.join(folder_paths.get_directory_by_type(queries['type'][0]), queries['filename'][0])
image = cv2.imread(path)
faces = app.get(cv2.cvtColor(image, cv2.COLOR_RGB2BGR))
if len(faces) == 0:
raise Exception("No face detected")
face = sorted(faces, key=lambda x: (x["bbox"][2] - x["bbox"][0]) * (x["bbox"][3] - x["bbox"][1]))[-1] # only use the maximum face
landmarks_3d = face.landmark_3d_68
# KPS
left_eye = np.mean(landmarks_3d[36:42], axis=0)
right_eye = np.mean(landmarks_3d[42:48], axis=0)
nose_tip = np.array([landmarks_3d[33][0], landmarks_3d[33][1], landmarks_3d[30][2]])
left_mouth = landmarks_3d[48]
right_mouth = landmarks_3d[54]
return web.json_response({
"status": "ok",
"data": {
"kps": [ left_eye.tolist(), right_eye.tolist(), nose_tip.tolist(), left_mouth.tolist(), right_mouth.tolist() ],
"jawline": landmarks_3d[0:17].tolist(),
"eyebrow_left": landmarks_3d[17:22].tolist(),
"eyebrow_right": landmarks_3d[22:27].tolist(),
"nose_bridge": landmarks_3d[27:31].tolist(),
"nose_lower": landmarks_3d[31:36].tolist(),
"eye_left": landmarks_3d[36:42].tolist(),
"eye_right": landmarks_3d[42:48].tolist(),
"mouth_outer": landmarks_3d[48:60].tolist(),
"mouth_inner": landmarks_3d[60:68].tolist(),
}
})
except Exception as error:
if str(error) == "No face detected":
return web.json_response({
"error": "No face detected"
})
else:
raise error
#==============================================================================
class FaceEmbed:
def __init__(self):
pass
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"insightface": ("INSIGHTFACE_APP",),
"face_image": ("IMAGE",)
},
"optional": {
"face_embeds": ("FACE_EMBED",)
}
}
RETURN_TYPES = ("FACE_EMBED",)
RETURN_NAMES = ("face embeds",)
FUNCTION = "make_face_embed"
CATEGORY = CATEGORY_NAME
def make_face_embed(self, insightface, face_image, face_embeds = None):
face_image = (255.0 * face_image.cpu().numpy().squeeze()).clip(0, 255).astype(np.uint8)
face_info = insightface.get(cv2.cvtColor(face_image, cv2.COLOR_RGB2BGR))
assert len(face_info) > 0, "No face detected for face embed"
face_info = sorted(face_info, key=lambda x: (x["bbox"][2] - x["bbox"][0]) * (x["bbox"][3] - x["bbox"][1]))[-1] # only use the maximum face
face_emb = torch.tensor(face_info["embedding"], dtype=torch.float32).unsqueeze(0)
if face_embeds is None:
return (face_emb,)
face_embeds = torch.cat((face_embeds, face_emb), dim=-2)
return (face_embeds,)
#==============================================================================
class FaceEmbedCombine:
def __init__(self):
pass
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"resampler": ("RESAMPLER",),
"face_embeds": ("FACE_EMBED",)
},
}
RETURN_TYPES = ("FACE_CONDITIONING",)
RETURN_NAMES = ("face conditioning",)
FUNCTION = "combine_face_embed"
CATEGORY = CATEGORY_NAME
def combine_face_embed(self, resampler, face_embeds):
embeds = torch.mean(face_embeds, dim=0, dtype=torch.float32).unsqueeze(0)
embeds = embeds.reshape([1, -1, 512])
conditionings = resampler(embeds).to(comfy.model_management.get_torch_device())
return (conditionings,)
#==============================================================================
class AngleFromFace:
rotate_modes = ["none", "loseless", "any"]
def __init__(self):
pass
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"insightface": ("INSIGHTFACE_APP",),
"image": ("IMAGE", { "tooltip": "Pose image." }),
"mask": ("MASK",),
"rotate_mode": (self.rotate_modes,),
"pad_top": ("INT", {"default": 100, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
"pad_right": ("INT", {"default": 100, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
"pad_bottom": ("INT", {"default": 100, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
"pad_left": ("INT", {"default": 100, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
},
}
RETURN_TYPES = ("FLOAT",)
RETURN_NAMES = ("angle",)
FUNCTION = "get_angle"
CATEGORY = CATEGORY_NAME
def get_angle(
self, insightface, image, mask, rotate_mode,
pad_top, pad_right, pad_bottom, pad_left
):
p_x1, p_y1, p_x2, p_y2 = get_mask_bbox_with_padding(mask.squeeze(0), pad_top, pad_right, pad_bottom, pad_left)
image = image[:, p_y1:p_y2, p_x1:p_x2]
kps = get_kps_from_image(image, insightface)
angle = 0.
if rotate_mode != "none" :
angle = get_angle(
kps[0], kps[1],
round_angle = True if rotate_mode == "loseless" else False
)
return (angle,)
#==============================================================================
class AngleFromKps:
rotate_modes = ["none", "loseless", "any"]
def __init__(self):
pass
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"kps_data": ("KPS_DATA",),
"rotate_mode": (self.rotate_modes,)
},
}
RETURN_TYPES = ("FLOAT",)
RETURN_NAMES = ("angle",)
FUNCTION = "get_angle"
CATEGORY = CATEGORY_NAME
def get_angle(self, kps_data, rotate_mode):
kps_data = json.loads(kps_data)
angle = 0.
if rotate_mode != "none" :
angle = get_angle(
kps_data['array'][0], kps_data['array'][1],
round_angle = True if rotate_mode == "loseless" else False
)
return (angle,)
#==============================================================================
class ComposeRotated:
def __init__(self):
pass
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"original_image": ("IMAGE",),
"rotated_image": ("IMAGE",),
}
}
RETURN_TYPES = ("IMAGE",)
RETURN_NAMES = ("image",)
FUNCTION = "compose_rotate"
CATEGORY = CATEGORY_NAME
def compose_rotate(self, original_image, rotated_image):
original_width, original_height = original_image.shape[2], original_image.shape[1]
rotated_width, rotated_height = rotated_image.shape[2], rotated_image.shape[1]
if rotated_width != original_width:
pad_x1 = (rotated_width - original_width) // 2
pad_x2 = pad_x1 * -1
else:
pad_x1 = 0
pad_x2 = original_width
if rotated_height != original_height:
pad_y1 = (rotated_height - original_height) // 2
pad_y2 = pad_y1 * -1
else:
pad_y1 = 0
pad_y2 = original_height
image = rotated_image[:, pad_y1:pad_y2, pad_x1:pad_x2, :]
return (image,)
#==============================================================================
class RotateImage:
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"image": ("IMAGE",),
"angle": ("FLOAT", {"default": 0.0, "min": -360.0, "step": 0.1, "max": 360.0},),
"counter_clockwise": ("BOOLEAN", {"default": True},),
}
}
RETURN_TYPES = ("IMAGE",)
RETURN_NAMES = ("rotated_image", "rotated_mask",)
FUNCTION = "rotate_and_pad_image"
CATEGORY = CATEGORY_NAME
def rotate_and_pad_image(self, image, angle, counter_clockwise):
if angle == 0 or angle == 360:
return (image,)
image = image_rotate_with_pad(image, counter_clockwise, angle)
return (image,)
#==============================================================================
class LoadInstantIdAdapter:
def __init__(self):
pass
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"ipadapter": (folder_paths.get_filename_list("ipadapter"), { "tooltip": "The default folder where the adapter is searched for is: models/ipadapter." }),
}
}
RETURN_TYPES = ("INSTANTID_ADAPTER", "RESAMPLER", )
RETURN_NAMES = ("InstantId_adapter", "resampler",)
FUNCTION = "load_instantId_adapter"
CATEGORY = CATEGORY_NAME
def load_instantId_adapter(self, ipadapter):
ipadapter_path = folder_paths.get_full_path("ipadapter", ipadapter)
model = comfy.utils.load_torch_file(ipadapter_path, safe_load=True)
instantId = InstantId(model['ip_adapter'])
resampler = Resampler(
dim=1280,
depth=4,
dim_head=64,
heads=20,
num_queries=16,
embedding_dim=512,
output_dim=2048,
ff_mult=4
)
resampler.load_state_dict(model["image_proj"])
return (instantId, resampler)
#==============================================================================
class InstantIdAdapterApply:
def __init__(self):
pass
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"model": ("MODEL", ),
"instantId_adapter": ("INSTANTID_ADAPTER", ),
"face_conditioning": ("FACE_CONDITIONING", ),
"strength": ("FLOAT", {"default": 0.8, "min": 0, "step": 0.1, "max": 10},),
}
}
RETURN_TYPES = ("MODEL",)
RETURN_NAMES = ("model",)
FUNCTION = "apply_instantId_adapter"
CATEGORY = CATEGORY_NAME
def apply_instantId_adapter(self, model, instantId_adapter, face_conditioning, strength):
if strength == 0: return (model,)
instantId = instantId_adapter.to(comfy.model_management.get_torch_device())
patch_kwargs = {
"instantId": instantId,
"scale": strength,
"cond": face_conditioning,
"number": 0
}
m = model.clone()
for id in [4,5,7,8]:
block_indices = range(2) if id in [4, 5] else range(10)
for index in block_indices:
set_model_patch_replace(m, patch_kwargs, ("input", id, index))
patch_kwargs["number"] += 1
block_indices = range(2) if id in [3, 4, 5] else range(10)
for index in block_indices:
set_model_patch_replace(m, patch_kwargs, ("output", id, index))
patch_kwargs["number"] += 1
for index in range(10):
set_model_patch_replace(m, patch_kwargs, ("middle", 1, index))
patch_kwargs["number"] += 1
return (m,)
#==============================================================================
# based on ControlNetApplyAdvance from ComfyUi/nodes.py
class ControlNetInstantIdApply:
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"positive": ("CONDITIONING", ),
"negative": ("CONDITIONING", ),
"face_conditioning": ("FACE_CONDITIONING", ),
"control_net": ("CONTROL_NET", ),
"image": ("IMAGE", ),
"strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01})
}
}
RETURN_TYPES = ("CONDITIONING", "CONDITIONING", )
RETURN_NAMES = ("positive", "negative",)
FUNCTION = "apply_controlnet"
CATEGORY = CATEGORY_NAME
def apply_controlnet(self, positive, negative, face_conditioning, control_net, image, strength):
if strength == 0:
return (positive, negative)
control_hint = image.movedim(-1,1)
cnets = {}
out = []
for conditioning, isPositive in zip([positive, negative], [True, False]):
c = []
for t in conditioning:
d = t[1].copy()
prev_cnet = d.get("control", None)
if prev_cnet in cnets:
c_net = cnets[prev_cnet]
else:
c_net = control_net.copy().set_cond_hint(control_hint, strength)
c_net.set_previous_controlnet(prev_cnet)
cnets[prev_cnet] = c_net
if isPositive:
d["cross_attn_controlnet"] = face_conditioning.to(comfy.model_management.intermediate_device())
else :
d["cross_attn_controlnet"] = torch.zeros_like(face_conditioning).to(comfy.model_management.intermediate_device())
d["control"] = c_net
d["control_apply_to_uncond"] = False
n = [t[0], d]
c.append(n)
out.append(c)
return (out[0], out[1],)
#==============================================================================
class InstantIdAndControlnetApply:
def __init__(self):
pass
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"model": ("MODEL", ),
"ipadapter_path": (folder_paths.get_filename_list("ipadapter"), { "tooltip": "The default folder where the adapter is searched for is: models/ipadapter." }),
"control_net_name": (folder_paths.get_filename_list("controlnet"), ),
"face_embed": ("FACE_EMBED", ),
"control_image": ("IMAGE", ),
"adapter_strength": ("FLOAT", {"default": 0.5, "min": 0, "step": 0.1, "max": 10},),
"control_net_strength": ("FLOAT", {"default": 0.7, "min": 0.0, "max": 10.0, "step": 0.01}),
"positive": ("CONDITIONING", ),
"negative": ("CONDITIONING", )
}
}
RETURN_TYPES = ("MODEL", "CONDITIONING", "CONDITIONING",)
RETURN_NAMES = ("model", "positive", "negative",)
FUNCTION = "apply_instantId_adapter_and_controlnet"
CATEGORY = CATEGORY_NAME
def apply_instantId_adapter_and_controlnet(
self, model, ipadapter_path, control_net_name, face_embed, control_image,
adapter_strength, control_net_strength, positive, negative
):
graph = GraphBuilder()
loadInstantIdAdapter = graph.node(
"LoadInstantIdAdapter", ipadapter=ipadapter_path
)
faceEmbedCombine = graph.node(
"FaceEmbedCombine", resampler=loadInstantIdAdapter.out(1), face_embeds=face_embed
)
loadControlNet = graph.node(
"ControlNetLoader", control_net_name = control_net_name
)
instantIdApply = graph.node(
"InstantIdAdapterApply", model=model, instantId_adapter=loadInstantIdAdapter.out(0),
face_conditioning=faceEmbedCombine.out(0), strength=adapter_strength
)
controlNetInstantIdApply = graph.node(
"ControlNetInstantIdApply", positive=positive, negative=negative,
face_conditioning=faceEmbedCombine.out(0), control_net=loadControlNet.out(0),
image=control_image, strength=control_net_strength
)
return {
"result": (instantIdApply.out(0), controlNetInstantIdApply.out(0), controlNetInstantIdApply.out(1),),
"expand":graph.finalize()
}
#==============================================================================
class PreprocessImageAdvanced:
resize_modes = ["auto", "free", "scale by width", "scale by height"]
upscale_methods = ["nearest-exact", "bilinear", "area", "bicubic", "lanczos"]
def __init__(self):
pass
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"image": ("IMAGE", { "tooltip": "Pose image." }),
"mask": ("MASK",),
"width": ("INT", {"default": 1024, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
"height": ("INT", {"default": 1024, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
"resize_mode": (self.resize_modes,),
"upscale_method": (self.upscale_methods,),
"pad_top": ("INT", {"default": 100, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
"pad_right": ("INT", {"default": 100, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
"pad_bottom": ("INT", {"default": 100, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
"pad_left": ("INT", {"default": 100, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
},
"optional": {
"insightface": ("INSIGHTFACE_APP",),
}
}
RETURN_TYPES = ("IMAGE", "MASK", "IMAGE", "INT", "INT", "INT", "INT", "INT", "INT",)
RETURN_NAMES = ("resized_image", "mask", "control_image", "x", "y", "original_width", "original_height", "new_width", "new_height",)
FUNCTION = "preprocess_image"
CATEGORY = CATEGORY_NAME
def preprocess_image(
self, image, mask, width, height, resize_mode, upscale_method,
pad_top, pad_right, pad_bottom, pad_left, insightface = None
):
p_x1, p_y1, p_x2, p_y2 = get_mask_bbox_with_padding(mask.squeeze(0), pad_top, pad_right, pad_bottom, pad_left)
mask = mask[:, p_y1:p_y2, p_x1:p_x2]
image = image[:, p_y1:p_y2, p_x1:p_x2]
kps = get_kps_from_image(image, insightface) if insightface else None
_, original_height, original_width, _ = image.shape
if resize_mode == "auto":
width, height = resize_to_fit_area(int(p_x2 - p_x1), int(p_y2 - p_y1), width, height)
else:
if resize_mode != "free":
ratio = original_width / original_height
if resize_mode == "scale by width":
height = int(width / ratio)
if resize_mode == "scale by height":
width = int(height * ratio)
width = (width // 8) * 8
height = (height // 8) * 8
mask = mask.reshape((-1, 1, mask.shape[-2], mask.shape[-1])).movedim(1, -1).expand(-1, -1, -1, 3)
image = image.movedim(-1,1)
mask = mask.movedim(-1,1)
mask = comfy.utils.common_upscale(mask, width, height, "bilinear", "disabled")
image = comfy.utils.common_upscale(image, width, height, upscale_method, "disabled")
mask = mask.movedim(1,-1)
mask = mask[:, :, :, 0]
image = image.movedim(1,-1)
_, new_height, new_width = mask.shape
if kps is not None:
kps *= [image.shape[2] / original_width, image.shape[1] / original_height]
control_image = draw_kps(width, height, kps)
control_image = (torch.from_numpy(control_image).float() / 255.0).unsqueeze(0)
return (
image, mask,
control_image if kps is not None else None,
p_x1, p_y1, original_width, original_height,
new_width, new_height,
)
#==============================================================================
class PreprocessImage(PreprocessImageAdvanced):
def __init__(self):
pass
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"image": ("IMAGE",),
"mask": ("MASK",),
"width": ("INT", {"default": 1024, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
"height": ("INT", {"default": 1024, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
"resize_mode": (self.resize_modes,),
"pad": ("INT", {"default": 100, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
},
"optional": {
"insightface": ("INSIGHTFACE_APP",),
}
}
FUNCTION = "preprocess_image_simple"
CATEGORY = CATEGORY_NAME
def preprocess_image_simple(self, image, mask, width, height, resize_mode, pad, insightface = None):
return self.preprocess_image(
image, mask, width, height, resize_mode, "bilinear", pad, pad, pad, pad, insightface
)
#==============================================================================
class LoadInsightface:
def __init__(self):
pass
@classmethod
def INPUT_TYPES(self):
return {}
RETURN_TYPES = ("INSIGHTFACE_APP",)
RETURN_NAMES = ("insightface",)
FUNCTION = "load_insightface"
CATEGORY = CATEGORY_NAME
def load_insightface(self):
app = FaceAnalysis(
name="antelopev2",
root=INSIGHTFACE_PATH,
providers=["CPUExecutionProvider", "CUDAExecutionProvider"]
)
app.prepare(ctx_id=0, det_size=(640, 640))
return (app,)
#==============================================================================
class KpsDraw:
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"width": ("INT", {"default": 1024, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
"height": ("INT", {"default": 1024, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
"kps": ("HIDDEN_STRING_JSON", ),
},
"optional": {
"image_reference": ("IMAGE",),
}
}
RETURN_TYPES = ("KPS_DATA",)
RETURN_NAMES = ("kps_data",)
FUNCTION = "draw_kps"
CATEGORY = CATEGORY_NAME
def draw_kps(self, width, height, kps, image_reference = None):
return (kps,)
#==============================================================================
class Kps3dFromImage:
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"width": ("INT", {"default": 1024, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
"height": ("INT", {"default": 1024, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
"kps": ("HIDDEN_STRING_JSON", ),
},
"optional": {
"image": ("IMAGE",),
}
}
RETURN_TYPES = ("KPS_DATA_3D", "KPS_DATA",)
RETURN_NAMES = ("kps_data_3d", "kps_data")
FUNCTION = "make_kps"
CATEGORY = CATEGORY_NAME
def make_kps(self, width, height, kps, image):
kps_2d = kps3d_to_kps2d(json.loads(kps))
return (kps, json.dumps(kps_2d),)
#==============================================================================
class KpsMaker:
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"kps_data": ("KPS_DATA",),
}
}
RETURN_TYPES = ("IMAGE",)
RETURN_NAMES = ("control_image",)
FUNCTION = "draw_kps"
CATEGORY = CATEGORY_NAME
def draw_kps(self, kps_data):
kps_data = json.loads(kps_data)
control_image = draw_kps(kps_data['width'], kps_data["height"], kps_data["array"], alphas = kps_data["opacities"])
control_image = (torch.from_numpy(control_image).float() / 255.0).unsqueeze(0)
return (control_image, )
#==============================================================================
class Kps2dRandomizer:
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"kps_data": ("KPS_DATA",),
"seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff, "tooltip": "The random seed used for randomizing KPS"}),
"angle_min": ("INT", {"default": 0, "min": -180, "step": 1, "max": 180}),
"angle_max": ("INT", {"default": 0, "min": -180, "step": 1, "max": 180}),
"scale_min": ("FLOAT", {"default": 1, "min": 0.1, "step": 0.01, "max": 5}),
"scale_max": ("FLOAT", {"default": 1, "min": 0.1, "step": 0.01, "max": 5}),
"translate_x": ("INT", {"default": 0, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
"translate_y": ("INT", {"default": 0, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
"border": ("INT", {"default": 0, "min": 0, "step": 1, "max": MAX_RESOLUTION}),
}
}
RETURN_TYPES = ("KPS_DATA",)
RETURN_NAMES = ("kps_data",)
FUNCTION = "rand_kps"
CATEGORY = CATEGORY_NAME
def rand_kps(self, kps_data, seed, angle_min, angle_max, scale_min, scale_max, translate_x, translate_y, border):
torch.manual_seed(seed)
kps_data = json.loads(kps_data)
angle = 0
scale = 1
width = kps_data['width']
height = kps_data['height']
# get random angle
if angle_min != 0 and angle_max != 0:
angle = torch.randint(angle_min, angle_max + 1, (1,)).item()
# get random scale
if scale_min != 1 and scale_max != 1:
scale = (scale_max - scale_min) * torch.rand(1).item() + scale_min
# get random translate_x and translate_y
if translate_x != 0:
random_translate_x = torch.randint(-int(translate_x), int(translate_x) + 1, (1,)).item()
else:
random_translate_x = 0
if translate_y != 0:
random_translate_y = torch.randint(-int(translate_y), int(translate_y) + 1, (1,)).item()
else:
random_translate_y = 0
# rotate
if angle != 0:
centroid = np.mean(np.array(kps_data["array"]), axis=0)
angle_rad = np.radians(angle)
rotated_points = []
for x, y in kps_data["array"]:
translated_x = x - centroid[0]
translated_y = y - centroid[1]
rotated_x = translated_x * np.cos(angle_rad) - translated_y * np.sin(angle_rad)
rotated_y = translated_x * np.sin(angle_rad) + translated_y * np.cos(angle_rad)
rotated_points.append([rotated_x + centroid[0], rotated_y + centroid[1]])
kps_data["array"] = rotated_points
# translate
if random_translate_x != 0 or random_translate_y != 0:
translated_points = []
for x, y in kps_data["array"]:
translated_points.append([x + random_translate_x, y + random_translate_y])
kps_data["array"] = translated_points
# scale
if scale_min != 1 and scale_max != 1:
scaled_points = []
centroid = np.mean(np.array(kps_data["array"]), axis=0)
for x, y in kps_data["array"]:
scaled_points.append([
centroid[0] + (x - centroid[0]) * scale,
centroid[1] + (y - centroid[1]) * scale
])
kps_data["array"] = scaled_points
# check border
x_values = [x for x, _ in kps_data["array"]]
y_values = [y for _, y in kps_data["array"]]
min_x, max_x = min(x_values), max(x_values)
min_y, max_y = min(y_values), max(y_values)
shift_x = 0
shift_y = 0
if min_x < border:
shift_x = border - min_x
elif max_x > width - border:
shift_x = (width - border) - max_x
if min_y < border:
shift_y = border - min_y
elif max_y > height - border:
shift_y = (height - border) - max_y
final_output = []
for x, y in kps_data["array"]:
shifted_x = x + shift_x
shifted_y = y + shift_y
final_output.append([int(shifted_x), int(shifted_y)])
kps_data["array"] = final_output
return (json.dumps(kps_data), )
#==============================================================================
class Kps3dRandomizer:
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"kps_data_3d": ("KPS_DATA_3D",),
"seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff, "tooltip": "The random seed used for randomizing KPS"}),
"rotate_x": ("INT", {"default": 0, "min": -180, "step": 1, "max": 180}),
"rotate_y": ("INT", {"default": 0, "min": -180, "step": 1, "max": 180}),
"rotate_z": ("INT", {"default": 0, "min": -180, "step": 1, "max": 180})
}
}
RETURN_TYPES = ("KPS_DATA",)
RETURN_NAMES = ("kps_data",)
FUNCTION = "rand_kps"
CATEGORY = CATEGORY_NAME
def rand_kps(self, kps_data_3d, seed, rotate_x, rotate_y, rotate_z):
torch.manual_seed(seed)
kps_data = json.loads(kps_data_3d)
angle_x = 0
if rotate_x != 0:
angle_x = torch.randint(-rotate_x, rotate_x + 1, (1,)).item()
angle_y = 0
if rotate_y != 0:
angle_y = torch.randint(-rotate_y, rotate_y + 1, (1,)).item()
angle_z = 0
if rotate_x != 0:
angle_z = torch.randint(-rotate_z, rotate_z + 1, (1,)).item()
angle_x += kps_data['rotateX']
angle_y += kps_data['rotateY']
angle_z += kps_data['rotateZ']
if angle_x != 0 or angle_y != 0 or angle_z != 0:
points = kps_rotate_3d(kps_data['array'], angle_x, angle_y, angle_z)
else:
points = kps_data['array']
kps_data['array'] = points
kps_data = kps3d_to_kps2d(kps_data)
return (json.dumps(kps_data), )
#==============================================================================
class Kps2dScaleBy:
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"kps_data": ("KPS_DATA",),
"scale": ("FLOAT", {"default": 1, "min": 0, "max": 100}),
}
}
RETURN_TYPES = ("KPS_DATA",)
RETURN_NAMES = ("kps_data",)
FUNCTION = "scale_kps_by"
CATEGORY = CATEGORY_NAME
def scale_kps_by(self, kps_data, scale):
kps_data = json.loads(kps_data)
points = kps_data['array']
kps_data['width'] = int(kps_data['width'] * scale)
kps_data['height'] = int(kps_data['height'] * scale)
for i, point in enumerate(points):
kps_data['array'][i][0] = int(point[0] * scale)
kps_data['array'][i][1] = int(point[1] * scale)
return (json.dumps(kps_data), )
#==============================================================================
class Kps2dScale:
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"kps_data": ("KPS_DATA",),
"width": ("INT", {"default": 1024, "min": 0, "max": MAX_RESOLUTION}),
"height": ("INT", {"default": 1024, "min": 0, "max": MAX_RESOLUTION}),
}
}
RETURN_TYPES = ("KPS_DATA",)
RETURN_NAMES = ("kps_data",)
FUNCTION = "scale_kps"
CATEGORY = CATEGORY_NAME
def scale_kps(self, kps_data, width, height):
kps_data = json.loads(kps_data)
points = kps_data['array']
scaleX = width / kps_data['width']
scaleY = height / kps_data['height']
kps_data['width'] = int(kps_data['width'] * scaleX)
kps_data['height'] = int(kps_data['height'] * scaleY)
for i, point in enumerate(points):
kps_data['array'][i][0] = int(point[0] * scaleX)
kps_data['array'][i][1] = int(point[1] * scaleY)
return (json.dumps(kps_data), )
#==============================================================================
class Kps2dRotate:
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"kps_data": ("KPS_DATA",),
"angle": ("FLOAT", {"default": 0.0, "min": -360.0, "step": 0.1, "max": 360.0},),
"counter_clockwise": ("BOOLEAN", {"default": True},),
}
}
RETURN_TYPES = ("KPS_DATA",)
RETURN_NAMES = ("kps_data",)
FUNCTION = "rotate_kps"
CATEGORY = CATEGORY_NAME
def rotate_kps(self, kps_data, angle, counter_clockwise):
if angle == 0 or angle == 360:
return (kps_data,)
if counter_clockwise: angle = -angle
kps_data = json.loads(kps_data)
points = kps_data['array']
new_width, new_height = calculate_size_after_rotation(kps_data['width'], kps_data['height'], angle)
kps_data['array'] = kps_rotate_2d(points, kps_data['width'], kps_data['height'], int(new_width), int(new_height), angle)
kps_data['width'] = int(new_width)
kps_data['height'] = int(new_height)
return (json.dumps(kps_data), )
#==============================================================================
class Kps2dCrop:
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"kps_data": ("KPS_DATA",),
"x": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 1}),
"y": ("INT", {"default": 0, "min": 0, "max": MAX_RESOLUTION, "step": 1}),
"width": ("INT", {"default": 1024, "min": 1, "max": MAX_RESOLUTION, "step": 1}),
"height": ("INT", {"default": 1024, "min": 1, "max": MAX_RESOLUTION, "step": 1}),
}
}
RETURN_TYPES = ("KPS_DATA",)
RETURN_NAMES = ("kps_data",)
FUNCTION = "crop_kps"
CATEGORY = CATEGORY_NAME
def crop_kps(self, kps_data, x, y, width, height):
kps_data = json.loads(kps_data)
kps_data['width'] = width
kps_data['height'] = height
points = kps_data['array']
for i, point in enumerate(points):
kps_data['array'][i][0] = point[0] - x#
kps_data['array'][i][1] = point[1] - y#
return (json.dumps(kps_data), )
#==============================================================================
class MaskFromKps:
@classmethod
def INPUT_TYPES(self):
return {
"required": {
"kps_data": ("KPS_DATA",),
"grow_by": ("INT", {"default": 4, "min": 1, "max": 10, "step": 1}),
}
}
RETURN_TYPES = ("MASK",)
RETURN_NAMES = ("mask",)
FUNCTION = "creat_mask"
CATEGORY = CATEGORY_NAME
def creat_mask(self, kps_data, grow_by):
kps_data = json.loads(kps_data)
bbox = get_bbox_from_kps(kps_data, grow_by)
mask = torch.zeros((kps_data['height'], kps_data['width']))
mask[bbox[0][1]:bbox[1][1], bbox[0][0]:bbox[1][0]] = 1
return (mask.unsqueeze(0), )
NODE_CLASS_MAPPINGS = {
"LoadInsightface": LoadInsightface,
"LoadInstantIdAdapter": LoadInstantIdAdapter,
"InstantIdAdapterApply": InstantIdAdapterApply,
"ControlNetInstantIdApply": ControlNetInstantIdApply,
"InstantIdAndControlnetApply": InstantIdAndControlnetApply,
"PreprocessImage": PreprocessImage,
"PreprocessImageAdvanced": PreprocessImageAdvanced,
"AngleFromFace": AngleFromFace,
"AngleFromKps": AngleFromKps,
"RotateImage": RotateImage,
"ComposeRotated": ComposeRotated,
"KpsDraw": KpsDraw,
"Kps3dFromImage": Kps3dFromImage,
"KpsMaker": KpsMaker,
"Kps2dRandomizer": Kps2dRandomizer,
"Kps3dRandomizer": Kps3dRandomizer,
"KpsScale": Kps2dScale,
"KpsScaleBy": Kps2dScaleBy,
"KpsRotate": Kps2dRotate,
"KpsCrop": Kps2dCrop,
"MaskFromKps": MaskFromKps,
"FaceEmbed": FaceEmbed,
"FaceEmbedCombine": FaceEmbedCombine
}
NODE_DISPLAY_NAME_MAPPINGS = {
"LoadInsightface": "Load insightface",
"LoadInstantIdAdapter": "Load instantId adapter",
"InstantIdAdapterApply": "Apply instantId adapter",
"ControlNetInstantIdApply": "Apply instantId ControlNet",
"InstantIdAndControlnetApply": "Apply instantId and ControlNet",
"PreprocessImage": "Preprocess image for instantId",
"PreprocessImagAdvancese": "Preprocess image for instantId (Advanced)",
"AngleFromFace": "Get Angle from face",
"AngleFromKps": "Get Angle from KPS data",
"RotateImage": "Rotate Image",
"ComposeRotated": "Remove rotation padding",
"KpsDraw": "Draw KPS",
"Kps3dFromImage": "3d KPS from image",
"KpsMaker": "Create KPS Image",
"Kps2dRandomizer": "Randomize 2d KPS",
"Kps3dRandomizer": "Randomize 3d KPS",
"Kps2dScaleBy": "Scale 2d KPS by",
"Kps2dScale": "Scale 2d KPS",
"KpsRotate": "Rotate 2d KPS",
"KpsCrop": "Crop 2d KPS",
"MaskFromKps": "Create mask from Kps",
"FaceEmbed": "FaceEmbed for instantId",
"FaceEmbedCombine": "FaceEmbed Combine"
}
================================================
FILE: pyproject.toml
================================================
[project]
name = "comfyui-instantid-faceswap"
description = "Implementation of [a/faceswap](https://github.com/nosiu/InstantID-faceswap/tree/main) based on [a/InstantID](https://github.com/InstantID/InstantID) for ComfyUI."
version = "0.1.1"
license = { file = "LICENSE.txt" }
dependencies = ["insightface", "onnxruntime-gpu"]
[project.urls]
Repository = "https://github.com/nosiu/comfyui-instantId-faceswap"
[tool.comfy]
PublisherId = "nosiu"
DisplayName = "comfyui-instantId-faceswap"
Icon = ""
================================================
FILE: requirements.txt
================================================
insightface
onnxruntime-gpu
================================================
FILE: ui/dialogs.js
================================================
import { createShader, vertexShaderSrc, fragmentShaderSrc } from "./shaders.js"
import { getPointsCenter, drawKps, checkWebGlSupport, rotatePoints3D } from "./helpers.js"
import { createSlider, createButton, createRadiobox } from "./uiHelpers.js"
class KPSDialogBase {
constructor(w, h, img = undefined) {
this.isDragging = false
this.draggedPointIndex = null
this.mousedown_x = undefined
this.mousedown_y = undefined
this.mousedown_pan_x = undefined
this.mousedown_pan_y = undefined
this.pan_x = 0
this.pan_y = 0
this.cursorX = undefined
this.cursorY = undefined
this.zoom_ratio = 1
this.min_zoom = undefined
this.showOpacities = false
if (img) {
this.canvasWidth = img.width
this.canvasHeight = img.height
} else {
this.canvasWidth = w
this.canvasHeight = h
}
// ---------------------------------
this.element = document.createElement("div")
this.element.style.display = "none"
this.element.style.width = "80vw"
this.element.style.height = "80vh"
this.element.style.zIndex = 8888
this.element.classList.add('comfy-modal')
this.element.classList.add('kps-sandbox')
document.body.appendChild(this.element)
this.canvas = document.createElement("canvas")
this.canvas.style.position = "absolute"
this.canvas.style.pointerEvents = "auto"
this.canvas.style.zIndex = "-1"
this.element.appendChild(this.canvas)
this.canvas.width = this.canvasWidth
this.canvas.height = this.canvasHeight
}
initializeCanvasPanZoom () {
let drawWidth = this.canvasWidth;
let drawHeight = this.canvasHeight;
let width = this.element.clientWidth;
let height = this.element.clientHeight;
if (this.canvasWidth > width) {
drawWidth = width;
drawHeight = drawWidth / this.canvasWidth * this.canvasHeight;
}
if (drawHeight > height) {
drawHeight = height;
drawWidth = drawHeight / this.canvasHeight * this.canvasWidth;
}
this.zoom_ratio = drawWidth / this.canvasWidth;
this.min_zoom = drawWidth / this.canvasWidth
const canvasX = (width - drawWidth) / 2;
const canvasY = (height - drawHeight) / 2;
this.pan_x = canvasX;
this.pan_y = canvasY;
this.invalidatePanZoom();
}
invalidatePanZoom () {
let raw_width = this.canvasWidth * this.zoom_ratio;
let raw_height = this.canvasHeight * this.zoom_ratio;
if (this.pan_x + raw_width < 10) {
this.pan_x = 10 - raw_width;
}
if (this.pan_y + raw_height < 10) {
this.pan_y = 10 - raw_height;
}
this.canvas.style.width = `${raw_width}px`;
this.canvas.style.height = `${raw_height}px`;
this.canvas.style.left = `${this.pan_x}px`;
this.canvas.style.top = `${this.pan_y}px`;
if (this.hasImage) {
this.imageCanvas.style.width = `${raw_width}px`;
this.imageCanvas.style.height = `${raw_height}px`;
this.imageCanvas.style.left = `${this.pan_x}px`;
this.imageCanvas.style.top = `${this.pan_y}px`;
}
}
setBasicControls () {
const buttonBar = document.createElement("div")
buttonBar.id = "instantIdButtonBar"
buttonBar.style.position = "absolute"
buttonBar.style.bottom = "0"
buttonBar.style.height = "50px"
buttonBar.style.left = "20px"
buttonBar.style.right = "20px"
buttonBar.style.pointerEvents = "none"
buttonBar.appendChild(createButton("Save", true, this.save.bind(this)))
buttonBar.appendChild(createButton("Cancel", true, this.closeModal.bind(this)))
buttonBar.appendChild(createButton("Reset pan & zoom", false, () => {
this.initializeCanvasPanZoom();
}));
buttonBar.appendChild(createButton("Reset KPS", false, () => {
this.kps = this.getDefaultKps();
this.draw();
}));
buttonBar.appendChild(this.createZoomSlider())
this.element.appendChild(buttonBar);
// ----------------------
const opacitiesButton = createButton(
"Opacity options", false, () => {
this.showOpacities = !this.showOpacities
if (this.showOpacities) {
opacitiesButton.innerText = "Hide options"
const advancedDiv = document.createElement("div")
advancedDiv.style.overflow = "auto"
advancedDiv.id = "kpsDialog0"
advancedDiv.style.padding = "20px"
advancedDiv.style.paddingTop = "50px"
advancedDiv.style.width = "200px"
advancedDiv.style.height = "100%"
advancedDiv.style.position = "absolute"
advancedDiv.style.display = "flex"
advancedDiv.style.left = "0"
advancedDiv.style.top = "0"
advancedDiv.style.backgroundColor = "black"
advancedDiv.style.color = "white"
const radioBar = document.createElement("div");
radioBar.style.marginTop = "20px"
radioBar.style.pointerEvents = "auto"
radioBar.appendChild(createRadiobox("red", "red opacity", this.kpsOpacities, 0, this.draw.bind(this)))
radioBar.appendChild(createRadiobox("green", "green opacity", this.kpsOpacities, 1, this.draw.bind(this)))
radioBar.appendChild(createRadiobox("blue", "blue opacity", this.kpsOpacities, 2, this.draw.bind(this)))
radioBar.appendChild(createRadiobox("yellow", "yellow opacity", this.kpsOpacities, 3, this.draw.bind(this)))
radioBar.appendChild(createRadiobox("purple", "purple opacity", this.kpsOpacities, 4, this.draw.bind(this)))
advancedDiv.appendChild(radioBar);
this.element.appendChild(advancedDiv)
} else {
opacitiesButton.innerText = "Opacity options"
const el = document.querySelector("#kpsDialog0")
if (el) el.remove()
}
}
)
opacitiesButton.style.zIndex = 8889
opacitiesButton.style.position = "absolute"
this.element.appendChild(opacitiesButton);
}
createZoomSlider () {
const el = createSlider("Zoom", "instantIdZoomSlider", this.min_zoom, "2", "0.1", this.zoom_ratio, (event) => {
this.zoom_ratio = parseFloat(event.target.value)
this.invalidatePanZoom()
})
return el
}
drawMoveAll () {
const pad = 20
const w = 60
const ctx = this.canvas.getContext('2d')
let x = this.kps.reduce((a, b) => a[0] > b[0] ? a : b)[0] + pad
let y = this.kps.reduce((a, b) => a[1] > b[1] ? a : b)[1] + pad
ctx.beginPath();
ctx.fillStyle = "rgb(8, 105, 216)";
ctx.beginPath();
ctx.rect(x, y, w, w);
ctx.fill();
ctx.font = '40px Arial';
ctx.fillStyle = 'white';
ctx.textAlign = 'center';
ctx.fillText('M', x + 30, y + 40);
}
}
export class KPSDialog2d extends KPSDialogBase{
constructor(w, h, referenceImage, angleWidget, kpsJsonWidget) {
super(w, h, referenceImage)
this.hasImage = referenceImage ? true : false
if (this.hasImage) {
this.opacity = "0.6"
} else {
this.opacity = "1"
}
this.kpsOpacities = kpsJsonWidget.value.opacities.length ? JSON.parse(JSON.stringify(kpsJsonWidget.value.opacities)) : [1, 1, 1, 1, 1]
this.kps = kpsJsonWidget.value.array.length ? JSON.parse(JSON.stringify(kpsJsonWidget.value.array)) : this.getDefaultKps()
this.angleWidget = angleWidget
this.kpsJsonWidget = kpsJsonWidget
if (this.hasImage) {
this.imageCanvas = document.createElement("canvas")
this.imageCanvas.style.position = "absolute"
this.imageCanvas.style.zIndex = "-2"
this.imageCanvas.style.pointerEvents = "none"
this.element.appendChild(this.imageCanvas)
this.imageCanvas.width = this.canvasWidth
this.imageCanvas.height = this.canvasHeight
}
this.setBasicControls()
this.setControls()
this.attachListeners()
this.canvas.style.opacity = this.opacity
this.element.style.display = "block"
this.initializeCanvasPanZoom()
this.draw()
if (this.hasImage) this.drawImage(referenceImage)
}
getDefaultKps () {
const halfWidth = this.canvasWidth / 2;
const halfHeight = this.canvasHeight / 2;
return [
[halfWidth - halfWidth / 2, halfHeight - halfHeight / 2],
[halfWidth + halfWidth / 2, halfHeight - halfHeight / 2],
[halfWidth, halfHeight],
[halfWidth - halfWidth / 2, halfHeight + halfHeight / 2],
[halfWidth + halfWidth / 2, halfHeight + halfHeight / 2],
]
}
setControls () {
const buttonBar = document.querySelector("#instantIdButtonBar")
if (this.hasImage) {
buttonBar.appendChild(this.createOpacitySlider())
}
}
createOpacitySlider () {
const el = createSlider("Opacity", "instantIdOpacitySlider", "0.1", "1", "0.1", this.opacity, (event) => {
this.opacity = event.target.value
this.canvas.style.opacity = event.target.value
})
return el
}
attachListeners () {
this.canvas.addEventListener('mousedown', this.mouseDown.bind(this))
this.canvas.addEventListener('mousemove', this.mouseMove.bind(this))
this.canvas.addEventListener('mouseup', this.mouseUp.bind(this))
this.element.addEventListener('wheel', this.wheel.bind(this))
this.element.addEventListener('DOMMouseScroll', (e) => e.preventDefault()) // thanks firefox.
this.element.addEventListener('keydown', (event) => {
if (event.key === "Escape") {
this.closeModal()
} else if (event.key === "ENTER") {
this.save()
}
})
}
closeModal () {
document.body.removeChild(this.element)
}
async save () {
const minX = Math.min(...this.kps.map(e => e[0]))
const maxX = Math.max(...this.kps.map(e => e[0]))
const minY = Math.min(...this.kps.map(e => e[1]))
const maxY = Math.max(...this.kps.map(e => e[1]))
this.kpsJsonWidget.value = {
array: this.kps,
opacities: this.kpsOpacities,
width: this.canvasWidth,
height: this.canvasHeight,
bbox: [
[
Math.max(Math.ceil(minX - ((maxX - minX) /3)), 0),
Math.max(Math.ceil(minY - ((maxY - minY) /3)), 0)
],
[
Math.min(Math.ceil(maxX + ((maxX - minX) /3)), this.canvasWidth),
Math.min(Math.ceil(maxY + ((maxY - minY) /3)), this.canvasHeight)
],
]
}
this.kpsJsonWidget.callback()
const a = this.kps[0]
const b = this.kps[1]
let angle = Math.atan2(b[1] - a[1], b[0] - a[0]) * 180 / Math.PI
this.angleWidget.value = angle
this.closeModal()
}
changePointsPosition(closer = false, step = 10) {
step /= this.zoom_ratio;
const center = this.kps[2]
const points = this.kps
const magnitudes = points.map((point, index) => {
if (index === 2) return Infinity; // Skip the center point (no magnitude calculation)
const direction = [center[0] - point[0], center[1] - point[1]]
return Math.sqrt(direction[0] * direction[0] + direction[1] * direction[1])
});
const allGreaterThan50 = magnitudes.every(mag => mag > 10)
return points.map((point, index) => {
if (index === 2) return point
const direction = [center[0] - point[0], center[1] - point[1]]
const magnitude = magnitudes[index]
const scaleFactor = closer ? (magnitude - step) / magnitude : (magnitude + step) / magnitude;
const scaledMoveVector = [direction[0] * scaleFactor, direction[1] * scaleFactor];
if (closer) {
if (allGreaterThan50) {
return [
center[0] - scaledMoveVector[0],
center[1] - scaledMoveVector[1]
];
}
return point
} else {
return [
center[0] - scaledMoveVector[0],
center[1] - scaledMoveVector[1]
];
}
});
}
mouseDown (event) {
event.preventDefault()
const { offsetX: mouseX, offsetY: mouseY } = event
if (event.ctrlKey) {
if (event.buttons == 1) {
this.mousedown_x = event.clientX
this.mousedown_y = event.clientY
this.mousedown_pan_x = this.pan_x
this.mousedown_pan_y = this.pan_y
}
return;
} else {
let maxX = -Infinity
let maxY = -Infinity
this.kps.forEach((kp, idx) => {
let [x, y] = kp;
x *= this.zoom_ratio
y *= this.zoom_ratio
maxX = x > maxX ? x : maxX
maxY = y > maxY ? y : maxY
const distance = Math.sqrt((x - mouseX) ** 2 + (y - mouseY) ** 2)
if (distance < 20 * (this.zoom_ratio)) {
this.isDragging = true;
this.draggedPointIndex = idx;
return;
}
});
maxX += 20 * this.zoom_ratio
maxY += 20 * this.zoom_ratio
if ((mouseX >= maxX) && (mouseY >= maxY) && (mouseX < maxX + 60 * this.zoom_ratio) && (mouseY < maxY + 60 * this.zoom_ratio)){
this.mousedown_x = event.clientX;
this.mousedown_y = event.clientY;
this.isDragging = true;
this.draggedPointIndex = -1;
}
}
}
mouseMove (event) {
event.preventDefault();
const { offsetX: mouseX, offsetY: mouseY } = event
this.cursorX = event.pageX
this.cursorY = event.pageY
if (event.ctrlKey) {
if (event.buttons == 1) {
if (this.mousedown_x) {
let deltaX = this.mousedown_x - event.clientX
let deltaY = this.mousedown_y - event.clientY
this.pan_x = this.mousedown_pan_x - deltaX
this.pan_y = this.mousedown_pan_y - deltaY
this.invalidatePanZoom()
}
}
}
if (this.isDragging) {
const transformedX = (mouseX) / this.zoom_ratio
const transformedY = (mouseY) / this.zoom_ratio
if(this.draggedPointIndex !== null && this.draggedPointIndex > -1) {
this.kps[this.draggedPointIndex] = [transformedX, transformedY]
} else if (this.draggedPointIndex === -1) {
let deltaX = this.mousedown_x - event.clientX
let deltaY = this.mousedown_y - event.clientY
this.mousedown_x = event.clientX
this.mousedown_y = event.clientY
this.kps.forEach(el => {
el[0] -= deltaX / this.zoom_ratio
el[1] -= deltaY / this.zoom_ratio
})
}
this.draw()
}
}
mouseUp (event) {
event.preventDefault()
this.mousedown_x = null
this.mousedown_y = null
this.isDragging = false
this.draggedPointIndex = null
}
wheel (event) {
event.preventDefault()
if (event.ctrlKey) {
if (event.deltaY < 0) {
this.zoom_ratio = Math.min(2, this.zoom_ratio + 0.2)
} else {
this.zoom_ratio = Math.max(this.min_zoom, this.zoom_ratio - 0.2)
}
document.querySelector("#instantIdZoomSlider input").value = `${this.zoom_ratio}`
this.invalidatePanZoom();
}
else if (event.altKey) {
this.kps = this.changePointsPosition(event.deltaY > 0)
this.draw()
}
}
draw () {
this.drawKeyPoints()
this.drawMoveAll()
}
drawKeyPoints (canvas = this.canvas) {
drawKps(canvas, this.kps, this.kpsOpacities)
}
drawImage (ref_image) {
/*
webgl2 is used to render the reference background
with masked images it is impossible to get pixel values
*/
if (checkWebGlSupport()) {
const gl = this.imageCanvas.getContext("webgl2");
this.drawImageWebGL2(gl, ref_image)
return
}
const ctx = this.imageCanvas.getContext("2d")
ctx.drawImage(ref_image, 0, 0);
}
drawImageWebGL2 (gl, image) {
const program = gl.createProgram()
const vertexShader = createShader(gl, gl.VERTEX_SHADER, vertexShaderSrc)
const fragmentShader = createShader(gl, gl.FRAGMENT_SHADER, fragmentShaderSrc)
if (!vertexShader || !fragmentShader) {
return;
}
gl.attachShader(program, vertexShader)
gl.attachShader(program, fragmentShader)
gl.linkProgram(program);
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
console.error(gl.getProgramInfoLog(program))
return;
}
gl.useProgram(program);
const buffer = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
gl.bufferData(
gl.ARRAY_BUFFER,
new Float32Array([
-1, 1, 0, 1,
-1, -1, 0, 0,
1, 1, 1, 1,
1, -1, 1, 0,
]),
gl.STATIC_DRAW
)
gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 4 * 4, 0)
gl.enableVertexAttribArray(0)
gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 4 * 4, 2 * 4)
gl.enableVertexAttribArray(1)
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
gl.activeTexture(gl.TEXTURE0)
gl.uniform1i(gl.getUniformLocation(program, 'uSampler'), 0)
const texture = gl.createTexture()
gl.bindTexture(gl.TEXTURE_2D, texture)
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, this.imageCanvas.width, this.imageCanvas.height, 0, gl.RGB, gl.UNSIGNED_BYTE, image)
gl.generateMipmap(gl.TEXTURE_2D)
gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4)
}
}
export class KPSDialog3d extends KPSDialogBase{
constructor(w, h, angleWidget, kpsJsonWidget) {
super(w, h)
this.showLandmarks = false
this.defaultKpsData = kpsJsonWidget.value.defaultKpsData
this.kpsOpacities = kpsJsonWidget.value.opacities.length ? JSON.parse(JSON.stringify(kpsJsonWidget.value.opacities)) : [1, 1, 1, 1, 1]
this.kps = JSON.parse(JSON.stringify(kpsJsonWidget.value.array))
this.angleWidget = angleWidget
this.kpsJsonWidget = kpsJsonWidget
const landmarks = [
'jawline', 'eyebrow_left', 'eyebrow_right', 'nose_bridge', 'nose_lower',
'eye_left', 'eye_right', 'mouth_outer', 'mouth_inner'
]
landmarks.forEach(el => {
this[el] = kpsJsonWidget.value[el].length ? JSON.parse(JSON.stringify(kpsJsonWidget.value[el])) : []
})
this.rotateX = kpsJsonWidget.value.rotateX || 0
this.rotateY = kpsJsonWidget.value.rotateY || 0
this.rotateZ = kpsJsonWidget.value.rotateZ || 0
this.setBasicControls()
this.setControls()
this.attachListeners()
this.element.style.display = "block"
this.initializeCanvasPanZoom()
this.draw()
if (this.hasImage) this.drawImage(referenceImage)
}
getDefaultKps () {
try {
const data = JSON.parse(this.defaultKpsData)
const landmarks = [
'jawline', 'eyebrow_left', 'eyebrow_right', 'nose_bridge', 'nose_lower',
'eye_left', 'eye_right', 'mouth_outer', 'mouth_inner'
]
landmarks.forEach(el => {
this[el] = data[el]
})
return data.array
} catch (e) {
console.error(e)
}
}
setControls () {
const buttonBar = document.querySelector("#instantIdButtonBar")
buttonBar.appendChild(this.createRotationXSlider())
buttonBar.appendChild(this.createRotationYSlider())
buttonBar.appendChild(this.createRotationZSlider())
this.element.appendChild(buttonBar);
}
createRotationXSlider () {
const el = createSlider("rotate X", "instantIdRotateX", "0", "360", "1", this.rotateX, (event) => {
this.rotateX = parseFloat(event.target.value)
this.draw()
})
return el
}
createRotationYSlider () {
const el = createSlider("rotate Y", "instantIdRotateY", "0", "360", "1", this.rotateY, (event) => {
this.rotateY = parseFloat(event.target.value)
this.draw()
})
return el
}
createRotationZSlider () {
const el = createSlider("rotate Z", "instantIdRotateZ", "0", "360", "1", this.rotateZ, (event) => {
this.rotateZ = parseFloat(event.target.value)
this.draw()
})
return el
}
attachListeners () {
this.canvas.addEventListener('mousedown', this.mouseDown.bind(this))
this.canvas.addEventListener('mousemove', this.mouseMove.bind(this))
this.canvas.addEventListener('mouseup', this.mouseUp.bind(this))
this.element.addEventListener('wheel', this.wheel.bind(this))
this.element.addEventListener('DOMMouseScroll', (e) => e.preventDefault()) // thanks firefox.
this.element.addEventListener('keydown', (event) => {
if (event.key === "Escape") {
this.closeModal()
} else if (event.key === "ENTER") {
this.save()
}
})
}
closeModal () {
document.body.removeChild(this.element)
}
async save () {
this.kpsJsonWidget.value = {
array: this.kps,
opacities: this.kpsOpacities.map(el => parseFloat(el)),
width: this.canvasWidth,
height: this.canvasHeight,
jawline: this.jawline,
eyebrow_left: this.eyebrow_left,
eyebrow_right: this.eyebrow_right,
nose_bridge: this.nose_bridge,
nose_lower: this.nose_lower,
eye_left: this.eye_left,
eye_right: this.eye_right,
mouth_outer: this.mouth_outer,
mouth_inner: this.mouth_inner,
rotateX: this.rotateX,
rotateY: this.rotateY,
rotateZ: this.rotateZ,
defaultKpsData: this.defaultKpsData
}
this.kpsJsonWidget.callback()
const a = this.kps[0]
const b = this.kps[1]
let angle = Math.atan2(b[1] - a[1], b[0] - a[0]) * 180 / Math.PI
this.angleWidget.value = angle
this.closeModal()
}
changePointsPosition(closer = false, step = 10) {
step /= this.zoom_ratio
const center = getPointsCenter([
...this.kps, ...this.jawline, ...this.eyebrow_left, ...this.eyebrow_right, ...this.nose_bridge,
...this.nose_lower,...this.eye_left, ...this.eye_right, ...this.mouth_outer, ...this.mouth_inner
])
const points = [
...this.kps, ...this.jawline, ...this.eyebrow_left, ...this.eyebrow_right, ...this.nose_bridge,
...this.nose_lower,...this.eye_left, ...this.eye_right, ...this.mouth_outer, ...this.mouth_inner
]
const magnitudes = points.map(point => {
const direction = [center[0] - point[0], center[1] - point[1], center[2] - point[2]]
return Math.sqrt(direction[0] * direction[0] + direction[1] * direction[1] + direction[2] * direction[2])
})
const allGreaterThan50 = magnitudes.every(mag => mag > 10)
points.forEach((point, index) => {
const direction = [center[0] - point[0], center[1] - point[1], center[2] - point[2]]
const magnitude = magnitudes[index]
const unitVector = [direction[0] / magnitude, direction[1] / magnitude, direction[2] / magnitude]
const scaleFactor = magnitude / Math.max(...magnitudes)
const adjustedStep = step * scaleFactor
const moveVector = [unitVector[0] * adjustedStep, unitVector[1] * adjustedStep, unitVector[2] * adjustedStep]
if (closer) {
if (allGreaterThan50) {
point[0] += moveVector[0]
point[1] += moveVector[1]
point[2] += moveVector[2]
}
} else {
point[0] -= moveVector[0]
point[1] -= moveVector[1]
point[2] -= moveVector[2]
}
})
}
mouseDown (event) {
event.preventDefault()
const { offsetX: mouseX, offsetY: mouseY } = event
if (event.ctrlKey) {
if (event.buttons == 1) {
this.mousedown_x = event.clientX
this.mousedown_y = event.clientY
this.mousedown_pan_x = this.pan_x
this.mousedown_pan_y = this.pan_y
}
return;
} else {
let maxX = -Infinity
let maxY = -Infinity
this.kps.forEach((kp) => {
let [x, y] = kp
x *= this.zoom_ratio
y *= this.zoom_ratio
maxX = x > maxX ? x : maxX
maxY = y > maxY ? y : maxY
});
maxX += 20 * this.zoom_ratio
maxY += 20 * this.zoom_ratio
if ((mouseX >= maxX) && (mouseY >= maxY) && (mouseX < maxX + 60 * this.zoom_ratio) && (mouseY < maxY + 60 * this.zoom_ratio)){
this.mousedown_x = event.clientX
this.mousedown_y = event.clientY
this.isDragging = true;
this.draggedPointIndex = -1
}
}
}
mouseMove (event) {
event.preventDefault();
this.cursorX = event.pageX
this.cursorY = event.pageY
if (event.ctrlKey) {
if (event.buttons == 1) {
if (this.mousedown_x) {
let deltaX = this.mousedown_x - event.clientX
let deltaY = this.mousedown_y - event.clientY
this.pan_x = this.mousedown_pan_x - deltaX
this.pan_y = this.mousedown_pan_y - deltaY
this.invalidatePanZoom()
}
}
}
if (this.isDragging) {
let deltaX = this.mousedown_x - event.clientX
let deltaY = this.mousedown_y - event.clientY
this.mousedown_x = event.clientX
this.mousedown_y = event.clientY
const points = [
this.kps, this.jawline, this.eyebrow_left, this.eyebrow_right, this.nose_bridge,
this.nose_lower, this.eye_left, this.eye_right, this.mouth_outer, this.mouth_inner
]
points.forEach(p => {
p.forEach(el => {
el[0] -= deltaX / this.zoom_ratio
el[1] -= deltaY / this.zoom_ratio
})
})
this.draw()
}
}
mouseUp (event) {
event.preventDefault()
this.mousedown_x = null
this.mousedown_y = null
this.isDragging = false
this.draggedPointIndex = null
}
wheel (event) {
event.preventDefault()
if (event.ctrlKey) {
if (event.deltaY < 0) {
this.zoom_ratio = Math.min(2, this.zoom_ratio + 0.2)
} else {
this.zoom_ratio = Math.max(this.min_zoom, this.zoom_ratio - 0.2)
}
document.querySelector("#instantIdZoomSlider input").value = `${this.zoom_ratio}`
this.invalidatePanZoom();
}
else if (event.altKey) {
this.changePointsPosition(event.deltaY > 0)
this.draw()
}
}
draw () {
this.drawKeyPoints()
const landmarks = [
this.jawline, this.eyebrow_left, this.eyebrow_right, this.nose_bridge,
this.nose_lower, this.eye_left, this.eye_right, this.mouth_inner, this.mouth_outer
]
landmarks.forEach(points => { this.drawLandmarks(points) })
this.drawMoveAll()
}
drawLandmarks (p, canvas = this.canvas) {
if (p.length === 0) return
const ctx = canvas.getContext('2d')
const points = rotatePoints3D(p.map(el => [...el]), this.kps, this.rotateX, this.rotateY, this.rotateZ)
ctx.beginPath()
ctx.strokeStyle = "white"
for (let i = 1; i < points.length; i++) {
ctx.moveTo(points[i - 1][0], points[i - 1][1]);
ctx.lineTo(points[i][0], points[i][1]);
}
ctx.stroke()
}
drawKeyPoints (canvas = this.canvas) {
const kps = rotatePoints3D(this.kps.map(el => [...el]), this.kps, this.rotateX, this.rotateY, this.rotateZ)
drawKps(canvas, kps, this.kpsOpacities)
}
}
================================================
FILE: ui/extension.js
================================================
import { app } from "../../scripts/app.js";
import { api } from "../../scripts/api.js";
import { drawKps, normalizePoints, rotatePoints3D, getImgFromInput, getDefaultKpsData } from "./helpers.js"
import { KPSDialog2d, KPSDialog3d } from "./dialogs.js"
app.registerExtension({
getCustomWidgets(app) {
return {
HIDDEN_STRING_JSON(node, inputName, inputData) {
const widget = {
type: inputData[0],
name: inputName,
async serializeValue() {
return JSON.stringify(widget.value)
}
}
node.addCustomWidget(widget)
return widget
}
}
},
name: "ComfyUI.instantid-faceswap",
async beforeRegisterNodeDef(nodeType, nodeData, app) {
if (nodeType.comfyClass == "KpsDraw" || nodeType.comfyClass == "Kps3dFromImage") {
nodeType.prototype.showImage = function () {
let w = this.widgets.find(w => w.name === "width").value
let h = this.widgets.find(w => w.name === "height").value
if (w > 0 && h > 0) {
let kpsWidget = this.widgets.find(w => w.name === "kps")
let kps = kpsWidget.value.array
let kps_opacities = kpsWidget.value.opacities
if (kps?.length === 0) {
try {
const parsed_kps = JSON.parse(kpsWidget.value)
kps = parsed_kps.array
if (parsed_kps.opacities && parsed_kps.opacities.length) {
kps_opacities = parsed_kps.opacities
}
} catch(e) {
console.log(e)
return;
}
}
if (kps) {
const c = document.createElement("canvas")
c.width = w
c.height = h
if (kpsWidget.value.rotateX || kpsWidget.value.rotateY || kpsWidget.value.rotateZ) {
kps = rotatePoints3D(kps.map(el => [...el]), kps, kpsWidget.value.rotateX, kpsWidget.value.rotateY, kpsWidget.value.rotateZ)
}
drawKps(c, kps, kps_opacities)
const image = new Image()
image.src = c.toDataURL()
this.imgs = [image]
this.setSizeForImage()
app.graph.setDirtyCanvas(true)
}
}
}
const onNodeCreated = nodeType.prototype.onNodeCreated;
nodeType.prototype.onNodeCreated = function() {
const r = onNodeCreated ? onNodeCreated.apply(this, arguments) : undefined;
this.kpsJsonWidget = this.widgets.find(w => w.name === "kps")
this.kpsJsonWidget.callback = this.showImage.bind(this)
if (this.kpsJsonWidget.value == null) {
this.kpsJsonWidget.value = getDefaultKpsData()
}
requestAnimationFrame(() => {
if (this.kpsJsonWidget.value?.array?.length) {
this.showImage();
}
})
const angleWidget = this.addWidget("string", "angle", "", () => {})
if (nodeType.comfyClass == "Kps3dFromImage") {
const div = document.createElement("div")
div.style.fontSize = "12px"
div.style.backgroundColor = "#323334"
div.style.padding = "8px"
div.innerText = "";
this.addDOMWidget("info_text2", "", div, {getMaxHeight: () => 50})
const doMagic = this.addWidget("button", "getKPS", "", () => {
const inputNode = getImgFromInput(this.getInputNode(0))
const reference_image = inputNode.imgs[inputNode.imageIndex || 0].currentSrc
div.style.color = "white"
div.innerText = "Getting landmarks ..."
doMagic.disabled = true
openDialogWidget.disabled = true
api.fetchApi("/get_keypoints_for_instantId", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({image: reference_image})
}).then(async (data) => {
const json = await data.json()
if (json.error) {
throw Error(json.error)
}
const normalizedPoints = normalizePoints(
[
...json.data.jawline,
...json.data.eyebrow_left,
...json.data.eyebrow_right,
...json.data.nose_bridge,
...json.data.nose_lower,
...json.data.eye_left,
...json.data.eye_right,
...json.data.mouth_outer,
...json.data.mouth_inner,
...json.data.kps
],
this.widgets.find(w => w.name === "width").value, this.widgets.find(w => w.name === "height").value
)
this.kpsJsonWidget.value = getDefaultKpsData()
this.kpsJsonWidget.value.jawline = normalizedPoints.slice(0, 17)
this.kpsJsonWidget.value.eyebrow_left = normalizedPoints.slice(17, 22)
this.kpsJsonWidget.value.eyebrow_right = normalizedPoints.slice(22, 27)
this.kpsJsonWidget.value.nose_bridge = normalizedPoints.slice(27, 31)
this.kpsJsonWidget.value.nose_lower = normalizedPoints.slice(31, 36)
this.kpsJsonWidget.value.eye_left = normalizedPoints.slice(36, 42)
this.kpsJsonWidget.value.eye_right = normalizedPoints.slice(42, 48)
this.kpsJsonWidget.value.mouth_outer = normalizedPoints.slice(48, 60)
this.kpsJsonWidget.value.mouth_inner = normalizedPoints.slice(60, 68)
this.kpsJsonWidget.value.array = [
normalizedPoints[normalizedPoints.length - 5],
normalizedPoints[normalizedPoints.length - 4],
normalizedPoints[normalizedPoints.length - 3],
normalizedPoints[normalizedPoints.length - 2],
normalizedPoints[normalizedPoints.length - 1]
]
this.kpsJsonWidget.value.width = this.widgets.find(w => w.name === "width").value
this.kpsJsonWidget.value.height = this.widgets.find(w => w.name === "height").value
this.kpsJsonWidget.value.defaultKpsData = JSON.stringify(this.kpsJsonWidget.value)
div.style.color = "#08a85a"
div.innerText = "Success"
this.showImage()
}).catch(e => {
div.style.color = "#C70039"
div.innerText = "ERROR"
div.innerText = e.message || "ERROR"
console.log(e)
}).finally(() => {
doMagic.disabled = false
openDialogWidget.disabled = false
})
})
doMagic.label = "Get Kps From Image";
}
const openDialogWidget = this.addWidget("button", "drawbtn", "", () => {
let w = this.widgets.find(w => w.name === "width").value
let h = this.widgets.find(w => w.name === "height").value
let reference_image
const inputNode = getImgFromInput(this.getInputNode(0))
if (inputNode?.imgs?.length && nodeType.comfyClass != "Kps3dFromImage") {
reference_image = inputNode.imgs[inputNode.imageIndex || 0]
w = reference_image.width
h = reference_image.height
}
if (w > 0 && h > 0) {
if (nodeType.comfyClass == "Kps3dFromImage") {
new KPSDialog3d(w, h, angleWidget, this.kpsJsonWidget)
} else {
new KPSDialog2d(
w, h, reference_image, angleWidget, this.kpsJsonWidget
)
}
}
});
const buttonText = nodeType.comfyClass === "KpsDraw" ? "draw kps" : "change kps"
openDialogWidget.label = buttonText
angleWidget.label = "angle: "
angleWidget.value = "none"
angleWidget.disabled = true
}
this.serialize = true
const onConnectionsChange = nodeType.prototype.onConnectionsChange;
nodeType.prototype.onConnectionsChange = function (side, slot, connect, link_info, output) {
const r = onConnectionsChange?.apply(this, arguments);
if (output.name === "image_reference" && nodeType.comfyClass == "KpsDraw") {
const widthWidget = this.widgets.find(w => w.name === "width");
const heightWidget = this.widgets.find(w => w.name === "height");
const angleWidget = this.widgets.find(w => w.name === "angle");
this.imgs = []
if (output.link) {
widthWidget.disabled = true
heightWidget.disabled = true
const inputNode = getImgFromInput(this.getInputNode(0))
if (inputNode?.imgs?.length) {
const reference_image = inputNode.imgs[inputNode.imageIndex || 0]
widthWidget.value = reference_image.width
heightWidget.value = reference_image.height
}
} else {
widthWidget.disabled = false
heightWidget.disabled = false
}
if (angleWidget) {
angleWidget.value = "none"
}
}
if (output.name === "image" && nodeType.comfyClass == "Kps3dFromImage") {
this.imgs = []
const getKPSWidget = this.widgets.find(w => w.name === "getKPS")
getKPSWidget.disabled = !!!output.link
}
return r;
}
}
}
})
================================================
FILE: ui/helpers.js
================================================
export const getPointsCenter = (points) => {
let sumX = 0, sumY = 0, sumZ = 0;
points.forEach(([x, y, z]) => {
sumX += x;
sumY += y;
if (z != null) sumZ += z
});
const ret = [sumX / points.length, sumY / points.length]
if (points[0].length > 2) ret.push(sumZ / points.length)
return ret
}
export const getPoinsMinMax = (points) => {
let minX = points[0][0], maxX = points[0][0];
let minY = points[0][1], maxY = points[0][1];
points.forEach(([x, y]) => {
if (x < minX) minX = x;
if (x > maxX) maxX = x;
if (y < minY) minY = y;
if (y > maxY) maxY = y;
});
return { minX, maxX, minY, maxY };
}
export const drawKps = (canvas, kps, opacities) => {
const color_list = [
`255, 0, 0,`,
`0, 255, 0,`,
`0, 0, 255,`,
`255, 255, 0,`,
`255, 0, 255,`
]
const ctx = canvas.getContext("2d")
const stickWidth = 10;
const limbSeq = [[0, 2], [1, 2], [3, 2], [4, 2]]
ctx.clearRect(0, 0, canvas.width, canvas.height)
ctx.fillStyle = "black"
ctx.fillRect(0, 0, canvas.width, canvas.height)
ctx.save()
limbSeq.forEach((limb, idx) => {
const kp1 = kps[limb[0]]
const kp2 = kps[limb[1]]
const color = `rgba( ${color_list[limb[0]]} ${0.6 * opacities[limb[0]]})`
const x = [kp1[0], kp2[0]];
const y = [kp1[1], kp2[1]];
const length = Math.sqrt((x[0] - x[1]) ** 2 + (y[0] - y[1]) ** 2)
const angle = Math.atan2(y[1] - y[0], x[1] - x[0])
const num_points = 20;
const polygon = []
const midX = (x[0] + x[1]) / 2
const midY = (y[0] + y[1]) / 2
for (let i = 0; i <= num_points; i++) {
const theta = (i / num_points) * Math.PI * 2
const dx = (length / 2) * Math.cos(theta);
const dy = (stickWidth / 2) * Math.sin(theta);
const rx = Math.cos(angle) * dx - Math.sin(angle) * dy + midX
const ry = Math.sin(angle) * dx + Math.cos(angle) * dy + midY
polygon.push([rx, ry]);
}
ctx.beginPath();
ctx.moveTo(polygon[0][0], polygon[0][1])
for (let i = 1; i < polygon.length; i++) {
ctx.lineTo(polygon[i][0], polygon[i][1])
}
ctx.closePath();
ctx.fillStyle = color;
ctx.fill();
})
kps.forEach((kp, idx) => {
const [x, y] = kp;
const color = `rgba( ${color_list[idx]} ${opacities[idx]})`
ctx.beginPath();
ctx.arc(x, y, 10, 0, Math.PI * 2);
ctx.fillStyle = color;
ctx.fill();
});
ctx.restore();
}
export const checkWebGlSupport = () => {
const canvas = document.createElement("canvas");
const gl = canvas.getContext("webgl2")
return !!gl
}
export const normalizePoints = (points, w, h) => {
const minValues = [
Math.min(...points.map(p => p[0])),
Math.min(...points.map(p => p[1])),
Math.min(...points.map(p => p[2]))
];
const maxValues = [
Math.max(...points.map(p => p[0])),
Math.max(...points.map(p => p[1])),
Math.max(...points.map(p => p[2]))
];
const ranges = [
maxValues[0] - minValues[0],
maxValues[1] - minValues[1],
maxValues[2] - minValues[2]
];
const scaleX = w / ranges[0]
const scaleY = h / ranges[1]
const scaleFactor = Math.min(scaleX, scaleY);
const normalizedPoints = points.map(point => [
(point[0] - minValues[0]) * scaleFactor,
(point[1] - minValues[1]) * scaleFactor,
(point[2] - minValues[2]) * scaleFactor
]);
const maxNormalizedValues = [
Math.max(...normalizedPoints.map(p => p[0])),
Math.max(...normalizedPoints.map(p => p[1])),
Math.max(...normalizedPoints.map(p => p[2]))
];
const centerOffset = [
(w - maxNormalizedValues[0]) / 2,
(h - maxNormalizedValues[1]) / 2,
-maxNormalizedValues[2] / 2
];
const centeredPoints = normalizedPoints.map(point => [
point[0] + centerOffset[0],
point[1] + centerOffset[1],
point[2] + centerOffset[2]
]);
return centeredPoints;
}
export const rotatePoints3D = (points, kps, angleXDeg, angleYDeg, angleZDeg) => {
const angleX = angleXDeg * (Math.PI / 180);
const angleY = angleYDeg * (Math.PI / 180);
const angleZ = angleZDeg * (Math.PI / 180);
const numPoints = kps.length;
const center = kps.reduce((acc, point) => {
acc[0] += point[0]
acc[1] += point[1]
acc[2] += point[2]
return acc;
}, [0, 0, 0]).map(coord => coord / numPoints)
const translatedPoints = points.map(point => [
point[0] - center[0],
point[1] - center[1],
point[2] - center[2]
]);
function rotateX(point, angle) {
const cosTheta = Math.cos(angle);
const sinTheta = Math.sin(angle);
return [
point[0],
point[1] * cosTheta - point[2] * sinTheta,
point[1] * sinTheta + point[2] * cosTheta
];
}
function rotateY(point, angle) {
const cosTheta = Math.cos(angle);
const sinTheta = Math.sin(angle);
return [
point[0] * cosTheta + point[2] * sinTheta,
point[1],
-point[0] * sinTheta + point[2] * cosTheta
];
}
function rotateZ(point, angle) {
const cosTheta = Math.cos(angle);
const sinTheta = Math.sin(angle);
return [
point[0] * cosTheta - point[1] * sinTheta,
point[0] * sinTheta + point[1] * cosTheta,
point[2]
];
}
const rotatedPoints = translatedPoints.map(point => {
let rotatedPoint = rotateX(point, angleX)
rotatedPoint = rotateY(rotatedPoint, angleY)
rotatedPoint = rotateZ(rotatedPoint, angleZ)
return rotatedPoint;
});
const finalPoints = rotatedPoints.map(point => [
point[0] + center[0],
point[1] + center[1],
point[2] + center[2]
])
return finalPoints
}
export const getImgFromInput = (inputNode) => {
if (inputNode?.type === "Reroute") {
return getImgFromInput(inputNode.getInputNode(0))
}
return inputNode
}
export const getDefaultKpsData = () => ({
array: [], height: 0, width: 0, rotateX: 0, rotateY: 0, rotateZ: 0 , opacities: [1, 1, 1, 1, 1],
jawline: [], eyebrow_left: [], eyebrow_right: [], nose_bridge: [], nose_lower: [],
eye_left: [], eye_right: [], mouth_outer: [], mouth_inner: []
})
================================================
FILE: ui/shaders.js
================================================
export const vertexShaderSrc = `#version 300 es
#pragma vscode_glsllint_stage: vert
layout(location=0) in vec4 aPosition;
layout(location=1) in vec2 aTexCoord;
out vec2 vTexCoord;
void main()
{
vTexCoord = aTexCoord;
gl_Position = aPosition;
}`;
export const fragmentShaderSrc = `#version 300 es
#pragma vscode_glsllint_stage: frag
precision mediump float;
in vec2 vTexCoord;
uniform sampler2D uSampler;
out vec4 fragColor;
void main()
{
fragColor = texture(uSampler, vTexCoord);
}`;
export const createShader = (gl, type, source) => {
const shader = gl.createShader(type)
gl.shaderSource(shader, source)
gl.compileShader(shader)
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
console.error(gl.getShaderInfoLog(shader))
gl.deleteShader(shader)
return null
}
return shader
}
================================================
FILE: ui/uiHelpers.js
================================================
export const createSlider = (name, id, min, max, step, value, callback) => {
const divElement = document.createElement("div");
divElement.id = id;
divElement.style.cssFloat = "left"
divElement.style.fontFamily = "sans-serif"
divElement.style.marginRight = "4px"
divElement.style.color = "var(--input-text)"
divElement.style.backgroundColor = "var(--comfy-input-bg)"
divElement.style.borderRadius = "8px"
divElement.style.borderColor = "var(--border-color)"
divElement.style.borderStyle = "solid"
divElement.style.fontSize = "15px"
divElement.style.height = "21px"
divElement.style.padding = "1px 6px"
divElement.style.display = "flex"
divElement.style.position = "relative"
divElement.style.top = "2px"
divElement.style.pointerEvents = "auto"
const input = document.createElement("input")
const labelElement = document.createElement("label")
input.setAttribute("type", "range")
input.setAttribute("min", `${min}`)
input.setAttribute("max", `${max}`)
input.setAttribute("step", `${step}`)
input.setAttribute("value", `${value}`)
labelElement.textContent = name;
divElement.appendChild(labelElement)
divElement.appendChild(input)
input.addEventListener("input", callback)
return divElement;
}
export const createButton = (name, isRight, callback) => {
const button = document.createElement("button");
button.innerText = name;
button.style.pointerEvents = "auto";
button.addEventListener("click", callback);
if (isRight) {
button.style.cssFloat = "right";
button.style.marginLeft = "4px";
} else {
button.style.cssFloat = "left";
button.style.marginRight = "4px";
}
return button;
}
export const createRadiobox = (name, label, opacities, index, callback) => {
const div = document.createElement("div");
div.style.marginTop = "20px"
const sliderInput = document.createElement("input")
sliderInput.style.pointerEvents = "auto"
sliderInput.id = `opacity_slider_${name}`
sliderInput.type = "range"
sliderInput.step = "0.1"
sliderInput.min = "0"
sliderInput.max = "1"
sliderInput.tabIndex = "1"
sliderInput.style.width = "100%"
sliderInput.name = `s_${name}`
sliderInput.value = opacities[index]
sliderInput.addEventListener("change", (event) => {
const input = document.querySelector(`#opacity_input_${name}`)
if (input) input.value = event.target.value;
opacities[index] = event.target.value;
callback()
})
const valueInput = document.createElement("input")
valueInput.style.pointerEvents = "auto"
valueInput.id = `opacity_input_${name}`
valueInput.type = "number";
valueInput.min = "0";
valueInput.max = "1";
valueInput.tabIndex = "1"
valueInput.style.width = "100%"
valueInput.name = `i_${name}`
valueInput.value = opacities[index];
valueInput.addEventListener("change", (event) => {
const input = document.querySelector(`#opacity_slider_${name}`)
if (input) input.value = event.target.value
opacities[index] = event.target.value
callback()
})
div.style.marginRight = "4px";
const labelDiv = document.createElement("div")
labelDiv.innerText = label
div.appendChild(labelDiv)
div.appendChild(sliderInput)
div.appendChild(valueInput)
return div
}
================================================
FILE: utils.py
================================================
import numpy as np
import cv2
import math
import torch
import math
import torch.nn.functional as F
from torchvision.transforms import functional as TF
from .ip_adapter.instantId import CrossAttentionPatch
def draw_kps(w, h, kps, color_list=[(255, 0, 0), (0, 255, 0), (0, 0, 255), (255, 255, 0), (255, 0, 255)], alphas=[1, 1, 1, 1, 1]):
stickwidth = 4
limbSeq = np.array([[0, 2], [1, 2], [3, 2], [4, 2]])
kps = np.array(kps)
out_img = np.zeros([int(h), int(w), 3], dtype=np.uint8)
for i in range(len(limbSeq)):
index = limbSeq[i]
color = color_list[index[0]]
alpha = alphas[index[0]]
x = kps[index][:, 0]
y = kps[index][:, 1]
length = ((x[0] - x[1]) ** 2 + (y[0] - y[1]) ** 2) ** 0.5
angle = math.degrees(math.atan2(y[0] - y[1], x[0] - x[1]))
polygon = cv2.ellipse2Poly(
(int(np.mean(x)), int(np.mean(y))), (int(length / 2), stickwidth), int(angle), 0, 360, 1
)
limb_img = np.zeros_like(out_img)
cv2.fillConvexPoly(limb_img, polygon, color)
out_img = cv2.addWeighted(out_img, 1, limb_img, float(alpha) * 0.6, 0)
for idx_kp, kp in enumerate(kps):
color = color_list[idx_kp]
alpha = alphas[idx_kp]
x = kp[0]
y = kp[1]
kp_img = out_img.copy()
cv2.circle(kp_img, (int(x), int(y)), 10, color, -1)
out_img = cv2.addWeighted(out_img, 1 - float(alpha), kp_img, float(alpha), 0)
return out_img.astype(np.uint8)
# based on https://github.com/laksjdjf/IPAdapter-ComfyUI/blob/main/ip_adapter.py#L19
def set_model_patch_replace(model, patch_kwargs, key):
attn = "attn2"
to = model.model_options["transformer_options"].copy()
if "patches_replace" not in to:
to["patches_replace"] = {}
else:
to["patches_replace"] = to["patches_replace"].copy()
if attn not in to["patches_replace"]:
to["patches_replace"][attn] = {}
else:
to["patches_replace"][attn] = to["patches_replace"][attn].copy()
if key not in to["patches_replace"][attn]:
to["patches_replace"][attn][key] = CrossAttentionPatch(**patch_kwargs)
model.model_options["transformer_options"] = to
else:
to["patches_replace"][attn][key].set_new_condition(**patch_kwargs)
def resize_to_fit_area(original_width, original_height, area_width, area_height):
base_pixels = 8
max_area= area_width * area_height
aspect_ratio = original_width / original_height
scale_factor = math.sqrt(max_area / (original_width * original_height))
new_width = int(original_width * scale_factor)
new_height = int(original_height * scale_factor)
new_width = new_width // base_pixels * base_pixels
new_height = new_height // base_pixels * base_pixels
if new_width * new_height > max_area:
new_width = math.floor(math.sqrt(max_area * aspect_ratio)) // base_pixels * base_pixels
new_height = math.floor(new_width / aspect_ratio) // base_pixels * base_pixels
return (new_width, new_height)
def get_mask_bbox_with_padding(mask_image, pad_top, pad_right, pad_bottom, pad_left):
mask_segments = torch.nonzero(mask_image == 1, as_tuple=False)
if torch.count_nonzero(mask_segments).item() == 0:
raise Exception("Draw a mask on pose image")
m_y1 = torch.min(mask_segments[:, 0]).item()
m_y2 = torch.max(mask_segments[:, 0]).item()
m_x1 = torch.min(mask_segments[:, 1]).item()
m_x2 = torch.max(mask_segments[:, 1]).item()
height, width = mask_image.shape
p_x1 = max(0, m_x1 - pad_left)
p_y1 = max(0, m_y1 - pad_top)
p_x2 = min(width, m_x2 + pad_right)
p_y2 = min(height, m_y2 + pad_bottom)
return int(p_x1), int(p_y1), int(p_x2), int(p_y2)
def get_kps_from_image(image, insightface):
np_pose_image = (255.0 * image.cpu().numpy().squeeze()).clip(0, 255).astype(np.uint8)
face_info = insightface.get(cv2.cvtColor(np_pose_image, cv2.COLOR_RGB2BGR))
assert len(face_info) > 0, "No face detected in pose image"
face_info = sorted(face_info, key=lambda x: (x["bbox"][2] - x["bbox"][0]) * (x["bbox"][3] - x["bbox"][1]))[-1] # only use the maximum face
return face_info["kps"]
def get_angle(a=(0, 0), b=(0, 0), round_angle=False):
# a, b - eyes
angle = math.atan2(b[1] - a[1], b[0] - a[0]) * 180 / math.pi
if round_angle:
angle = round(angle / 90) * 90
if angle == 360: angle = 0
return angle
def calculate_size_after_rotation(width, height, angle):
angle_rad = math.radians(angle)
new_width = abs(width * math.cos(angle_rad)) + abs(height * math.sin(angle_rad))
new_height = abs(width * math.sin(angle_rad)) + abs(height * math.cos(angle_rad))
return (int(np.ceil(new_width)), int(np.ceil(new_height))) #+ 1?
def image_rotate_with_pad(image, clockwise, angle):
if not clockwise: angle *= -1
image = image.squeeze(0)
image = image.permute(2, 0, 1)
image = TF.rotate(image, angle, fill=0, expand=True)
image = image.permute(1, 2, 0)
image = image.unsqueeze(0)
return image
def kps_rotate_2d(points, original_width, original_height, new_width, new_height, angle):
angle_rad = math.radians(angle)
original_center_x = original_width / 2
original_center_y = original_height / 2
new_center_x = new_width / 2
new_center_y = new_height / 2
cos_angle = math.cos(angle_rad)
sin_angle = math.sin(angle_rad)
rotated_points = []
for point in points:
x, y = point
translated_x = x - original_center_x
translated_y = y - original_center_y
rotated_x = translated_x * cos_angle - translated_y * sin_angle
rotated_y = translated_x * sin_angle + translated_y * cos_angle
final_x = int(round(rotated_x + new_center_x))
final_y = int(round(rotated_y + new_center_y))
rotated_points.append([final_x, final_y])
return rotated_points
def kps_rotate_3d(points, angleXDeg, angleYDeg, angleZDeg):
angleX = math.radians(angleXDeg)
angleY = math.radians(angleYDeg)
angleZ = math.radians(angleZDeg)
center = np.mean(points, axis=0)
translated_points = np.array([point - center for point in points])
def rotate_x(point, angle):
cos_theta = math.cos(angle)
sin_theta = math.sin(angle)
return [
int(point[0]),
int(point[1] * cos_theta - point[2] * sin_theta),
int(point[1] * sin_theta + point[2] * cos_theta)
]
def rotate_y(point, angle):
cos_theta = math.cos(angle)
sin_theta = math.sin(angle)
return [
int(point[0] * cos_theta + point[2] * sin_theta),
int(point[1]),
int(-point[0] * sin_theta + point[2] * cos_theta)
]
def rotate_z(point, angle):
cos_theta = math.cos(angle)
sin_theta = math.sin(angle)
return [
int(point[0] * cos_theta - point[1] * sin_theta),
int(point[0] * sin_theta + point[1] * cos_theta),
int(point[2])
]
rotated_points = [
rotate_z(rotate_y(rotate_x(point, angleX), angleY), angleZ)
for point in translated_points
]
return [point + center for point in rotated_points]
def kps3d_to_kps2d (kps):
if len(kps['array'][0]) == 3:
kps2d = {
'width': kps['width'],
'height': kps['height'],
'opacities': kps['opacities'][:],
'array': []
}
for x, y, _ in kps['array']:
kps2d['array'].append([x, y])
return kps2d
return kps
def get_bbox_from_kps (kps_data, grow_by):
kps = np.array(kps_data['array'])
minX, minY = np.min(kps, axis=0)
maxX, maxY = np.max(kps, axis=0)
width = (maxX - minX) / grow_by
height = ((maxY - minY) / grow_by)
return [
[
int(max(np.ceil(minX - (width)), 0)),
int(max(np.ceil(minY - (height)), 0))
],
[
int(min(np.ceil(maxX + (width)), kps_data['width'])),
int(min(np.ceil(maxY + (height)), kps_data['height']))
]
]
================================================
FILE: workflows/auto_rotate.json
================================================
{
"last_node_id": 682,
"last_link_id": 1593,
"nodes": [
{
"id": 268,
"type": "PreviewImage",
"pos": [
1260,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 35,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 926
}
],
"title": "Image for inpaint",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 412,
"type": "Reroute",
"pos": [
1201,
144
],
"size": [
75,
26
],
"flags": {},
"order": 32,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1475,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
840
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 413,
"type": "Reroute",
"pos": [
1201,
164
],
"size": [
75,
26
],
"flags": {},
"order": 33,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1476,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
841
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 395,
"type": "PreviewImage",
"pos": [
1440,
430
],
"size": {
"0": 612.2093505859375,
"1": 842.1597900390625
},
"flags": {},
"order": 50,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1535
}
],
"title": "Output Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 630,
"type": "SetLatentNoiseMask",
"pos": [
894,
510
],
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 43,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1419
},
{
"name": "mask",
"type": "MASK",
"link": 1421
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1420
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "SetLatentNoiseMask"
}
},
{
"id": 354,
"type": "VAEEncode",
"pos": [
751,
510
],
"size": {
"0": 309.7555847167969,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 34,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 923
},
{
"name": "vae",
"type": "VAE",
"link": 1024
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1419
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEEncode"
}
},
{
"id": 474,
"type": "Reroute",
"pos": [
416,
478
],
"size": [
75,
26
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1026
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1024,
1027,
1593
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 248,
"type": "VAEDecode",
"pos": [
1438,
323
],
"size": {
"0": 140,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 45,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1340
},
{
"name": "vae",
"type": "VAE",
"link": 768
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
797
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
}
},
{
"id": 392,
"type": "Reroute",
"pos": [
756,
293
],
"size": [
75,
26
],
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1027
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
768
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 262,
"type": "MaskToImage",
"pos": [
1240,
20
],
"size": {
"0": 210,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 36,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 828,
"slot_index": 0
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
408,
558
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "MaskToImage"
}
},
{
"id": 323,
"type": "ImageToMask",
"pos": [
1790,
20
],
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": true
},
"order": 41,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 563
}
],
"outputs": [
{
"name": "MASK",
"type": "MASK",
"links": [
1421
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageToMask"
},
"widgets_values": [
"red"
]
},
{
"id": 264,
"type": "PreviewImage",
"pos": [
1500,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 39,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 408
}
],
"title": "Mask",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 410,
"type": "Reroute",
"pos": [
1118,
104
],
"size": [
75,
26
],
"flags": {},
"order": 30,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1473,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
836
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 411,
"type": "Reroute",
"pos": [
1118,
124
],
"size": [
75,
26
],
"flags": {},
"order": 31,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1474,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
838
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 369,
"type": "PreviewImage",
"pos": [
1020,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 37,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1052
}
],
"title": "InstantId Control Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 326,
"type": "PreviewImage",
"pos": [
1740,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 42,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 590
}
],
"title": "Blurred Mask",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 408,
"type": "Reroute",
"pos": [
826,
-9
],
"size": [
75,
26
],
"flags": {},
"order": 28,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1504
}
],
"outputs": [
{
"name": "",
"type": "MASK",
"links": [
828
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 258,
"type": "PreviewImage",
"pos": [
2100,
433
],
"size": {
"0": 612.114013671875,
"1": 845.9668579101562
},
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1552
}
],
"title": "Input Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 394,
"type": "ImageScale",
"pos": [
1607,
197
],
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 46,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 797
},
{
"name": "width",
"type": "INT",
"link": 840,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 841,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
781
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"bilinear",
512,
512,
"disabled"
]
},
{
"id": 667,
"type": "ComposeRotated",
"pos": [
2285,
73
],
"size": {
"0": 254.40000915527344,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 49,
"mode": 0,
"inputs": [
{
"name": "original_image",
"type": "IMAGE",
"link": 1533
},
{
"name": "rotated_image",
"type": "IMAGE",
"link": 1538
}
],
"outputs": [
{
"name": "image",
"type": "IMAGE",
"links": [
1535
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ComposeRotated"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 664,
"type": "MaskToImage",
"pos": [
-298,
89
],
"size": {
"0": 210,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 1530
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1563
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "MaskToImage"
}
},
{
"id": 579,
"type": "Reroute",
"pos": [
1973,
43
],
"size": [
75,
26
],
"flags": {},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1544
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 569,
"type": "Reroute",
"pos": [
206,
313
],
"size": [
75,
26
],
"flags": {},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1546
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1314
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 389,
"type": "Reroute",
"pos": [
1708,
311
],
"size": [
75,
26
],
"flags": {},
"order": 25,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1314
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1032
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 396,
"type": "ImageCompositeMasked",
"pos": [
1838,
149
],
"size": {
"0": 327.45550537109375,
"1": 140.86239624023438
},
"flags": {
"collapsed": true
},
"order": 47,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 1032
},
{
"name": "source",
"type": "IMAGE",
"link": 781
},
{
"name": "mask",
"type": "MASK",
"link": null
},
{
"name": "x",
"type": "INT",
"link": 836,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 838,
"widget": {
"name": "y"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1536
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
false
]
},
{
"id": 672,
"type": "Reroute",
"pos": [
207,
402
],
"size": [
75,
26
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1551
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1552
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 650,
"type": "LoadInsightface",
"pos": [
-870,
-130
],
"size": {
"0": 210,
"1": 26
},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"links": [
1491,
1555,
1564
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInsightface"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 655,
"type": "Reroute",
"pos": [
1960,
-290
],
"size": [
75,
26
],
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1565,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "FLOAT",
"links": [
1566
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 407,
"type": "Reroute",
"pos": [
1118,
44
],
"size": [
75,
26
],
"flags": {},
"order": 27,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1567
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
923,
926
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 669,
"type": "RotateImage",
"pos": [
-76,
88
],
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": true
},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1563
},
{
"name": "angle",
"type": "FLOAT",
"link": 1559,
"widget": {
"name": "angle"
}
}
],
"outputs": [
{
"name": "rotated_image",
"type": "IMAGE",
"links": [
1573
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "RotateImage"
},
"widgets_values": [
30,
true
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 670,
"type": "RotateImage",
"pos": [
-76,
67
],
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": true
},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1542
},
{
"name": "angle",
"type": "FLOAT",
"link": 1558,
"widget": {
"name": "angle"
}
}
],
"outputs": [
{
"name": "rotated_image",
"type": "IMAGE",
"links": [
1544,
1545,
1546
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "RotateImage"
},
"widgets_values": [
30,
true
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 665,
"type": "ImageToMask",
"pos": [
93,
88
],
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": true
},
"order": 24,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1573
}
],
"outputs": [
{
"name": "MASK",
"type": "MASK",
"links": [
1572
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageToMask"
},
"widgets_values": [
"red"
]
},
{
"id": 668,
"type": "RotateImage",
"pos": [
2100,
150
],
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": true
},
"order": 48,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1536
},
{
"name": "angle",
"type": "FLOAT",
"link": 1566,
"widget": {
"name": "angle"
}
}
],
"outputs": [
{
"name": "rotated_image",
"type": "IMAGE",
"links": [
1538
],
"shape": 3
}
],
"properties": {
"Node name for S&R": "RotateImage"
},
"widgets_values": [
30,
false
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 647,
"type": "PreprocessImage",
"pos": [
320,
40
],
"size": {
"0": 346.7717590332031,
"1": 290
},
"flags": {},
"order": 26,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1545
},
{
"name": "mask",
"type": "MASK",
"link": 1572
},
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 1564
}
],
"outputs": [
{
"name": "resized_image",
"type": "IMAGE",
"links": [
1567
],
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": [
1504
],
"shape": 3
},
{
"name": "control_image",
"type": "IMAGE",
"links": [
1562
],
"slot_index": 2,
"shape": 3
},
{
"name": "x",
"type": "INT",
"links": [
1473
],
"slot_index": 3,
"shape": 3
},
{
"name": "y",
"type": "INT",
"links": [
1474
],
"slot_index": 4,
"shape": 3
},
{
"name": "original_width",
"type": "INT",
"links": [
1475
],
"slot_index": 5,
"shape": 3
},
{
"name": "original_height",
"type": "INT",
"links": [
1476
],
"slot_index": 6,
"shape": 3
},
{
"name": "new_width",
"type": "INT",
"links": [],
"slot_index": 7,
"shape": 3
},
{
"name": "new_height",
"type": "INT",
"links": [],
"slot_index": 8,
"shape": 3
}
],
"properties": {
"Node name for S&R": "PreprocessImage"
},
"widgets_values": [
1024,
1024,
"auto",
150
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 642,
"type": "FaceEmbed",
"pos": [
-580,
-103
],
"size": {
"0": 292.20001220703125,
"1": 66
},
"flags": {
"collapsed": true
},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 1491
},
{
"name": "face_image",
"type": "IMAGE",
"link": 1460
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": null
}
],
"outputs": [
{
"name": "face embeds",
"type": "FACE_EMBED",
"links": [
1576
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbed"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 636,
"type": "ControlNetLoader",
"pos": [
-650,
950
],
"size": {
"0": 315,
"1": 58
},
"flags": {},
"order": 1,
"mode": 0,
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
1582
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetLoader"
},
"widgets_values": [
"ControlNetModel\\diffusion_pytorch_model.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 481,
"type": "Reroute",
"pos": [
823,
81
],
"size": [
75,
26
],
"flags": {},
"order": 29,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1562
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1052,
1583
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 679,
"type": "FaceEmbedCombine",
"pos": [
-36,
549
],
"size": {
"0": 367.79998779296875,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "resampler",
"type": "RESAMPLER",
"link": 1577
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": 1576
}
],
"outputs": [
{
"name": "face conditioning",
"type": "FACE_CONDITIONING",
"links": [
1587,
1590
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbedCombine"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 677,
"type": "LoadInstantIdAdapter",
"pos": [
-642,
801
],
"size": {
"0": 315,
"1": 78
},
"flags": {},
"order": 2,
"mode": 0,
"outputs": [
{
"name": "InstantId_adapter",
"type": "INSTANTID_ADAPTER",
"links": [
1589
],
"slot_index": 0,
"shape": 3
},
{
"name": "resampler",
"type": "RESAMPLER",
"links": [
1577
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInstantIdAdapter"
},
"widgets_values": [
"ip-adapter.bin"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 252,
"type": "CLIPTextEncode",
"pos": [
330,
785
],
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1324
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1580
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 287,
"type": "CLIPTextEncode",
"pos": [
328,
930
],
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1592
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1581
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 680,
"type": "ControlNetInstantIdApply",
"pos": [
737,
590
],
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 38,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1580
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1581
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1587
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1582
},
{
"name": "image",
"type": "IMAGE",
"link": 1583
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
1584
],
"slot_index": 0,
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
1585
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
0.7000000000000001
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 681,
"type": "InstantIdAdapterApply",
"pos": [
337,
574
],
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1588
},
{
"name": "instantId_adapter",
"type": "INSTANTID_ADAPTER",
"link": 1589
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1590
}
],
"outputs": [
{
"name": "model",
"type": "MODEL",
"links": [
1591
],
"shape": 3
}
],
"properties": {
"Node name for S&R": "InstantIdAdapterApply"
},
"widgets_values": [
0.8
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 359,
"type": "KSampler",
"pos": [
1097,
420
],
"size": {
"0": 316.94384765625,
"1": 486.80694580078125
},
"flags": {},
"order": 44,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1591
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1584
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1585
},
{
"name": "latent_image",
"type": "LATENT",
"link": 1420
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1340
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
930143501615199,
"randomize",
30,
3,
"euler",
"karras",
0.7000000000000001
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 471,
"type": "Reroute",
"pos": [
229,
784
],
"size": [
75,
26
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1015
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1324,
1592
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 641,
"type": "LoadImage",
"pos": [
-600,
-460
],
"size": {
"0": 235.36587524414062,
"1": 314
},
"flags": {},
"order": 3,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1460
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"title": "Load face Referecnce",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"z19900074AMP,Luke-Skywalker-i-Yoda---Gwiezdne-wojny--Imperium-k.jpg",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 253,
"type": "LoadImage",
"pos": [
-620,
40
],
"size": {
"0": 290.3117370605469,
"1": 314
},
"flags": {},
"order": 4,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1533,
1542,
1551,
1556
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": [
1530,
1557
],
"slot_index": 1,
"shape": 3
}
],
"title": "Load Pose Image",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"HanSolo.webp",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 241,
"type": "CheckpointLoaderSimple",
"pos": [
-630,
430
],
"size": {
"0": 295.705078125,
"1": 310
},
"flags": {},
"order": 5,
"mode": 0,
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
1588
],
"slot_index": 0,
"shape": 3
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
1015
],
"slot_index": 1,
"shape": 3
},
{
"name": "VAE",
"type": "VAE",
"links": [
1026
],
"slot_index": 2,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"custom_3.9.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 319,
"type": "ImageBlur",
"pos": [
1450,
-10
],
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": false
},
"order": 40,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 558
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
563,
590
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageBlur"
},
"widgets_values": [
1,
0.1
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 673,
"type": "AngleFromFace",
"pos": [
-303,
-298
],
"size": {
"0": 315,
"1": 194
},
"flags": {
"collapsed": false
},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 1555
},
{
"name": "image",
"type": "IMAGE",
"link": 1556
},
{
"name": "mask",
"type": "MASK",
"link": 1557
}
],
"outputs": [
{
"name": "angle",
"type": "FLOAT",
"links": [
1558,
1559,
1565
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "AngleFromFace"
},
"widgets_values": [
"loseless",
200,
200,
200,
200
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 682,
"type": "Reroute",
"pos": [
522,
475.47650853223274
],
"size": [
75,
26
],
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1593
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": null
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
}
],
"links": [
[
408,
262,
0,
264,
0,
"IMAGE"
],
[
558,
262,
0,
319,
0,
"IMAGE"
],
[
563,
319,
0,
323,
0,
"IMAGE"
],
[
590,
319,
0,
326,
0,
"IMAGE"
],
[
768,
392,
0,
248,
1,
"VAE"
],
[
781,
394,
0,
396,
1,
"IMAGE"
],
[
797,
248,
0,
394,
0,
"IMAGE"
],
[
828,
408,
0,
262,
0,
"MASK"
],
[
836,
410,
0,
396,
3,
"INT"
],
[
838,
411,
0,
396,
4,
"INT"
],
[
840,
412,
0,
394,
1,
"INT"
],
[
841,
413,
0,
394,
2,
"INT"
],
[
923,
407,
0,
354,
0,
"IMAGE"
],
[
926,
407,
0,
268,
0,
"IMAGE"
],
[
1015,
241,
1,
471,
0,
"*"
],
[
1024,
474,
0,
354,
1,
"VAE"
],
[
1026,
241,
2,
474,
0,
"*"
],
[
1027,
474,
0,
392,
0,
"*"
],
[
1032,
389,
0,
396,
0,
"IMAGE"
],
[
1052,
481,
0,
369,
0,
"IMAGE"
],
[
1314,
569,
0,
389,
0,
"*"
],
[
1324,
471,
0,
252,
0,
"CLIP"
],
[
1340,
359,
0,
248,
0,
"LATENT"
],
[
1419,
354,
0,
630,
0,
"LATENT"
],
[
1420,
630,
0,
359,
3,
"LATENT"
],
[
1421,
323,
0,
630,
1,
"MASK"
],
[
1460,
641,
0,
642,
1,
"IMAGE"
],
[
1473,
647,
3,
410,
0,
"*"
],
[
1474,
647,
4,
411,
0,
"*"
],
[
1475,
647,
5,
412,
0,
"*"
],
[
1476,
647,
6,
413,
0,
"*"
],
[
1491,
650,
0,
642,
0,
"INSIGHTFACE_APP"
],
[
1504,
647,
1,
408,
0,
"*"
],
[
1530,
253,
1,
664,
0,
"MASK"
],
[
1533,
253,
0,
667,
0,
"IMAGE"
],
[
1535,
667,
0,
395,
0,
"IMAGE"
],
[
1536,
396,
0,
668,
0,
"IMAGE"
],
[
1538,
668,
0,
667,
1,
"IMAGE"
],
[
1542,
253,
0,
670,
0,
"IMAGE"
],
[
1544,
670,
0,
579,
0,
"*"
],
[
1545,
670,
0,
647,
0,
"IMAGE"
],
[
1546,
670,
0,
569,
0,
"*"
],
[
1551,
253,
0,
672,
0,
"*"
],
[
1552,
672,
0,
258,
0,
"IMAGE"
],
[
1555,
650,
0,
673,
0,
"INSIGHTFACE_APP"
],
[
1556,
253,
0,
673,
1,
"IMAGE"
],
[
1557,
253,
1,
673,
2,
"MASK"
],
[
1558,
673,
0,
670,
1,
"FLOAT"
],
[
1559,
673,
0,
669,
1,
"FLOAT"
],
[
1562,
647,
2,
481,
0,
"*"
],
[
1563,
664,
0,
669,
0,
"IMAGE"
],
[
1564,
650,
0,
647,
2,
"INSIGHTFACE_APP"
],
[
1565,
673,
0,
655,
0,
"*"
],
[
1566,
655,
0,
668,
1,
"FLOAT"
],
[
1567,
647,
0,
407,
0,
"*"
],
[
1572,
665,
0,
647,
1,
"MASK"
],
[
1573,
669,
0,
665,
0,
"IMAGE"
],
[
1576,
642,
0,
679,
1,
"FACE_EMBED"
],
[
1577,
677,
1,
679,
0,
"RESAMPLER"
],
[
1580,
252,
0,
680,
0,
"CONDITIONING"
],
[
1581,
287,
0,
680,
1,
"CONDITIONING"
],
[
1582,
636,
0,
680,
3,
"CONTROL_NET"
],
[
1583,
481,
0,
680,
4,
"IMAGE"
],
[
1584,
680,
0,
359,
1,
"CONDITIONING"
],
[
1585,
680,
1,
359,
2,
"CONDITIONING"
],
[
1587,
679,
0,
680,
2,
"FACE_CONDITIONING"
],
[
1588,
241,
0,
681,
0,
"MODEL"
],
[
1589,
677,
0,
681,
1,
"INSTANTID_ADAPTER"
],
[
1590,
679,
0,
681,
2,
"FACE_CONDITIONING"
],
[
1591,
681,
0,
359,
0,
"MODEL"
],
[
1592,
471,
0,
287,
0,
"CLIP"
],
[
1593,
474,
0,
682,
0,
"*"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.8390545288824507,
"offset": [
556.6002572542378,
-306.22141924192647
]
},
"groupNodes": {}
},
"version": 0.4
}
================================================
FILE: workflows/draw_kps.json
================================================
{
"last_node_id": 658,
"last_link_id": 1520,
"nodes": [
{
"id": 268,
"type": "PreviewImage",
"pos": {
"0": 1260,
"1": -340
},
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 28,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 926
}
],
"outputs": [],
"title": "Image for inpaint",
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 412,
"type": "Reroute",
"pos": {
"0": 1201,
"1": 144
},
"size": [
75,
26
],
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1475,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
840
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 413,
"type": "Reroute",
"pos": {
"0": 1201,
"1": 164
},
"size": [
75,
26
],
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1476,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
841
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 395,
"type": "PreviewImage",
"pos": {
"0": 1440,
"1": 430
},
"size": {
"0": 612.2093505859375,
"1": 842.1597900390625
},
"flags": {},
"order": 44,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1418
}
],
"outputs": [],
"title": "Output Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 258,
"type": "PreviewImage",
"pos": {
"0": 2100,
"1": 430
},
"size": {
"0": 612.114013671875,
"1": 845.9668579101562
},
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1281
}
],
"outputs": [],
"title": "Input Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 630,
"type": "SetLatentNoiseMask",
"pos": {
"0": 894,
"1": 510
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 37,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1419
},
{
"name": "mask",
"type": "MASK",
"link": 1421
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1420
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "SetLatentNoiseMask"
},
"widgets_values": []
},
{
"id": 354,
"type": "VAEEncode",
"pos": {
"0": 751,
"1": 510
},
"size": {
"0": 309.7555847167969,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 27,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 923
},
{
"name": "vae",
"type": "VAE",
"link": 1024
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1419
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEEncode"
},
"widgets_values": []
},
{
"id": 569,
"type": "Reroute",
"pos": {
"0": 206,
"1": 313
},
"size": [
75,
26
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1415
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1314
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 474,
"type": "Reroute",
"pos": {
"0": 416,
"1": 478
},
"size": [
75,
26
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1026
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1024,
1027
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 248,
"type": "VAEDecode",
"pos": {
"0": 1438,
"1": 323
},
"size": {
"0": 140,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 41,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1340
},
{
"name": "vae",
"type": "VAE",
"link": 768
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
797
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 394,
"type": "ImageScale",
"pos": {
"0": 1603,
"1": 186
},
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 42,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 797
},
{
"name": "width",
"type": "INT",
"link": 840,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 841,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
781
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"bilinear",
512,
512,
"disabled"
]
},
{
"id": 396,
"type": "ImageCompositeMasked",
"pos": {
"0": 1840,
"1": 149
},
"size": {
"0": 327.45550537109375,
"1": 140.86239624023438
},
"flags": {
"collapsed": true
},
"order": 43,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 1032
},
{
"name": "source",
"type": "IMAGE",
"link": 781
},
{
"name": "mask",
"type": "MASK",
"link": null,
"shape": 7
},
{
"name": "x",
"type": "INT",
"link": 836,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 838,
"widget": {
"name": "y"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1418
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
false
]
},
{
"id": 389,
"type": "Reroute",
"pos": {
"0": 1708,
"1": 311
},
"size": [
75,
26
],
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1314
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1032
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 392,
"type": "Reroute",
"pos": {
"0": 756,
"1": 293
},
"size": [
75,
26
],
"flags": {},
"order": 25,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1027
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
768
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 262,
"type": "MaskToImage",
"pos": {
"0": 1240,
"1": 20
},
"size": {
"0": 210,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 29,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 828,
"slot_index": 0
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
408,
558
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "MaskToImage"
},
"widgets_values": []
},
{
"id": 323,
"type": "ImageToMask",
"pos": {
"0": 1790,
"1": 20
},
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": true
},
"order": 34,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 563
}
],
"outputs": [
{
"name": "MASK",
"type": "MASK",
"links": [
1421
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageToMask"
},
"widgets_values": [
"red"
]
},
{
"id": 264,
"type": "PreviewImage",
"pos": {
"0": 1500,
"1": -340
},
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 31,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 408
}
],
"outputs": [],
"title": "Mask",
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 579,
"type": "Reroute",
"pos": {
"0": 1967,
"1": 51
},
"size": [
75,
26
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1260
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1281
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 410,
"type": "Reroute",
"pos": {
"0": 1118,
"1": 104
},
"size": [
75,
26
],
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1473,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
836
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 411,
"type": "Reroute",
"pos": {
"0": 1118,
"1": 124
},
"size": [
75,
26
],
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1474,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
838
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 369,
"type": "PreviewImage",
"pos": {
"0": 1020,
"1": -340
},
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 38,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1052
}
],
"outputs": [],
"title": "InstantId Control Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 326,
"type": "PreviewImage",
"pos": {
"0": 1740,
"1": -340
},
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 35,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 590
}
],
"outputs": [],
"title": "Blurred Mask",
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 407,
"type": "Reroute",
"pos": {
"0": 1148,
"1": 45
},
"size": [
75,
26
],
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1481
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
923,
926
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 408,
"type": "Reroute",
"pos": {
"0": 802,
"1": 62
},
"size": [
75,
26
],
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1470
}
],
"outputs": [
{
"name": "",
"type": "MASK",
"links": [
828
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 650,
"type": "LoadInsightface",
"pos": {
"0": -620,
"1": -130
},
"size": {
"0": 210,
"1": 26
},
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"links": [
1491
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInsightface"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 642,
"type": "FaceEmbed",
"pos": {
"0": -310,
"1": -100
},
"size": {
"0": 292.20001220703125,
"1": 66
},
"flags": {
"collapsed": true
},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 1491
},
{
"name": "face_image",
"type": "IMAGE",
"link": 1460
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "face embeds",
"type": "FACE_EMBED",
"links": [
1498
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbed"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 652,
"type": "LoadInstantIdAdapter",
"pos": {
"0": -377,
"1": 805
},
"size": {
"0": 291.64471435546875,
"1": 78
},
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "InstantId_adapter",
"type": "INSTANTID_ADAPTER",
"links": [
1495
],
"slot_index": 0,
"shape": 3
},
{
"name": "resampler",
"type": "RESAMPLER",
"links": [
1496
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInstantIdAdapter"
},
"widgets_values": [
"ip-adapter.bin"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 252,
"type": "CLIPTextEncode",
"pos": {
"0": 330,
"1": 785
},
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1324
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1499
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 287,
"type": "CLIPTextEncode",
"pos": {
"0": 328,
"1": 930
},
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {},
"order": 24,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1508
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1500
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 653,
"type": "FaceEmbedCombine",
"pos": {
"0": 100,
"1": 442
},
"size": {
"0": 367.79998779296875,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "resampler",
"type": "RESAMPLER",
"link": 1496
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": 1498
}
],
"outputs": [
{
"name": "face conditioning",
"type": "FACE_CONDITIONING",
"links": [
1497,
1501
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbedCombine"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 636,
"type": "ControlNetLoader",
"pos": {
"0": -395,
"1": 949
},
"size": {
"0": 315,
"1": 58
},
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
1502
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetLoader"
},
"widgets_values": [
"ControlNetModel\\diffusion_pytorch_model.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 481,
"type": "Reroute",
"pos": {
"0": 922,
"1": -173
},
"size": [
75,
26
],
"flags": {},
"order": 36,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1519
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1052,
1503
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 654,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 724,
"1": 563
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 39,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1499
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1500
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1501
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1502
},
{
"name": "image",
"type": "IMAGE",
"link": 1503
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
1505
],
"slot_index": 0,
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
1506
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
0.7000000000000001
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 471,
"type": "Reroute",
"pos": {
"0": 229,
"1": 784
},
"size": [
75,
26
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1507
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1324,
1508
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 651,
"type": "InstantIdAdapterApply",
"pos": {
"0": 328,
"1": 564
},
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 26,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1493
},
{
"name": "instantId_adapter",
"type": "INSTANTID_ADAPTER",
"link": 1495
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1497
}
],
"outputs": [
{
"name": "model",
"type": "MODEL",
"links": [
1494
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "InstantIdAdapterApply"
},
"widgets_values": [
0.8
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 319,
"type": "ImageBlur",
"pos": {
"0": 1450,
"1": -10
},
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": false
},
"order": 32,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 558
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
563,
590
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageBlur"
},
"widgets_values": [
1,
0.1
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 641,
"type": "LoadImage",
"pos": {
"0": -339,
"1": -467
},
"size": {
"0": 235.36587524414062,
"1": 314
},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1460
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"title": "Load face Referecnce",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"han3.jpg",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 359,
"type": "KSampler",
"pos": {
"0": 1097,
"1": 420
},
"size": {
"0": 316.94384765625,
"1": 486.80694580078125
},
"flags": {},
"order": 40,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1494
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1505
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1506
},
{
"name": "latent_image",
"type": "LATENT",
"link": 1420
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1340
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
262169733824826,
"randomize",
30,
3,
"euler",
"karras",
0.7000000000000001
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 647,
"type": "PreprocessImage",
"pos": {
"0": 316,
"1": 43
},
"size": {
"0": 267.10882568359375,
"1": 290
},
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1467
},
{
"name": "mask",
"type": "MASK",
"link": 1468
},
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "resized_image",
"type": "IMAGE",
"links": [
1481
],
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": [
1470
],
"shape": 3
},
{
"name": "control_image",
"type": "IMAGE",
"links": [],
"shape": 3
},
{
"name": "x",
"type": "INT",
"links": [
1473,
1511
],
"slot_index": 3,
"shape": 3
},
{
"name": "y",
"type": "INT",
"links": [
1474,
1512
],
"slot_index": 4,
"shape": 3
},
{
"name": "original_width",
"type": "INT",
"links": [
1475,
1513
],
"slot_index": 5,
"shape": 3
},
{
"name": "original_height",
"type": "INT",
"links": [
1476,
1514
],
"slot_index": 6,
"shape": 3
},
{
"name": "new_width",
"type": "INT",
"links": [
1509
],
"slot_index": 7,
"shape": 3
},
{
"name": "new_height",
"type": "INT",
"links": [
1510
],
"slot_index": 8,
"shape": 3
}
],
"properties": {
"Node name for S&R": "PreprocessImage"
},
"widgets_values": [
1024,
1024,
"auto",
100
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 253,
"type": "LoadImage",
"pos": {
"0": -376,
"1": 38
},
"size": {
"0": 290.3117370605469,
"1": 314
},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1260,
1415,
1467,
1516
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": [
1468
],
"slot_index": 1,
"shape": 3
}
],
"title": "Load Pose Image",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"clipspace/clipspace-mask-10749683.900000036.png [input]",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 657,
"type": "KpsCrop",
"pos": {
"0": 418,
"1": -481
},
"size": [
315,
130
],
"flags": {
"collapsed": true
},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1515
},
{
"name": "x",
"type": "INT",
"link": 1511,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 1512,
"widget": {
"name": "y"
}
},
{
"name": "width",
"type": "INT",
"link": 1513,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1514,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1517
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsCrop"
},
"widgets_values": [
0,
0,
1024,
1024
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 658,
"type": "KpsScale",
"pos": {
"0": 591,
"1": -482
},
"size": [
315,
82
],
"flags": {
"collapsed": true
},
"order": 30,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1517
},
{
"name": "width",
"type": "INT",
"link": 1509,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1510,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1518
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsScale"
},
"widgets_values": [
1024,
1024
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 656,
"type": "KpsMaker",
"pos": {
"0": 720,
"1": -481
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 33,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1518
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
1519
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 241,
"type": "CheckpointLoaderSimple",
"pos": {
"0": -379,
"1": 430
},
"size": {
"0": 295.705078125,
"1": 310
},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
1493
],
"slot_index": 0,
"shape": 3
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
1507
],
"slot_index": 1,
"shape": 3
},
{
"name": "VAE",
"type": "VAE",
"links": [
1026
],
"slot_index": 2,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"custom_3.9.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 655,
"type": "KpsDraw",
"pos": {
"0": 54,
"1": -510
},
"size": [
267.81456321367295,
428.21230167557974
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "image_reference",
"type": "IMAGE",
"link": 1516,
"shape": 7
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1515
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsDraw"
},
"widgets_values": [
1200,
800,
{
"array": [
[
394.6050096339114,
255.1059730250482
],
[
478.61271676300584,
252.02312138728325
],
[
432.86908077994457,
301.9498607242341
],
[
396.14643545279387,
345.27938342967246
],
[
467.82273603082854,
347.59152215799617
]
],
"opacities": [
1,
1,
1,
1,
1
],
"width": 1200,
"height": 800,
"bbox": [
[
367,
221
],
[
507,
380
]
]
},
-2.101654327671302,
""
],
"color": "#432",
"bgcolor": "#653"
}
],
"links": [
[
408,
262,
0,
264,
0,
"IMAGE"
],
[
558,
262,
0,
319,
0,
"IMAGE"
],
[
563,
319,
0,
323,
0,
"IMAGE"
],
[
590,
319,
0,
326,
0,
"IMAGE"
],
[
768,
392,
0,
248,
1,
"VAE"
],
[
781,
394,
0,
396,
1,
"IMAGE"
],
[
797,
248,
0,
394,
0,
"IMAGE"
],
[
828,
408,
0,
262,
0,
"MASK"
],
[
836,
410,
0,
396,
3,
"INT"
],
[
838,
411,
0,
396,
4,
"INT"
],
[
840,
412,
0,
394,
1,
"INT"
],
[
841,
413,
0,
394,
2,
"INT"
],
[
923,
407,
0,
354,
0,
"IMAGE"
],
[
926,
407,
0,
268,
0,
"IMAGE"
],
[
1024,
474,
0,
354,
1,
"VAE"
],
[
1026,
241,
2,
474,
0,
"*"
],
[
1027,
474,
0,
392,
0,
"*"
],
[
1032,
389,
0,
396,
0,
"IMAGE"
],
[
1052,
481,
0,
369,
0,
"IMAGE"
],
[
1260,
253,
0,
579,
0,
"*"
],
[
1281,
579,
0,
258,
0,
"IMAGE"
],
[
1314,
569,
0,
389,
0,
"*"
],
[
1324,
471,
0,
252,
0,
"CLIP"
],
[
1340,
359,
0,
248,
0,
"LATENT"
],
[
1415,
253,
0,
569,
0,
"*"
],
[
1418,
396,
0,
395,
0,
"IMAGE"
],
[
1419,
354,
0,
630,
0,
"LATENT"
],
[
1420,
630,
0,
359,
3,
"LATENT"
],
[
1421,
323,
0,
630,
1,
"MASK"
],
[
1460,
641,
0,
642,
1,
"IMAGE"
],
[
1467,
253,
0,
647,
0,
"IMAGE"
],
[
1468,
253,
1,
647,
1,
"MASK"
],
[
1470,
647,
1,
408,
0,
"*"
],
[
1473,
647,
3,
410,
0,
"*"
],
[
1474,
647,
4,
411,
0,
"*"
],
[
1475,
647,
5,
412,
0,
"*"
],
[
1476,
647,
6,
413,
0,
"*"
],
[
1481,
647,
0,
407,
0,
"*"
],
[
1491,
650,
0,
642,
0,
"INSIGHTFACE_APP"
],
[
1493,
241,
0,
651,
0,
"MODEL"
],
[
1494,
651,
0,
359,
0,
"MODEL"
],
[
1495,
652,
0,
651,
1,
"INSTANTID_ADAPTER"
],
[
1496,
652,
1,
653,
0,
"RESAMPLER"
],
[
1497,
653,
0,
651,
2,
"FACE_CONDITIONING"
],
[
1498,
642,
0,
653,
1,
"FACE_EMBED"
],
[
1499,
252,
0,
654,
0,
"CONDITIONING"
],
[
1500,
287,
0,
654,
1,
"CONDITIONING"
],
[
1501,
653,
0,
654,
2,
"FACE_CONDITIONING"
],
[
1502,
636,
0,
654,
3,
"CONTROL_NET"
],
[
1503,
481,
0,
654,
4,
"IMAGE"
],
[
1505,
654,
0,
359,
1,
"CONDITIONING"
],
[
1506,
654,
1,
359,
2,
"CONDITIONING"
],
[
1507,
241,
1,
471,
0,
"*"
],
[
1508,
471,
0,
287,
0,
"CLIP"
],
[
1509,
647,
7,
658,
1,
"INT"
],
[
1510,
647,
8,
658,
2,
"INT"
],
[
1511,
647,
3,
657,
1,
"INT"
],
[
1512,
647,
4,
657,
2,
"INT"
],
[
1513,
647,
5,
657,
3,
"INT"
],
[
1514,
647,
6,
657,
4,
"INT"
],
[
1515,
655,
0,
657,
0,
"KPS_DATA"
],
[
1516,
253,
0,
655,
0,
"IMAGE"
],
[
1517,
657,
0,
658,
0,
"KPS_DATA"
],
[
1518,
658,
0,
656,
0,
"KPS_DATA"
],
[
1519,
656,
0,
481,
0,
"*"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.8140274938684812,
"offset": [
197.468087005649,
435.0052219028575
]
},
"groupNodes": {}
},
"version": 0.4
}
================================================
FILE: workflows/draw_kps_rotate.json
================================================
{
"last_node_id": 681,
"last_link_id": 1581,
"nodes": [
{
"id": 268,
"type": "PreviewImage",
"pos": {
"0": 1260,
"1": -340
},
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 38,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 926
}
],
"outputs": [],
"title": "Image for inpaint",
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 412,
"type": "Reroute",
"pos": {
"0": 1201,
"1": 144
},
"size": [
75,
26
],
"flags": {},
"order": 33,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1475,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
840
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 413,
"type": "Reroute",
"pos": {
"0": 1201,
"1": 164
},
"size": [
75,
26
],
"flags": {},
"order": 34,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1476,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
841
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 395,
"type": "PreviewImage",
"pos": {
"0": 1440,
"1": 430
},
"size": {
"0": 612.2093505859375,
"1": 842.1597900390625
},
"flags": {},
"order": 57,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1535
}
],
"outputs": [],
"title": "Output Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 630,
"type": "SetLatentNoiseMask",
"pos": {
"0": 894,
"1": 510
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 48,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1419
},
{
"name": "mask",
"type": "MASK",
"link": 1421
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1420
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "SetLatentNoiseMask"
},
"widgets_values": []
},
{
"id": 354,
"type": "VAEEncode",
"pos": {
"0": 751,
"1": 510
},
"size": {
"0": 309.7555847167969,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 37,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 923
},
{
"name": "vae",
"type": "VAE",
"link": 1024
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1419
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEEncode"
},
"widgets_values": []
},
{
"id": 474,
"type": "Reroute",
"pos": {
"0": 416,
"1": 478
},
"size": [
75,
26
],
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1026
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1024,
1027
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 248,
"type": "VAEDecode",
"pos": {
"0": 1438,
"1": 323
},
"size": {
"0": 140,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 52,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1340
},
{
"name": "vae",
"type": "VAE",
"link": 768
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
797
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 392,
"type": "Reroute",
"pos": {
"0": 756,
"1": 293
},
"size": [
75,
26
],
"flags": {},
"order": 24,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1027
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
768
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 262,
"type": "MaskToImage",
"pos": {
"0": 1240,
"1": 20
},
"size": {
"0": 210,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 39,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 828,
"slot_index": 0
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
408,
558
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "MaskToImage"
},
"widgets_values": []
},
{
"id": 323,
"type": "ImageToMask",
"pos": {
"0": 1790,
"1": 20
},
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": true
},
"order": 45,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 563
}
],
"outputs": [
{
"name": "MASK",
"type": "MASK",
"links": [
1421
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageToMask"
},
"widgets_values": [
"red"
]
},
{
"id": 264,
"type": "PreviewImage",
"pos": {
"0": 1500,
"1": -340
},
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 42,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 408
}
],
"outputs": [],
"title": "Mask",
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 410,
"type": "Reroute",
"pos": {
"0": 1118,
"1": 104
},
"size": [
75,
26
],
"flags": {},
"order": 31,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1473,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
836
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 411,
"type": "Reroute",
"pos": {
"0": 1118,
"1": 124
},
"size": [
75,
26
],
"flags": {},
"order": 32,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1474,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
838
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 369,
"type": "PreviewImage",
"pos": {
"0": 1020,
"1": -340
},
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 49,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1052
}
],
"outputs": [],
"title": "InstantId Control Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 326,
"type": "PreviewImage",
"pos": {
"0": 1740,
"1": -340
},
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 46,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 590
}
],
"outputs": [],
"title": "Blurred Mask",
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 650,
"type": "LoadInsightface",
"pos": {
"0": -870,
"1": -130
},
"size": {
"0": 210,
"1": 26
},
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"links": [
1491
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInsightface"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 408,
"type": "Reroute",
"pos": {
"0": 826,
"1": -9
},
"size": [
75,
26
],
"flags": {},
"order": 30,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1504
}
],
"outputs": [
{
"name": "",
"type": "MASK",
"links": [
828
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 648,
"type": "ImageCrop",
"pos": {
"0": 638,
"1": -145
},
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 35,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1549
},
{
"name": "width",
"type": "INT",
"link": 1484,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1485,
"widget": {
"name": "height"
}
},
{
"name": "x",
"type": "INT",
"link": 1482,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 1483,
"widget": {
"name": "y"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1480
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageCrop"
},
"widgets_values": [
512,
512,
0,
0
]
},
{
"id": 655,
"type": "Reroute",
"pos": {
"0": 1979,
"1": -377
},
"size": [
75,
26
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1503,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "FLOAT",
"links": [
1537
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 258,
"type": "PreviewImage",
"pos": {
"0": 2100,
"1": 433
},
"size": {
"0": 612.114013671875,
"1": 845.9668579101562
},
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1552
}
],
"outputs": [],
"title": "Input Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 394,
"type": "ImageScale",
"pos": {
"0": 1607,
"1": 197
},
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 53,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 797
},
{
"name": "width",
"type": "INT",
"link": 840,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 841,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
781
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"bilinear",
512,
512,
"disabled"
]
},
{
"id": 667,
"type": "ComposeRotated",
"pos": {
"0": 2285,
"1": 73
},
"size": {
"0": 254.40000915527344,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 56,
"mode": 0,
"inputs": [
{
"name": "original_image",
"type": "IMAGE",
"link": 1533
},
{
"name": "rotated_image",
"type": "IMAGE",
"link": 1538
}
],
"outputs": [
{
"name": "image",
"type": "IMAGE",
"links": [
1535
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ComposeRotated"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 579,
"type": "Reroute",
"pos": {
"0": 1973,
"1": 43
},
"size": [
75,
26
],
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1544
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 668,
"type": "RotateImage",
"pos": {
"0": 2099,
"1": 150
},
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": true
},
"order": 55,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1536
},
{
"name": "angle",
"type": "FLOAT",
"link": 1537,
"widget": {
"name": "angle"
}
}
],
"outputs": [
{
"name": "rotated_image",
"type": "IMAGE",
"links": [
1538
],
"shape": 3
}
],
"properties": {
"Node name for S&R": "RotateImage"
},
"widgets_values": [
0,
false
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 569,
"type": "Reroute",
"pos": {
"0": 206,
"1": 313
},
"size": [
75,
26
],
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1546
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1314
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 389,
"type": "Reroute",
"pos": {
"0": 1708,
"1": 311
},
"size": [
75,
26
],
"flags": {},
"order": 26,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1314
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1032
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 396,
"type": "ImageCompositeMasked",
"pos": {
"0": 1838,
"1": 149
},
"size": {
"0": 327.45550537109375,
"1": 140.86239624023438
},
"flags": {
"collapsed": true
},
"order": 54,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 1032
},
{
"name": "source",
"type": "IMAGE",
"link": 781
},
{
"name": "mask",
"type": "MASK",
"link": null,
"shape": 7
},
{
"name": "x",
"type": "INT",
"link": 836,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 838,
"widget": {
"name": "y"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1536
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
false
]
},
{
"id": 407,
"type": "Reroute",
"pos": {
"0": 1122,
"1": 42
},
"size": [
75,
26
],
"flags": {},
"order": 29,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1481
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
923,
926
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 672,
"type": "Reroute",
"pos": {
"0": 207,
"1": 402
},
"size": [
75,
26
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1551
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1552
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 673,
"type": "InstantIdAdapterApply",
"pos": {
"0": 330,
"1": 596
},
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 25,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1555
},
{
"name": "instantId_adapter",
"type": "INSTANTID_ADAPTER",
"link": 1556
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1559
}
],
"outputs": [
{
"name": "model",
"type": "MODEL",
"links": [
1554
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "InstantIdAdapterApply"
},
"widgets_values": [
0.8
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 674,
"type": "LoadInstantIdAdapter",
"pos": {
"0": -651,
"1": 808
},
"size": {
"0": 315,
"1": 78
},
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "InstantId_adapter",
"type": "INSTANTID_ADAPTER",
"links": [
1556
],
"slot_index": 0,
"shape": 3
},
{
"name": "resampler",
"type": "RESAMPLER",
"links": [
1557
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInstantIdAdapter"
},
"widgets_values": [
"ip-adapter.bin"
]
},
{
"id": 642,
"type": "FaceEmbed",
"pos": {
"0": -572,
"1": -78
},
"size": {
"0": 292.20001220703125,
"1": 66
},
"flags": {
"collapsed": true
},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 1491
},
{
"name": "face_image",
"type": "IMAGE",
"link": 1460
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "face embeds",
"type": "FACE_EMBED",
"links": [
1558
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbed"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 636,
"type": "ControlNetLoader",
"pos": {
"0": -650,
"1": 950
},
"size": {
"0": 315,
"1": 58
},
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
1561
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetLoader"
},
"widgets_values": [
"ControlNetModel\\diffusion_pytorch_model.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 675,
"type": "FaceEmbedCombine",
"pos": {
"0": -87,
"1": 335
},
"size": {
"0": 367.79998779296875,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "resampler",
"type": "RESAMPLER",
"link": 1557
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": 1558
}
],
"outputs": [
{
"name": "face conditioning",
"type": "FACE_CONDITIONING",
"links": [
1559,
1560
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbedCombine"
},
"widgets_values": []
},
{
"id": 252,
"type": "CLIPTextEncode",
"pos": {
"0": 330,
"1": 785
},
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1324
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1562
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 287,
"type": "CLIPTextEncode",
"pos": {
"0": 328,
"1": 930
},
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1568
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1563
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 641,
"type": "LoadImage",
"pos": {
"0": -600,
"1": -460
},
"size": {
"0": 235.36587524414062,
"1": 314
},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1460
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"title": "Load face Referecnce",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"han3.jpg",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 471,
"type": "Reroute",
"pos": {
"0": 229,
"1": 784
},
"size": [
75,
26
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1015
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1324,
1568
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 319,
"type": "ImageBlur",
"pos": {
"0": 1450,
"1": -10
},
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": false
},
"order": 43,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 558
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
563,
590
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageBlur"
},
"widgets_values": [
1,
0.1
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 676,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 708,
"1": 601
},
"size": {
"0": 357.776611328125,
"1": 138
},
"flags": {},
"order": 50,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1562
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1563
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1560
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1561
},
{
"name": "image",
"type": "IMAGE",
"link": 1567
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
1565
],
"slot_index": 0,
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
1566
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
0.7000000000000001
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 653,
"type": "PrimitiveNode",
"pos": {
"0": -93,
"1": -364
},
"size": [
210,
82
],
"flags": {
"collapsed": false
},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "FLOAT",
"type": "FLOAT",
"links": [
1503,
1540,
1543,
1548,
1569
],
"slot_index": 0,
"widget": {
"name": "value"
}
}
],
"title": "ANGLE",
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
0,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 647,
"type": "PreprocessImage",
"pos": {
"0": 315,
"1": 39
},
"size": {
"0": 267.10882568359375,
"1": 290
},
"flags": {},
"order": 28,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1545
},
{
"name": "mask",
"type": "MASK",
"link": 1531
},
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "resized_image",
"type": "IMAGE",
"links": [
1481
],
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": [
1504
],
"shape": 3
},
{
"name": "control_image",
"type": "IMAGE",
"links": [],
"shape": 3
},
{
"name": "x",
"type": "INT",
"links": [
1473,
1482,
1570
],
"slot_index": 3,
"shape": 3
},
{
"name": "y",
"type": "INT",
"links": [
1474,
1483,
1571
],
"slot_index": 4,
"shape": 3
},
{
"name": "original_width",
"type": "INT",
"links": [
1475,
1484,
1572
],
"slot_index": 5,
"shape": 3
},
{
"name": "original_height",
"type": "INT",
"links": [
1476,
1485,
1573
],
"slot_index": 6,
"shape": 3
},
{
"name": "new_width",
"type": "INT",
"links": [
1486,
1575
],
"slot_index": 7,
"shape": 3
},
{
"name": "new_height",
"type": "INT",
"links": [
1487,
1576
],
"slot_index": 8,
"shape": 3
}
],
"properties": {
"Node name for S&R": "PreprocessImage"
},
"widgets_values": [
1024,
1024,
"auto",
100
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 649,
"type": "ImageScale",
"pos": {
"0": 775,
"1": -144
},
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 40,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1480
},
{
"name": "width",
"type": "INT",
"link": 1486,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1487,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"nearest-exact",
512,
512,
"disabled"
]
},
{
"id": 481,
"type": "Reroute",
"pos": {
"0": 919,
"1": -172
},
"size": [
75,
26
],
"flags": {},
"order": 47,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1579
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1052,
1567
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 253,
"type": "LoadImage",
"pos": {
"0": -620,
"1": 40
},
"size": {
"0": 290.3117370605469,
"1": 314
},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1533,
1542,
1551,
1580
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": [
1530
],
"slot_index": 1,
"shape": 3
}
],
"title": "Load Pose Image",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"clipspace/clipspace-mask-52944009.png [input]",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 671,
"type": "RotateImage",
"pos": {
"0": 442,
"1": -338
},
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": true
},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": null
},
{
"name": "angle",
"type": "FLOAT",
"link": 1548,
"widget": {
"name": "angle"
}
}
],
"outputs": [
{
"name": "rotated_image",
"type": "IMAGE",
"links": [
1549
],
"shape": 3
}
],
"properties": {
"Node name for S&R": "RotateImage"
},
"widgets_values": [
0,
true
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 664,
"type": "MaskToImage",
"pos": {
"0": -298,
"1": 89
},
"size": {
"0": 210,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 1530
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1539
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "MaskToImage"
},
"widgets_values": []
},
{
"id": 669,
"type": "RotateImage",
"pos": {
"0": -76,
"1": 88
},
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": true
},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1539
},
{
"name": "angle",
"type": "FLOAT",
"link": 1540,
"widget": {
"name": "angle"
}
}
],
"outputs": [
{
"name": "rotated_image",
"type": "IMAGE",
"links": [
1541
],
"shape": 3
}
],
"properties": {
"Node name for S&R": "RotateImage"
},
"widgets_values": [
0,
true
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 670,
"type": "RotateImage",
"pos": {
"0": -76,
"1": 70
},
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": true
},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1542
},
{
"name": "angle",
"type": "FLOAT",
"link": 1543,
"widget": {
"name": "angle"
}
}
],
"outputs": [
{
"name": "rotated_image",
"type": "IMAGE",
"links": [
1544,
1545,
1546
],
"shape": 3
}
],
"properties": {
"Node name for S&R": "RotateImage"
},
"widgets_values": [
0,
true
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 665,
"type": "ImageToMask",
"pos": {
"0": 76,
"1": 89
},
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": true
},
"order": 27,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1541
}
],
"outputs": [
{
"name": "MASK",
"type": "MASK",
"links": [
1531
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageToMask"
},
"widgets_values": [
"red"
]
},
{
"id": 241,
"type": "CheckpointLoaderSimple",
"pos": {
"0": -629,
"1": 431
},
"size": {
"0": 295.705078125,
"1": 310
},
"flags": {},
"order": 6,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
1555
],
"slot_index": 0,
"shape": 3
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
1015
],
"slot_index": 1,
"shape": 3
},
{
"name": "VAE",
"type": "VAE",
"links": [
1026
],
"slot_index": 2,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"custom_3.9.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 359,
"type": "KSampler",
"pos": {
"0": 1097,
"1": 420
},
"size": {
"0": 316.94384765625,
"1": 486.80694580078125
},
"flags": {},
"order": 51,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1554
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1565
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1566
},
{
"name": "latent_image",
"type": "LATENT",
"link": 1420
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1340
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
930143501615199,
"fixed",
30,
3,
"euler",
"karras",
0.6
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 681,
"type": "KpsDraw",
"pos": {
"0": 192,
"1": -528
},
"size": [
210,
368.356062820341
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "image_reference",
"type": "IMAGE",
"link": 1580,
"shape": 7
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1581
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsDraw"
},
"widgets_values": [
1200,
800,
{
"array": [
[
631.7548746518106,
261.8384401114206
],
[
697.4930362116992,
275.2089136490251
],
[
652.3676880222847,
293.03621169916374
],
[
622.841225626741,
340.94707520891365
],
[
689.6935933147632,
340.94707520891365
]
],
"opacities": [
1,
1,
1,
1,
1
],
"width": 1200,
"height": 800,
"bbox": [
[
598,
236
],
[
723,
368
]
]
},
11.496563017585805,
""
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 677,
"type": "KpsRotate",
"pos": {
"0": 424,
"1": -499
},
"size": [
315,
82
],
"flags": {
"collapsed": true
},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1581
},
{
"name": "angle",
"type": "FLOAT",
"link": 1569,
"widget": {
"name": "angle"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1574
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsRotate"
},
"widgets_values": [
0,
true
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 678,
"type": "KpsCrop",
"pos": {
"0": 597,
"1": -501
},
"size": [
315,
130
],
"flags": {
"collapsed": true
},
"order": 36,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1574
},
{
"name": "x",
"type": "INT",
"link": 1570,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 1571,
"widget": {
"name": "y"
}
},
{
"name": "width",
"type": "INT",
"link": 1572,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1573,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1577
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsCrop"
},
"widgets_values": [
0,
0,
1024,
1024
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 679,
"type": "KpsScale",
"pos": {
"0": 749,
"1": -503
},
"size": [
315,
82
],
"flags": {
"collapsed": true
},
"order": 41,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1577
},
{
"name": "width",
"type": "INT",
"link": 1575,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1576,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1578
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsScale"
},
"widgets_values": [
1024,
1024
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 680,
"type": "KpsMaker",
"pos": {
"0": 876,
"1": -503
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 44,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1578
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
1579
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"color": "#432",
"bgcolor": "#653"
}
],
"links": [
[
408,
262,
0,
264,
0,
"IMAGE"
],
[
558,
262,
0,
319,
0,
"IMAGE"
],
[
563,
319,
0,
323,
0,
"IMAGE"
],
[
590,
319,
0,
326,
0,
"IMAGE"
],
[
768,
392,
0,
248,
1,
"VAE"
],
[
781,
394,
0,
396,
1,
"IMAGE"
],
[
797,
248,
0,
394,
0,
"IMAGE"
],
[
828,
408,
0,
262,
0,
"MASK"
],
[
836,
410,
0,
396,
3,
"INT"
],
[
838,
411,
0,
396,
4,
"INT"
],
[
840,
412,
0,
394,
1,
"INT"
],
[
841,
413,
0,
394,
2,
"INT"
],
[
923,
407,
0,
354,
0,
"IMAGE"
],
[
926,
407,
0,
268,
0,
"IMAGE"
],
[
1015,
241,
1,
471,
0,
"*"
],
[
1024,
474,
0,
354,
1,
"VAE"
],
[
1026,
241,
2,
474,
0,
"*"
],
[
1027,
474,
0,
392,
0,
"*"
],
[
1032,
389,
0,
396,
0,
"IMAGE"
],
[
1052,
481,
0,
369,
0,
"IMAGE"
],
[
1314,
569,
0,
389,
0,
"*"
],
[
1324,
471,
0,
252,
0,
"CLIP"
],
[
1340,
359,
0,
248,
0,
"LATENT"
],
[
1419,
354,
0,
630,
0,
"LATENT"
],
[
1420,
630,
0,
359,
3,
"LATENT"
],
[
1421,
323,
0,
630,
1,
"MASK"
],
[
1460,
641,
0,
642,
1,
"IMAGE"
],
[
1473,
647,
3,
410,
0,
"*"
],
[
1474,
647,
4,
411,
0,
"*"
],
[
1475,
647,
5,
412,
0,
"*"
],
[
1476,
647,
6,
413,
0,
"*"
],
[
1480,
648,
0,
649,
0,
"IMAGE"
],
[
1481,
647,
0,
407,
0,
"*"
],
[
1482,
647,
3,
648,
3,
"INT"
],
[
1483,
647,
4,
648,
4,
"INT"
],
[
1484,
647,
5,
648,
1,
"INT"
],
[
1485,
647,
6,
648,
2,
"INT"
],
[
1486,
647,
7,
649,
1,
"INT"
],
[
1487,
647,
8,
649,
2,
"INT"
],
[
1491,
650,
0,
642,
0,
"INSIGHTFACE_APP"
],
[
1503,
653,
0,
655,
0,
"*"
],
[
1504,
647,
1,
408,
0,
"*"
],
[
1530,
253,
1,
664,
0,
"MASK"
],
[
1531,
665,
0,
647,
1,
"MASK"
],
[
1533,
253,
0,
667,
0,
"IMAGE"
],
[
1535,
667,
0,
395,
0,
"IMAGE"
],
[
1536,
396,
0,
668,
0,
"IMAGE"
],
[
1537,
655,
0,
668,
1,
"FLOAT"
],
[
1538,
668,
0,
667,
1,
"IMAGE"
],
[
1539,
664,
0,
669,
0,
"IMAGE"
],
[
1540,
653,
0,
669,
1,
"FLOAT"
],
[
1541,
669,
0,
665,
0,
"IMAGE"
],
[
1542,
253,
0,
670,
0,
"IMAGE"
],
[
1543,
653,
0,
670,
1,
"FLOAT"
],
[
1544,
670,
0,
579,
0,
"*"
],
[
1545,
670,
0,
647,
0,
"IMAGE"
],
[
1546,
670,
0,
569,
0,
"*"
],
[
1548,
653,
0,
671,
1,
"FLOAT"
],
[
1549,
671,
0,
648,
0,
"IMAGE"
],
[
1551,
253,
0,
672,
0,
"*"
],
[
1552,
672,
0,
258,
0,
"IMAGE"
],
[
1554,
673,
0,
359,
0,
"MODEL"
],
[
1555,
241,
0,
673,
0,
"MODEL"
],
[
1556,
674,
0,
673,
1,
"INSTANTID_ADAPTER"
],
[
1557,
674,
1,
675,
0,
"RESAMPLER"
],
[
1558,
642,
0,
675,
1,
"FACE_EMBED"
],
[
1559,
675,
0,
673,
2,
"FACE_CONDITIONING"
],
[
1560,
675,
0,
676,
2,
"FACE_CONDITIONING"
],
[
1561,
636,
0,
676,
3,
"CONTROL_NET"
],
[
1562,
252,
0,
676,
0,
"CONDITIONING"
],
[
1563,
287,
0,
676,
1,
"CONDITIONING"
],
[
1565,
676,
0,
359,
1,
"CONDITIONING"
],
[
1566,
676,
1,
359,
2,
"CONDITIONING"
],
[
1567,
481,
0,
676,
4,
"IMAGE"
],
[
1568,
471,
0,
287,
0,
"CLIP"
],
[
1569,
653,
0,
677,
1,
"FLOAT"
],
[
1570,
647,
3,
678,
1,
"INT"
],
[
1571,
647,
4,
678,
2,
"INT"
],
[
1572,
647,
5,
678,
3,
"INT"
],
[
1573,
647,
6,
678,
4,
"INT"
],
[
1574,
677,
0,
678,
0,
"KPS_DATA"
],
[
1575,
647,
7,
679,
1,
"INT"
],
[
1576,
647,
8,
679,
2,
"INT"
],
[
1577,
678,
0,
679,
0,
"KPS_DATA"
],
[
1578,
679,
0,
680,
0,
"KPS_DATA"
],
[
1579,
680,
0,
481,
0,
"*"
],
[
1580,
253,
0,
681,
0,
"IMAGE"
],
[
1581,
681,
0,
677,
0,
"KPS_DATA"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.41772481694160596,
"offset": [
1327.0455528255227,
1040.380946090041
]
},
"groupNodes": {}
},
"version": 0.4
}
================================================
FILE: workflows/inpaint.json
================================================
{
"last_node_id": 815,
"last_link_id": 1936,
"nodes": [
{
"id": 798,
"type": "VAEEncode",
"pos": [
116,
-36
],
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 1902
},
{
"name": "vae",
"type": "VAE",
"link": 1905
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1903
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEEncode"
}
},
{
"id": 684,
"type": "LoadImage",
"pos": [
-581,
-341
],
"size": {
"0": 235.36587524414062,
"1": 314
},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1900,
1931
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": [
1901
],
"slot_index": 1,
"shape": 3
}
],
"title": "Load face Referecnce",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"clipspace/clipspace-mask-58760397.399999976.png [input]",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 800,
"type": "CLIPTextEncode",
"pos": [
103,
105
],
"size": {
"0": 314.2625732421875,
"1": 163.22386169433594
},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1910
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1907
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"man wearing a backpack"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 801,
"type": "CLIPTextEncode",
"pos": [
97,
317
],
"size": {
"0": 320.8741760253906,
"1": 127.3620376586914
},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1922
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1908
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 804,
"type": "VAEDecode",
"pos": [
933,
165
],
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1911
},
{
"name": "vae",
"type": "VAE",
"link": 1912
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1920
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
}
},
{
"id": 803,
"type": "ImageScale",
"pos": [
872,
-198
],
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1920
},
{
"name": "width",
"type": "INT",
"link": 1914,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1915,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1923
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"nearest-exact",
512,
512,
"disabled"
]
},
{
"id": 799,
"type": "SetLatentNoiseMask",
"pos": [
328,
-34
],
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1903
},
{
"name": "mask",
"type": "MASK",
"link": 1930
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1906
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "SetLatentNoiseMask"
}
},
{
"id": 810,
"type": "MaskToImage",
"pos": [
111,
-406
],
"size": {
"0": 210,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 1927
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1928
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "MaskToImage"
}
},
{
"id": 814,
"type": "Reroute",
"pos": [
590,
-330
],
"size": [
75,
26
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1931
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1934,
1935
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 808,
"type": "PreviewImage",
"pos": [
1081,
-12
],
"size": {
"0": 432.82342529296875,
"1": 486.14447021484375
},
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1921
}
],
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 813,
"type": "PreviewImage",
"pos": [
1530,
-11
],
"size": {
"0": 432.82342529296875,
"1": 486.14447021484375
},
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1936
}
],
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 806,
"type": "ImageCompositeMasked",
"pos": [
839,
-244
],
"size": {
"0": 315,
"1": 146
},
"flags": {
"collapsed": true
},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 1934
},
{
"name": "source",
"type": "IMAGE",
"link": 1923
},
{
"name": "mask",
"type": "MASK",
"link": null
},
{
"name": "x",
"type": "INT",
"link": 1916,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 1917,
"widget": {
"name": "y"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1921
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
false
]
},
{
"id": 811,
"type": "ImageToMask",
"pos": [
682,
-406
],
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": true
},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1929
}
],
"outputs": [
{
"name": "MASK",
"type": "MASK",
"links": [
1930
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageToMask"
},
"widgets_values": [
"red"
]
},
{
"id": 815,
"type": "Reroute",
"pos": [
1407,
-332
],
"size": [
75,
26
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1935
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1936
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 797,
"type": "PreprocessImage",
"pos": [
-290,
-340
],
"size": {
"0": 342.5999755859375,
"1": 290
},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1900
},
{
"name": "mask",
"type": "MASK",
"link": 1901
},
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": null
}
],
"outputs": [
{
"name": "resized_image",
"type": "IMAGE",
"links": [
1902
],
"slot_index": 0,
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": [
1927
],
"slot_index": 1,
"shape": 3
},
{
"name": "control_image",
"type": "IMAGE",
"links": null,
"shape": 3
},
{
"name": "x",
"type": "INT",
"links": [
1916
],
"slot_index": 3,
"shape": 3
},
{
"name": "y",
"type": "INT",
"links": [
1917
],
"slot_index": 4,
"shape": 3
},
{
"name": "original_width",
"type": "INT",
"links": [
1914
],
"slot_index": 5,
"shape": 3
},
{
"name": "original_height",
"type": "INT",
"links": [
1915
],
"slot_index": 6,
"shape": 3
},
{
"name": "new_width",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "new_height",
"type": "INT",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "PreprocessImage"
},
"widgets_values": [
1024,
1024,
"auto",
150
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 241,
"type": "CheckpointLoaderSimple",
"pos": [
-272,
86
],
"size": {
"0": 295.705078125,
"1": 310
},
"flags": {},
"order": 1,
"mode": 0,
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
1909
],
"slot_index": 0,
"shape": 3
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
1910,
1922
],
"slot_index": 1,
"shape": 3
},
{
"name": "VAE",
"type": "VAE",
"links": [
1905,
1912
],
"slot_index": 2,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"custom_3.9.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 802,
"type": "KSampler",
"pos": [
580,
-13
],
"size": {
"0": 315,
"1": 474
},
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1909
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1907
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1908
},
{
"name": "latent_image",
"type": "LATENT",
"link": 1906
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1911
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
1011860721881702,
"randomize",
20,
3,
"dpm_adaptive",
"normal",
0.75
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 812,
"type": "PreviewImage",
"pos": [
394,
-730
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1926
}
],
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 809,
"type": "ImageBlur",
"pos": [
339,
-434
],
"size": {
"0": 315,
"1": 82
},
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1928
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1926,
1929
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageBlur"
},
"widgets_values": [
1,
0.1
],
"color": "#323",
"bgcolor": "#535"
}
],
"links": [
[
1900,
684,
0,
797,
0,
"IMAGE"
],
[
1901,
684,
1,
797,
1,
"MASK"
],
[
1902,
797,
0,
798,
0,
"IMAGE"
],
[
1903,
798,
0,
799,
0,
"LATENT"
],
[
1905,
241,
2,
798,
1,
"VAE"
],
[
1906,
799,
0,
802,
3,
"LATENT"
],
[
1907,
800,
0,
802,
1,
"CONDITIONING"
],
[
1908,
801,
0,
802,
2,
"CONDITIONING"
],
[
1909,
241,
0,
802,
0,
"MODEL"
],
[
1910,
241,
1,
800,
0,
"CLIP"
],
[
1911,
802,
0,
804,
0,
"LATENT"
],
[
1912,
241,
2,
804,
1,
"VAE"
],
[
1914,
797,
5,
803,
1,
"INT"
],
[
1915,
797,
6,
803,
2,
"INT"
],
[
1916,
797,
3,
806,
3,
"INT"
],
[
1917,
797,
4,
806,
4,
"INT"
],
[
1920,
804,
0,
803,
0,
"IMAGE"
],
[
1921,
806,
0,
808,
0,
"IMAGE"
],
[
1922,
241,
1,
801,
0,
"CLIP"
],
[
1923,
803,
0,
806,
1,
"IMAGE"
],
[
1926,
809,
0,
812,
0,
"IMAGE"
],
[
1927,
797,
1,
810,
0,
"MASK"
],
[
1928,
810,
0,
809,
0,
"IMAGE"
],
[
1929,
809,
0,
811,
0,
"IMAGE"
],
[
1930,
811,
0,
799,
1,
"MASK"
],
[
1931,
684,
0,
814,
0,
"*"
],
[
1934,
814,
0,
806,
0,
"IMAGE"
],
[
1935,
814,
0,
815,
0,
"*"
],
[
1936,
815,
0,
813,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.7627768444386356,
"offset": [
503.9079320530331,
618.436169808715
]
},
"groupNodes": {}
},
"version": 0.4
}
================================================
FILE: workflows/promp2image.json
================================================
{
"last_node_id": 803,
"last_link_id": 1917,
"nodes": [
{
"id": 636,
"type": "ControlNetLoader",
"pos": {
"0": -981,
"1": -259
},
"size": {
"0": 315,
"1": 58
},
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
1802
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetLoader"
},
"widgets_values": [
"ControlNetModel\\diffusion_pytorch_model.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 650,
"type": "LoadInsightface",
"pos": {
"0": -975,
"1": -570
},
"size": {
"0": 308.15679931640625,
"1": 26
},
"flags": {
"collapsed": false
},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"links": [
1491
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInsightface"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 642,
"type": "FaceEmbed",
"pos": {
"0": -549,
"1": -384
},
"size": {
"0": 292.20001220703125,
"1": 66
},
"flags": {
"collapsed": true
},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 1491
},
{
"name": "face_image",
"type": "IMAGE",
"link": 1460
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "face embeds",
"type": "FACE_EMBED",
"links": [
1897
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbed"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 797,
"type": "Reroute",
"pos": {
"0": -181,
"1": -270
},
"size": [
75,
26
],
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1901
}
],
"outputs": [
{
"name": "",
"type": "FACE_CONDITIONING",
"links": [
1900
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 796,
"type": "FaceEmbedCombine",
"pos": {
"0": -545,
"1": -85
},
"size": {
"0": 367.79998779296875,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "resampler",
"type": "RESAMPLER",
"link": 1896
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": 1897
}
],
"outputs": [
{
"name": "face conditioning",
"type": "FACE_CONDITIONING",
"links": [
1898,
1901
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbedCombine"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 798,
"type": "Reroute",
"pos": {
"0": -233,
"1": -459
},
"size": [
75,
26
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1904
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1905
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 799,
"type": "Reroute",
"pos": {
"0": 1300,
"1": -108
},
"size": [
75,
26
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1906
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1907
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 800,
"type": "PreviewImage",
"pos": {
"0": 1412,
"1": -212
},
"size": {
"0": 429.5522155761719,
"1": 367.1863708496094
},
"flags": {},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1908
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 248,
"type": "VAEDecode",
"pos": {
"0": 1352,
"1": -301
},
"size": {
"0": 140,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1340
},
{
"name": "vae",
"type": "VAE",
"link": 1907
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1908
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 793,
"type": "InstantIdAdapterApply",
"pos": {
"0": -214,
"1": -154
},
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1893
},
{
"name": "instantId_adapter",
"type": "INSTANTID_ADAPTER",
"link": 1913
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1898
}
],
"outputs": [
{
"name": "model",
"type": "MODEL",
"links": [
1911
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "InstantIdAdapterApply"
},
"widgets_values": [
0.8
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 775,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 541,
"1": -310
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1800
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1801
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1900
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1802
},
{
"name": "image",
"type": "IMAGE",
"link": 1917
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
1882
],
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
1881
],
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
1
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 774,
"type": "LoadInstantIdAdapter",
"pos": {
"0": -979,
"1": -451
},
"size": {
"0": 315,
"1": 78
},
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "InstantId_adapter",
"type": "INSTANTID_ADAPTER",
"links": [
1913
],
"slot_index": 0,
"shape": 3
},
{
"name": "resampler",
"type": "RESAMPLER",
"links": [
1896
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInstantIdAdapter"
},
"widgets_values": [
"ip-adapter.bin"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 801,
"type": "Reroute",
"pos": {
"0": 150,
"1": -329
},
"size": [
75,
26
],
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1911
}
],
"outputs": [
{
"name": "",
"type": "MODEL",
"links": [
1912
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 287,
"type": "CLIPTextEncode",
"pos": {
"0": 170,
"1": -134
},
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {
"collapsed": false
},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1902
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1801
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"ugly, deformed"
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 359,
"type": "KSampler",
"pos": {
"0": 1002,
"1": -330
},
"size": {
"0": 316.94384765625,
"1": 486.80694580078125
},
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1912
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1882
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1881
},
{
"name": "latent_image",
"type": "LATENT",
"link": 1574
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1340
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
779827001617899,
"randomize",
30,
3,
"dpm_adaptive",
"normal",
1
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 252,
"type": "CLIPTextEncode",
"pos": {
"0": 170,
"1": -457
},
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {
"collapsed": false
},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1905
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1800
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"man in the city, high quality"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 641,
"type": "LoadImage",
"pos": {
"0": -578,
"1": -753
},
"size": {
"0": 235.36587524414062,
"1": 314
},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1460
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"title": "Load face Referecnce",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"han3.jpg",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 677,
"type": "EmptyLatentImage",
"pos": {
"0": 605,
"1": 72
},
"size": {
"0": 315,
"1": 106
},
"flags": {
"collapsed": true
},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "height",
"type": "INT",
"link": 1576,
"widget": {
"name": "height"
}
},
{
"name": "width",
"type": "INT",
"link": 1577,
"widget": {
"name": "width"
}
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1574
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "EmptyLatentImage"
},
"widgets_values": [
1024,
1024,
1
]
},
{
"id": 679,
"type": "PrimitiveNode",
"pos": {
"0": -550,
"1": -21
},
"size": [
210,
82
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
1576,
1914
],
"slot_index": 0,
"widget": {
"name": "height"
}
}
],
"title": "IMAGE HEIGHT",
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
1024,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 680,
"type": "PrimitiveNode",
"pos": {
"0": -548,
"1": 111
},
"size": [
210,
82
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
1577,
1915
],
"slot_index": 0,
"widget": {
"name": "width"
}
}
],
"title": "IMAGE WIDTH",
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
1024,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 802,
"type": "KpsDraw",
"pos": {
"0": -140,
"1": -729
},
"size": [
216.91129927847646,
316.08614490773033
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "image_reference",
"type": "IMAGE",
"link": null,
"shape": 7
},
{
"name": "width",
"type": "INT",
"link": 1915,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1914,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1916
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsDraw"
},
"widgets_values": [
1024,
1024,
{
"array": [
[
451.9881180877503,
286.5507921824582
],
[
560.6024111601599,
286.55079218245834
],
[
506.29526462395495,
340.85793871866235
],
[
451.9881180877503,
395.1650852548673
],
[
560.6024111601594,
395.1650852548666
]
],
"opacities": [
1,
1,
1,
1,
1
],
"width": 1024,
"height": 1024,
"bbox": [
[
416,
251
],
[
597,
432
]
]
},
5.997162807380019e-14,
""
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 794,
"type": "CheckpointLoaderSimple",
"pos": {
"0": -981,
"1": -155
},
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 6,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
1893
],
"slot_index": 0,
"shape": 3
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
1902,
1904
],
"slot_index": 1,
"shape": 3
},
{
"name": "VAE",
"type": "VAE",
"links": [
1906
],
"shape": 3
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"custom_3.9.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 803,
"type": "KpsMaker",
"pos": {
"0": 171,
"1": -701
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1916
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
1917
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"color": "#432",
"bgcolor": "#653"
}
],
"links": [
[
1340,
359,
0,
248,
0,
"LATENT"
],
[
1460,
641,
0,
642,
1,
"IMAGE"
],
[
1491,
650,
0,
642,
0,
"INSIGHTFACE_APP"
],
[
1574,
677,
0,
359,
3,
"LATENT"
],
[
1576,
679,
0,
677,
0,
"INT"
],
[
1577,
680,
0,
677,
1,
"INT"
],
[
1800,
252,
0,
775,
0,
"CONDITIONING"
],
[
1801,
287,
0,
775,
1,
"CONDITIONING"
],
[
1802,
636,
0,
775,
3,
"CONTROL_NET"
],
[
1881,
775,
1,
359,
2,
"CONDITIONING"
],
[
1882,
775,
0,
359,
1,
"CONDITIONING"
],
[
1893,
794,
0,
793,
0,
"MODEL"
],
[
1896,
774,
1,
796,
0,
"RESAMPLER"
],
[
1897,
642,
0,
796,
1,
"FACE_EMBED"
],
[
1898,
796,
0,
793,
2,
"FACE_CONDITIONING"
],
[
1900,
797,
0,
775,
2,
"FACE_CONDITIONING"
],
[
1901,
796,
0,
797,
0,
"*"
],
[
1902,
794,
1,
287,
0,
"CLIP"
],
[
1904,
794,
1,
798,
0,
"*"
],
[
1905,
798,
0,
252,
0,
"CLIP"
],
[
1906,
794,
2,
799,
0,
"*"
],
[
1907,
799,
0,
248,
1,
"VAE"
],
[
1908,
248,
0,
800,
0,
"IMAGE"
],
[
1911,
793,
0,
801,
0,
"*"
],
[
1912,
801,
0,
359,
0,
"MODEL"
],
[
1913,
774,
0,
793,
1,
"INSTANTID_ADAPTER"
],
[
1914,
679,
0,
802,
2,
"INT"
],
[
1915,
680,
0,
802,
1,
"INT"
],
[
1916,
802,
0,
803,
0,
"KPS_DATA"
],
[
1917,
803,
0,
775,
4,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.74002499442588,
"offset": [
861.0086489828302,
902.2316706107554
]
},
"groupNodes": {}
},
"version": 0.4
}
================================================
FILE: workflows/promp2image_detail_pass.json
================================================
{
"last_node_id": 845,
"last_link_id": 2005,
"nodes": [
{
"id": 650,
"type": "LoadInsightface",
"pos": {
"0": -975,
"1": -570
},
"size": {
"0": 308.15679931640625,
"1": 26
},
"flags": {
"collapsed": false
},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"links": [
1491
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInsightface"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 642,
"type": "FaceEmbed",
"pos": {
"0": -549,
"1": -384
},
"size": {
"0": 292.20001220703125,
"1": 66
},
"flags": {
"collapsed": true
},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 1491
},
{
"name": "face_image",
"type": "IMAGE",
"link": 1460
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "face embeds",
"type": "FACE_EMBED",
"links": [
1897
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbed"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 797,
"type": "Reroute",
"pos": {
"0": -181,
"1": -270
},
"size": [
75,
26
],
"flags": {},
"order": 25,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1901
}
],
"outputs": [
{
"name": "",
"type": "FACE_CONDITIONING",
"links": [
1900
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 798,
"type": "Reroute",
"pos": {
"0": -233,
"1": -459
},
"size": [
75,
26
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1904
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1905
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 677,
"type": "EmptyLatentImage",
"pos": {
"0": 605,
"1": 72
},
"size": {
"0": 315,
"1": 106
},
"flags": {
"collapsed": true
},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "height",
"type": "INT",
"link": 1576,
"widget": {
"name": "height"
}
},
{
"name": "width",
"type": "INT",
"link": 1577,
"widget": {
"name": "width"
}
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1574
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "EmptyLatentImage"
},
"widgets_values": [
1024,
1024,
1
]
},
{
"id": 799,
"type": "Reroute",
"pos": {
"0": 1300,
"1": -108
},
"size": [
75,
26
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1906
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1907
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 800,
"type": "PreviewImage",
"pos": {
"0": 1412,
"1": -212
},
"size": {
"0": 429.5522155761719,
"1": 367.1863708496094
},
"flags": {},
"order": 36,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1908
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 793,
"type": "InstantIdAdapterApply",
"pos": {
"0": -214,
"1": -154
},
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 24,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1893
},
{
"name": "instantId_adapter",
"type": "INSTANTID_ADAPTER",
"link": 1913
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1898
}
],
"outputs": [
{
"name": "model",
"type": "MODEL",
"links": [
1911
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "InstantIdAdapterApply"
},
"widgets_values": [
0.8
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 775,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 541,
"1": -310
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 31,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1800
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1801
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1900
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1802
},
{
"name": "image",
"type": "IMAGE",
"link": 2005
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
1882
],
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
1881
],
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
1
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 774,
"type": "LoadInstantIdAdapter",
"pos": {
"0": -979,
"1": -451
},
"size": {
"0": 315,
"1": 78
},
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "InstantId_adapter",
"type": "INSTANTID_ADAPTER",
"links": [
1913
],
"slot_index": 0,
"shape": 3
},
{
"name": "resampler",
"type": "RESAMPLER",
"links": [
1896
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInstantIdAdapter"
},
"widgets_values": [
"ip-adapter.bin"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 801,
"type": "Reroute",
"pos": {
"0": 150,
"1": -329
},
"size": [
75,
26
],
"flags": {},
"order": 30,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1911
}
],
"outputs": [
{
"name": "",
"type": "MODEL",
"links": [
1912,
1952
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 796,
"type": "FaceEmbedCombine",
"pos": {
"0": -545,
"1": -85
},
"size": {
"0": 367.79998779296875,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "resampler",
"type": "RESAMPLER",
"link": 1896
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": 1897
}
],
"outputs": [
{
"name": "face conditioning",
"type": "FACE_CONDITIONING",
"links": [
1898,
1901,
1929
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbedCombine"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 813,
"type": "Reroute",
"pos": {
"0": -158,
"1": 348
},
"size": [
75,
26
],
"flags": {},
"order": 26,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1929
}
],
"outputs": [
{
"name": "",
"type": "FACE_CONDITIONING",
"links": [
1930
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 814,
"type": "Reroute",
"pos": {
"0": 2123,
"1": 347
},
"size": [
75,
26
],
"flags": {},
"order": 32,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1930
}
],
"outputs": [
{
"name": "",
"type": "FACE_CONDITIONING",
"links": [
1931
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 812,
"type": "Reroute",
"pos": {
"0": 1750,
"1": 260
},
"size": [
75,
26
],
"flags": {},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1932
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1925,
1984
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 811,
"type": "Reroute",
"pos": {
"0": -341,
"1": 262
},
"size": [
75,
26
],
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1922
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1932
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 822,
"type": "Reroute",
"pos": {
"0": -559,
"1": 413
},
"size": [
75,
26
],
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1948
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1949
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 823,
"type": "Reroute",
"pos": {
"0": 2362,
"1": 403
},
"size": [
75,
26
],
"flags": {},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1949
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1950,
1959
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 825,
"type": "Reroute",
"pos": {
"0": 2445,
"1": -316
},
"size": [
75,
26
],
"flags": {},
"order": 33,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1952
}
],
"outputs": [
{
"name": "",
"type": "MODEL",
"links": [
1953
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 829,
"type": "Reroute",
"pos": {
"0": 3256,
"1": 407
},
"size": [
75,
26
],
"flags": {},
"order": 29,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1959
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1960
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 806,
"type": "SetLatentNoiseMask",
"pos": {
"0": 2862,
"1": -301
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 46,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1951
},
{
"name": "mask",
"type": "MASK",
"link": 1961
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1954
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "SetLatentNoiseMask"
},
"widgets_values": []
},
{
"id": 821,
"type": "VAEEncode",
"pos": {
"0": 2653,
"1": -302
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 44,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 1947
},
{
"name": "vae",
"type": "VAE",
"link": 1950
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1951
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEEncode"
},
"widgets_values": []
},
{
"id": 832,
"type": "Reroute",
"pos": {
"0": 3500,
"1": -660
},
"size": [
75,
26
],
"flags": {},
"order": 41,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1966,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
1968
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 833,
"type": "Reroute",
"pos": {
"0": 3499,
"1": -641
},
"size": [
75,
26
],
"flags": {},
"order": 42,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1967,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
1969
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 834,
"type": "PreviewImage",
"pos": {
"0": 3896,
"1": -249
},
"size": {
"0": 828.2597045898438,
"1": 691.5579223632812
},
"flags": {},
"order": 54,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1970
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 807,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 2603,
"1": -171
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 48,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1927
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1928
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1931
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1976
},
{
"name": "image",
"type": "IMAGE",
"link": 2000
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
1955
],
"slot_index": 0,
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
1956
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
1
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 828,
"type": "PreviewImage",
"pos": {
"0": 3476,
"1": -250
},
"size": {
"0": 402.61297607421875,
"1": 261.80877685546875
},
"flags": {},
"order": 51,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1958
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 809,
"type": "CLIPTextEncode",
"pos": {
"0": 1886,
"1": -168
},
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {
"collapsed": false
},
"order": 27,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1925
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1927
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 248,
"type": "VAEDecode",
"pos": {
"0": 1352,
"1": -301
},
"size": {
"0": 140,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 35,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1340
},
{
"name": "vae",
"type": "VAE",
"link": 1907
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1908,
1934,
1979
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 837,
"type": "Reroute",
"pos": {
"0": 2148,
"1": 525
},
"size": [
75,
26
],
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1981
}
],
"outputs": [
{
"name": "",
"type": "CONTROL_NET",
"links": [
1976
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 836,
"type": "Reroute",
"pos": {
"0": -470,
"1": 525
},
"size": [
75,
26
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1974
}
],
"outputs": [
{
"name": "",
"type": "CONTROL_NET",
"links": [
1981
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 824,
"type": "KSampler",
"pos": {
"0": 3132,
"1": -312
},
"size": {
"0": 315,
"1": 474
},
"flags": {},
"order": 49,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1953
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1955
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1956
},
{
"name": "latent_image",
"type": "LATENT",
"link": 1954
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1957
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
93165221564175,
"randomize",
20,
3,
"euler",
"normal",
0.6
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 831,
"type": "ImageCompositeMasked",
"pos": {
"0": 3788,
"1": -626
},
"size": {
"0": 315,
"1": 146
},
"flags": {
"collapsed": true
},
"order": 53,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 1983
},
{
"name": "source",
"type": "IMAGE",
"link": 1982
},
{
"name": "mask",
"type": "MASK",
"link": null,
"shape": 7
},
{
"name": "x",
"type": "INT",
"link": 1968,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 1969,
"widget": {
"name": "y"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1970
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
false
]
},
{
"id": 636,
"type": "ControlNetLoader",
"pos": {
"0": -984,
"1": -248
},
"size": {
"0": 315,
"1": 58
},
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
1802,
1974
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetLoader"
},
"widgets_values": [
"ControlNetModel\\diffusion_pytorch_model.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 287,
"type": "CLIPTextEncode",
"pos": {
"0": 170,
"1": -134
},
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {
"collapsed": false
},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1902
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1801
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"ugly, deformed"
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 803,
"type": "Reroute",
"pos": {
"0": 2489,
"1": -730
},
"size": [
75,
26
],
"flags": {},
"order": 39,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1943
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1947
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 805,
"type": "Reroute",
"pos": {
"0": 2689,
"1": -709
},
"size": [
75,
26
],
"flags": {},
"order": 40,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1918
}
],
"outputs": [
{
"name": "",
"type": "MASK",
"links": [
1961
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 830,
"type": "ImageScale",
"pos": {
"0": 3664,
"1": -568
},
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 52,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1962
},
{
"name": "width",
"type": "INT",
"link": 1963,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1964,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1982
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"nearest-exact",
512,
512,
"disabled"
]
},
{
"id": 827,
"type": "VAEDecode",
"pos": {
"0": 3471,
"1": -311
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 50,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1957
},
{
"name": "vae",
"type": "VAE",
"link": 1960
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1958,
1962
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 838,
"type": "Reroute",
"pos": {
"0": 3370,
"1": -427
},
"size": [
75,
26
],
"flags": {},
"order": 38,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1979
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1983
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 810,
"type": "CLIPTextEncode",
"pos": {
"0": 1883,
"1": -4
},
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {
"collapsed": false
},
"order": 28,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1984
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1928
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 252,
"type": "CLIPTextEncode",
"pos": {
"0": 170,
"1": -457
},
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {
"collapsed": false
},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1905
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1800
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"man in the city, high quality"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 680,
"type": "PrimitiveNode",
"pos": {
"0": -548,
"1": 111
},
"size": [
210,
82
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
1577,
1985
],
"slot_index": 0,
"widget": {
"name": "width"
}
}
],
"title": "IMAGE WIDTH",
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
1024,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 679,
"type": "PrimitiveNode",
"pos": {
"0": -550,
"1": -21
},
"size": [
210,
82
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
1576,
1986
],
"slot_index": 0,
"widget": {
"name": "height"
}
}
],
"title": "IMAGE HEIGHT",
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
1024,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 802,
"type": "PreprocessImage",
"pos": {
"0": 1862,
"1": -737
},
"size": {
"0": 342.5999755859375,
"1": 290
},
"flags": {},
"order": 37,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1934
},
{
"name": "mask",
"type": "MASK",
"link": 2003
},
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "resized_image",
"type": "IMAGE",
"links": [
1943
],
"slot_index": 0,
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": [
1918
],
"slot_index": 1,
"shape": 3
},
{
"name": "control_image",
"type": "IMAGE",
"links": [],
"slot_index": 2,
"shape": 3
},
{
"name": "x",
"type": "INT",
"links": [
1966,
1989
],
"slot_index": 3,
"shape": 3
},
{
"name": "y",
"type": "INT",
"links": [
1967,
1990
],
"slot_index": 4,
"shape": 3
},
{
"name": "original_width",
"type": "INT",
"links": [
1963,
1991
],
"slot_index": 5,
"shape": 3
},
{
"name": "original_height",
"type": "INT",
"links": [
1964,
1992
],
"slot_index": 6,
"shape": 3
},
{
"name": "new_width",
"type": "INT",
"links": [
1996
],
"slot_index": 7,
"shape": 3
},
{
"name": "new_height",
"type": "INT",
"links": [
1997
],
"slot_index": 8,
"shape": 3
}
],
"properties": {
"Node name for S&R": "PreprocessImage"
},
"widgets_values": [
1024,
1024,
"auto",
50
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 841,
"type": "KpsCrop",
"pos": {
"0": 2234,
"1": -405
},
"size": [
315,
130
],
"flags": {
"collapsed": true
},
"order": 43,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1995
},
{
"name": "x",
"type": "INT",
"link": 1989,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 1990,
"widget": {
"name": "y"
}
},
{
"name": "width",
"type": "INT",
"link": 1991,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1992,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1998
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsCrop"
},
"widgets_values": [
0,
0,
1024,
1024
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 641,
"type": "LoadImage",
"pos": {
"0": -578,
"1": -753
},
"size": {
"0": 235.36587524414062,
"1": 314
},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1460
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"title": "Load face Referecnce",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"han3.jpg",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 835,
"type": "Reroute",
"pos": {
"0": 1495,
"1": -437
},
"size": [
75,
26
],
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1994
}
],
"outputs": [
{
"name": "",
"type": "KPS_DATA",
"links": [
1995
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 842,
"type": "KpsScale",
"pos": {
"0": 2379,
"1": -405
},
"size": [
315,
82
],
"flags": {
"collapsed": true
},
"order": 45,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1998
},
{
"name": "width",
"type": "INT",
"link": 1996,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1997,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1999
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsScale"
},
"widgets_values": [
1024,
1024
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 843,
"type": "KpsMaker",
"pos": {
"0": 2505,
"1": -405
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 47,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1999
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
2000
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 794,
"type": "CheckpointLoaderSimple",
"pos": {
"0": -981,
"1": -155
},
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 6,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
1893
],
"slot_index": 0,
"shape": 3
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
1902,
1904,
1922
],
"slot_index": 1,
"shape": 3
},
{
"name": "VAE",
"type": "VAE",
"links": [
1906,
1948
],
"shape": 3
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"custom_3.9.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 844,
"type": "MaskFromKps",
"pos": {
"0": 485,
"1": -727
},
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": false
},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2002
}
],
"outputs": [
{
"name": "mask",
"type": "MASK",
"links": [
2003
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "MaskFromKps"
},
"widgets_values": [
3
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 845,
"type": "KpsMaker",
"pos": {
"0": 178,
"1": -599
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2004
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
2005
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 359,
"type": "KSampler",
"pos": {
"0": 1002,
"1": -330
},
"size": {
"0": 316.94384765625,
"1": 486.80694580078125
},
"flags": {},
"order": 34,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1912
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1882
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1881
},
{
"name": "latent_image",
"type": "LATENT",
"link": 1574
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1340
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
1070699419372419,
"randomize",
30,
3,
"euler_ancestral",
"normal",
1
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 839,
"type": "KpsDraw",
"pos": {
"0": -185,
"1": -734
},
"size": [
236.70093846010064,
364.1435968095893
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "image_reference",
"type": "IMAGE",
"link": null,
"shape": 7
},
{
"name": "width",
"type": "INT",
"link": 1985,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1986,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1994,
2002,
2004
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsDraw"
},
"widgets_values": [
1024,
1024,
{
"array": [
[
472.04601395803036,
196.62261562933992
],
[
518.1434010837521,
196.62261562934006
],
[
495.09470752089123,
219.6713091922009
],
[
472.0460139580306,
242.7200027550619
],
[
518.1434010837517,
242.72000275506167
]
],
"opacities": [
1,
1,
1,
1,
1
],
"width": 1024,
"height": 1024,
"bbox": [
[
457,
182
],
[
534,
259
]
]
},
1.7663083511306758e-13,
""
],
"color": "#432",
"bgcolor": "#653"
}
],
"links": [
[
1340,
359,
0,
248,
0,
"LATENT"
],
[
1460,
641,
0,
642,
1,
"IMAGE"
],
[
1491,
650,
0,
642,
0,
"INSIGHTFACE_APP"
],
[
1574,
677,
0,
359,
3,
"LATENT"
],
[
1576,
679,
0,
677,
0,
"INT"
],
[
1577,
680,
0,
677,
1,
"INT"
],
[
1800,
252,
0,
775,
0,
"CONDITIONING"
],
[
1801,
287,
0,
775,
1,
"CONDITIONING"
],
[
1802,
636,
0,
775,
3,
"CONTROL_NET"
],
[
1881,
775,
1,
359,
2,
"CONDITIONING"
],
[
1882,
775,
0,
359,
1,
"CONDITIONING"
],
[
1893,
794,
0,
793,
0,
"MODEL"
],
[
1896,
774,
1,
796,
0,
"RESAMPLER"
],
[
1897,
642,
0,
796,
1,
"FACE_EMBED"
],
[
1898,
796,
0,
793,
2,
"FACE_CONDITIONING"
],
[
1900,
797,
0,
775,
2,
"FACE_CONDITIONING"
],
[
1901,
796,
0,
797,
0,
"*"
],
[
1902,
794,
1,
287,
0,
"CLIP"
],
[
1904,
794,
1,
798,
0,
"*"
],
[
1905,
798,
0,
252,
0,
"CLIP"
],
[
1906,
794,
2,
799,
0,
"*"
],
[
1907,
799,
0,
248,
1,
"VAE"
],
[
1908,
248,
0,
800,
0,
"IMAGE"
],
[
1911,
793,
0,
801,
0,
"*"
],
[
1912,
801,
0,
359,
0,
"MODEL"
],
[
1913,
774,
0,
793,
1,
"INSTANTID_ADAPTER"
],
[
1918,
802,
1,
805,
0,
"*"
],
[
1922,
794,
1,
811,
0,
"*"
],
[
1925,
812,
0,
809,
0,
"CLIP"
],
[
1927,
809,
0,
807,
0,
"CONDITIONING"
],
[
1928,
810,
0,
807,
1,
"CONDITIONING"
],
[
1929,
796,
0,
813,
0,
"*"
],
[
1930,
813,
0,
814,
0,
"*"
],
[
1931,
814,
0,
807,
2,
"FACE_CONDITIONING"
],
[
1932,
811,
0,
812,
0,
"*"
],
[
1934,
248,
0,
802,
0,
"IMAGE"
],
[
1943,
802,
0,
803,
0,
"*"
],
[
1947,
803,
0,
821,
0,
"IMAGE"
],
[
1948,
794,
2,
822,
0,
"*"
],
[
1949,
822,
0,
823,
0,
"*"
],
[
1950,
823,
0,
821,
1,
"VAE"
],
[
1951,
821,
0,
806,
0,
"LATENT"
],
[
1952,
801,
0,
825,
0,
"*"
],
[
1953,
825,
0,
824,
0,
"MODEL"
],
[
1954,
806,
0,
824,
3,
"LATENT"
],
[
1955,
807,
0,
824,
1,
"CONDITIONING"
],
[
1956,
807,
1,
824,
2,
"CONDITIONING"
],
[
1957,
824,
0,
827,
0,
"LATENT"
],
[
1958,
827,
0,
828,
0,
"IMAGE"
],
[
1959,
823,
0,
829,
0,
"*"
],
[
1960,
829,
0,
827,
1,
"VAE"
],
[
1961,
805,
0,
806,
1,
"MASK"
],
[
1962,
827,
0,
830,
0,
"IMAGE"
],
[
1963,
802,
5,
830,
1,
"INT"
],
[
1964,
802,
6,
830,
2,
"INT"
],
[
1966,
802,
3,
832,
0,
"*"
],
[
1967,
802,
4,
833,
0,
"*"
],
[
1968,
832,
0,
831,
3,
"INT"
],
[
1969,
833,
0,
831,
4,
"INT"
],
[
1970,
831,
0,
834,
0,
"IMAGE"
],
[
1974,
636,
0,
836,
0,
"*"
],
[
1976,
837,
0,
807,
3,
"CONTROL_NET"
],
[
1979,
248,
0,
838,
0,
"*"
],
[
1981,
836,
0,
837,
0,
"*"
],
[
1982,
830,
0,
831,
1,
"IMAGE"
],
[
1983,
838,
0,
831,
0,
"IMAGE"
],
[
1984,
812,
0,
810,
0,
"CLIP"
],
[
1985,
680,
0,
839,
1,
"INT"
],
[
1986,
679,
0,
839,
2,
"INT"
],
[
1989,
802,
3,
841,
1,
"INT"
],
[
1990,
802,
4,
841,
2,
"INT"
],
[
1991,
802,
5,
841,
3,
"INT"
],
[
1992,
802,
6,
841,
4,
"INT"
],
[
1994,
839,
0,
835,
0,
"*"
],
[
1995,
835,
0,
841,
0,
"KPS_DATA"
],
[
1996,
802,
7,
842,
1,
"INT"
],
[
1997,
802,
8,
842,
2,
"INT"
],
[
1998,
841,
0,
842,
0,
"KPS_DATA"
],
[
1999,
842,
0,
843,
0,
"KPS_DATA"
],
[
2000,
843,
0,
807,
4,
"IMAGE"
],
[
2002,
839,
0,
844,
0,
"KPS_DATA"
],
[
2003,
844,
0,
802,
1,
"MASK"
],
[
2004,
839,
0,
845,
0,
"KPS_DATA"
],
[
2005,
845,
0,
775,
4,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.2853116706110234,
"offset": [
2023.7196990378452,
1390.7439411220903
]
},
"groupNodes": {}
},
"version": 0.4
}
================================================
FILE: workflows/prompts2img_2faces_enhancement.json
================================================
{
"last_node_id": 806,
"last_link_id": 1916,
"nodes": [
{
"id": 642,
"type": "FaceEmbed",
"pos": {
"0": -556,
"1": -384
},
"size": {
"0": 292.20001220703125,
"1": 66
},
"flags": {
"collapsed": true
},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 1491
},
{
"name": "face_image",
"type": "IMAGE",
"link": 1460
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "face embeds",
"type": "FACE_EMBED",
"links": [
1822
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbed"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 685,
"type": "FaceEmbed",
"pos": {
"0": -556,
"1": 29
},
"size": {
"0": 292.20001220703125,
"1": 66
},
"flags": {
"collapsed": true
},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 1610
},
{
"name": "face_image",
"type": "IMAGE",
"link": 1591
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "face embeds",
"type": "FACE_EMBED",
"links": [
1824
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbed"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 774,
"type": "LoadInstantIdAdapter",
"pos": {
"0": -979,
"1": -451
},
"size": {
"0": 315,
"1": 78
},
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "InstantId_adapter",
"type": "INSTANTID_ADAPTER",
"links": null,
"shape": 3
},
{
"name": "resampler",
"type": "RESAMPLER",
"links": [
1821,
1823
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInstantIdAdapter"
},
"widgets_values": [
"ip-adapter.bin"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 778,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 307,
"1": -317
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 40,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1814
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1815
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1825
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1816
},
{
"name": "image",
"type": "IMAGE",
"link": 1899
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
1818
],
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
1819
],
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
1
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 690,
"type": "ConditioningCombine",
"pos": {
"0": 821,
"1": -535
},
"size": {
"0": 342.5999755859375,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 44,
"mode": 0,
"inputs": [
{
"name": "conditioning_1",
"type": "CONDITIONING",
"link": 1804
},
{
"name": "conditioning_2",
"type": "CONDITIONING",
"link": 1818
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1638
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ConditioningCombine"
},
"widgets_values": []
},
{
"id": 691,
"type": "ConditioningCombine",
"pos": {
"0": 830,
"1": -462
},
"size": {
"0": 342.5999755859375,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 45,
"mode": 0,
"inputs": [
{
"name": "conditioning_1",
"type": "CONDITIONING",
"link": 1805
},
{
"name": "conditioning_2",
"type": "CONDITIONING",
"link": 1819
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1640
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ConditioningCombine"
},
"widgets_values": []
},
{
"id": 696,
"type": "ConditioningConcat",
"pos": {
"0": 1088,
"1": -586
},
"size": {
"0": 380.4000244140625,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 46,
"mode": 0,
"inputs": [
{
"name": "conditioning_to",
"type": "CONDITIONING",
"link": 1638
},
{
"name": "conditioning_from",
"type": "CONDITIONING",
"link": 1637
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1632
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ConditioningConcat"
},
"widgets_values": []
},
{
"id": 697,
"type": "ConditioningConcat",
"pos": {
"0": 1095,
"1": -412
},
"size": {
"0": 380.4000244140625,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 47,
"mode": 0,
"inputs": [
{
"name": "conditioning_to",
"type": "CONDITIONING",
"link": 1640
},
{
"name": "conditioning_from",
"type": "CONDITIONING",
"link": 1639
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1636
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ConditioningConcat"
},
"widgets_values": []
},
{
"id": 714,
"type": "Reroute",
"pos": {
"0": 983,
"1": 422
},
"size": [
75,
26
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1797
}
],
"outputs": [
{
"name": "",
"type": "MODEL",
"links": [
1665
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 677,
"type": "EmptyLatentImage",
"pos": {
"0": 691,
"1": 237
},
"size": {
"0": 315,
"1": 106
},
"flags": {
"collapsed": true
},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "height",
"type": "INT",
"link": 1576,
"widget": {
"name": "height"
}
},
{
"name": "width",
"type": "INT",
"link": 1577,
"widget": {
"name": "width"
}
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1574
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "EmptyLatentImage"
},
"widgets_values": [
1024,
1024,
1
]
},
{
"id": 715,
"type": "Reroute",
"pos": {
"0": 1256,
"1": 423
},
"size": [
75,
26
],
"flags": {},
"order": 32,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1665
}
],
"outputs": [
{
"name": "",
"type": "MODEL",
"links": [
1667,
1683
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 779,
"type": "FaceEmbedCombine",
"pos": {
"0": -333,
"1": -384
},
"size": {
"0": 367.79998779296875,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 25,
"mode": 0,
"inputs": [
{
"name": "resampler",
"type": "RESAMPLER",
"link": 1821
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": 1822
}
],
"outputs": [
{
"name": "face conditioning",
"type": "FACE_CONDITIONING",
"links": [
1826,
1849
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbedCombine"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 700,
"type": "KSampler",
"pos": {
"0": 1690,
"1": 421
},
"size": {
"0": 316.94384765625,
"1": 486.80694580078125
},
"flags": {},
"order": 57,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1667
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1847
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1848
},
{
"name": "latent_image",
"type": "LATENT",
"link": 1695
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1655
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
391082448969380,
"randomize",
30,
3,
"euler",
"karras",
0.7000000000000001
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 248,
"type": "VAEDecode",
"pos": {
"0": 1867,
"1": -537
},
"size": {
"0": 140,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 49,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1340
},
{
"name": "vae",
"type": "VAE",
"link": 1621
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1647,
1778
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 786,
"type": "Reroute",
"pos": {
"0": -343,
"1": 1045
},
"size": [
75,
26
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1851
}
],
"outputs": [
{
"name": "",
"type": "CONTROL_NET",
"links": [
1852,
1853
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 735,
"type": "Reroute",
"pos": {
"0": 228,
"1": 1046
},
"size": [
75,
26
],
"flags": {},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1852
}
],
"outputs": [
{
"name": "",
"type": "CONTROL_NET",
"links": [
1845
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 726,
"type": "Reroute",
"pos": {
"0": 3181,
"1": 430
},
"size": [
75,
26
],
"flags": {},
"order": 41,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1683
}
],
"outputs": [
{
"name": "",
"type": "MODEL",
"links": [
1684
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 788,
"type": "Reroute",
"pos": {
"0": -3,
"1": 981
},
"size": [
75,
26
],
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1855
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1856,
1857,
1858
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 744,
"type": "Reroute",
"pos": {
"0": 472,
"1": 1045
},
"size": [
75,
26
],
"flags": {},
"order": 24,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1853
}
],
"outputs": [
{
"name": "",
"type": "CONTROL_NET",
"links": [
1868
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 784,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 1181,
"1": 982
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 56,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1843
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1844
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1850
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1845
},
{
"name": "image",
"type": "IMAGE",
"link": 1895
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
1847
],
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
1848
],
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
1
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 785,
"type": "Reroute",
"pos": {
"0": 199,
"1": 1009
},
"size": [
75,
26
],
"flags": {},
"order": 37,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1849
}
],
"outputs": [
{
"name": "",
"type": "FACE_CONDITIONING",
"links": [
1850
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 780,
"type": "FaceEmbedCombine",
"pos": {
"0": -341,
"1": 27
},
"size": {
"0": 367.79998779296875,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 26,
"mode": 0,
"inputs": [
{
"name": "resampler",
"type": "RESAMPLER",
"link": 1823
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": 1824
}
],
"outputs": [
{
"name": "face conditioning",
"type": "FACE_CONDITIONING",
"links": [
1825,
1865
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbedCombine"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 791,
"type": "Reroute",
"pos": {
"0": 1899,
"1": 1009
},
"size": [
75,
26
],
"flags": {},
"order": 38,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1865
}
],
"outputs": [
{
"name": "",
"type": "FACE_CONDITIONING",
"links": [
1872
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 717,
"type": "KSampler",
"pos": {
"0": 3447,
"1": 431
},
"size": {
"0": 316.94384765625,
"1": 486.80694580078125
},
"flags": {},
"order": 68,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1684
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1870
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1871
},
{
"name": "latent_image",
"type": "LATENT",
"link": 1693
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1677
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
907024220118395,
"randomize",
30,
3,
"euler",
"karras",
0.7000000000000001
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 722,
"type": "VAEDecode",
"pos": {
"0": 3909,
"1": 479
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 69,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1677
},
{
"name": "vae",
"type": "VAE",
"link": 1875
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1699
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 710,
"type": "VAEDecode",
"pos": {
"0": 2062,
"1": 487
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 58,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1655
},
{
"name": "vae",
"type": "VAE",
"link": 1874
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1698
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 704,
"type": "SetLatentNoiseMask",
"pos": {
"0": 1186,
"1": 559
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 53,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1694
},
{
"name": "mask",
"type": "MASK",
"link": 1646
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1695
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "SetLatentNoiseMask"
},
"widgets_values": []
},
{
"id": 636,
"type": "ControlNetLoader",
"pos": {
"0": -971,
"1": -259
},
"size": {
"0": 315,
"1": 58
},
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
1802,
1816,
1851
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetLoader"
},
"widgets_values": [
"ControlNetModel\\diffusion_pytorch_model.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 718,
"type": "SetLatentNoiseMask",
"pos": {
"0": 3079,
"1": 554
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 64,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1692
},
{
"name": "mask",
"type": "MASK",
"link": 1669
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1693
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "SetLatentNoiseMask"
},
"widgets_values": []
},
{
"id": 719,
"type": "VAEEncode",
"pos": {
"0": 2760,
"1": 556
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 62,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 1670
},
{
"name": "vae",
"type": "VAE",
"link": 1686
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1692
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEEncode"
},
"widgets_values": []
},
{
"id": 474,
"type": "Reroute",
"pos": {
"0": 823,
"1": 463
},
"size": [
75,
26
],
"flags": {},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1026
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1621,
1874,
1875,
1876,
1877
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 707,
"type": "VAEEncode",
"pos": {
"0": 992,
"1": 559
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 51,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 1648
},
{
"name": "vae",
"type": "VAE",
"link": 1876
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1694
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEEncode"
},
"widgets_values": []
},
{
"id": 727,
"type": "Reroute",
"pos": {
"0": 2558,
"1": 456
},
"size": [
75,
26
],
"flags": {},
"order": 36,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1877
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1686
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 792,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 3021,
"1": 960
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 67,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1866
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1867
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1872
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1868
},
{
"name": "image",
"type": "IMAGE",
"link": 1911
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
1870
],
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
1871
],
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
1
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 789,
"type": "Reroute",
"pos": {
"0": 1612,
"1": 982
},
"size": [
75,
26
],
"flags": {},
"order": 35,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1858
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1859,
1878
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 709,
"type": "ImageScale",
"pos": {
"0": 2090,
"1": 1480
},
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 59,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1698
},
{
"name": "width",
"type": "INT",
"link": 1652,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1700,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1777
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"nearest-exact",
512,
512,
"disabled"
]
},
{
"id": 708,
"type": "ImageCompositeMasked",
"pos": {
"0": 2340,
"1": 1480
},
"size": {
"0": 315,
"1": 146
},
"flags": {
"collapsed": true
},
"order": 60,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 1778
},
{
"name": "source",
"type": "IMAGE",
"link": 1777
},
{
"name": "mask",
"type": "MASK",
"link": null,
"shape": 7
},
{
"name": "x",
"type": "INT",
"link": 1650,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 1651,
"widget": {
"name": "y"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1688,
1779
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
false
]
},
{
"id": 721,
"type": "ImageScale",
"pos": {
"0": 3730,
"1": 1480
},
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 70,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1699
},
{
"name": "width",
"type": "INT",
"link": 1675,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1697,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1780
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"nearest-exact",
512,
512,
"disabled"
]
},
{
"id": 720,
"type": "ImageCompositeMasked",
"pos": {
"0": 3970,
"1": 1480
},
"size": {
"0": 315,
"1": 146
},
"flags": {
"collapsed": true
},
"order": 71,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 1779
},
{
"name": "source",
"type": "IMAGE",
"link": 1780
},
{
"name": "mask",
"type": "MASK",
"link": null,
"shape": 7
},
{
"name": "x",
"type": "INT",
"link": 1673,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 1674,
"widget": {
"name": "y"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1701
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
false
]
},
{
"id": 783,
"type": "CLIPTextEncode",
"pos": {
"0": 421,
"1": 1038
},
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {
"collapsed": true
},
"order": 34,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1857
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1844
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 732,
"type": "CLIPTextEncode",
"pos": {
"0": 425,
"1": 1008
},
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {
"collapsed": true
},
"order": 33,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1856
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1843
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 650,
"type": "LoadInsightface",
"pos": {
"0": -975,
"1": -570
},
"size": {
"0": 308.15679931640625,
"1": 26
},
"flags": {
"collapsed": false
},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"links": [
1491,
1610
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInsightface"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 738,
"type": "CLIPTextEncode",
"pos": {
"0": 2164,
"1": 994
},
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {
"collapsed": true
},
"order": 42,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1859
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1866
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 787,
"type": "CLIPTextEncode",
"pos": {
"0": 2161,
"1": 1021
},
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {
"collapsed": true
},
"order": 43,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1878
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1867
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 252,
"type": "CLIPTextEncode",
"pos": {
"0": 117,
"1": -729
},
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {
"collapsed": true
},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1831
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1800
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 287,
"type": "CLIPTextEncode",
"pos": {
"0": 113,
"1": -676
},
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {
"collapsed": true
},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1830
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1801
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 773,
"type": "CLIPTextEncode",
"pos": {
"0": 117,
"1": -225
},
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {
"collapsed": true
},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1834
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1815
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 772,
"type": "CLIPTextEncode",
"pos": {
"0": 122,
"1": -281
},
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {
"collapsed": true
},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1832
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1814
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 693,
"type": "CLIPTextEncode",
"pos": {
"0": 715,
"1": -370
},
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1862
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1639
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"ugly, deformed,"
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 692,
"type": "CLIPTextEncode",
"pos": {
"0": 711,
"1": -836
},
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1863
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1637
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"men standing on the moon"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 641,
"type": "LoadImage",
"pos": {
"0": -578,
"1": -753
},
"size": {
"0": 235.36587524414062,
"1": 314
},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1460
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"title": "Load face Referecnce",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"han3.jpg",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 684,
"type": "LoadImage",
"pos": {
"0": -581,
"1": -341
},
"size": {
"0": 235.36587524414062,
"1": 314
},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1591
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"title": "Load face Referecnce",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"z19900074AMP,Luke-Skywalker-i-Yoda---Gwiezdne-wojny--Imperium-k.jpg",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 729,
"type": "PreviewImage",
"pos": {
"0": 1901,
"1": -858
},
"size": {
"0": 1278.0570068359375,
"1": 1057.5782470703125
},
"flags": {},
"order": 72,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1701
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 680,
"type": "PrimitiveNode",
"pos": {
"0": -583,
"1": 287
},
"size": [
210,
82
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
1577,
1880,
1882
],
"slot_index": 0,
"widget": {
"name": "width"
}
}
],
"title": "IMAGE WIDTH",
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
1024,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 679,
"type": "PrimitiveNode",
"pos": {
"0": -589,
"1": 130
},
"size": [
210,
82
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
1576,
1881,
1883
],
"slot_index": 0,
"widget": {
"name": "height"
}
}
],
"title": "IMAGE HEIGHT",
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
1024,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 799,
"type": "KpsMaker",
"pos": {
"0": 990,
"1": 926
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 55,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1894
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
1895
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 797,
"type": "KpsScale",
"pos": {
"0": 824,
"1": 925
},
"size": [
315,
82
],
"flags": {
"collapsed": true
},
"order": 54,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1891
},
{
"name": "width",
"type": "INT",
"link": 1892,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1893,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1894
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsScale"
},
"widgets_values": [
1024,
1024
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 796,
"type": "KpsCrop",
"pos": {
"0": 519,
"1": 925
},
"size": [
315,
130
],
"flags": {
"collapsed": true
},
"order": 52,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1896
},
{
"name": "x",
"type": "INT",
"link": 1887,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 1888,
"widget": {
"name": "y"
}
},
{
"name": "width",
"type": "INT",
"link": 1889,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1890,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1891
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsCrop"
},
"widgets_values": [
0,
0,
1024,
1024
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 801,
"type": "KpsMaker",
"pos": {
"0": 126,
"1": -356
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 29,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1898
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
1899
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 698,
"type": "PreprocessImage",
"pos": {
"0": 559,
"1": 576
},
"size": {
"0": 342.5999755859375,
"1": 290
},
"flags": {},
"order": 50,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1647
},
{
"name": "mask",
"type": "MASK",
"link": 1900
},
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "resized_image",
"type": "IMAGE",
"links": [
1648
],
"slot_index": 0,
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": [
1646
],
"slot_index": 1,
"shape": 3
},
{
"name": "control_image",
"type": "IMAGE",
"links": null,
"shape": 3
},
{
"name": "x",
"type": "INT",
"links": [
1650,
1887
],
"slot_index": 3,
"shape": 3
},
{
"name": "y",
"type": "INT",
"links": [
1651,
1888
],
"slot_index": 4,
"shape": 3
},
{
"name": "original_width",
"type": "INT",
"links": [
1652,
1889
],
"slot_index": 5,
"shape": 3
},
{
"name": "original_height",
"type": "INT",
"links": [
1700,
1890
],
"slot_index": 6,
"shape": 3
},
{
"name": "new_width",
"type": "INT",
"links": [
1892
],
"slot_index": 7,
"shape": 3
},
{
"name": "new_height",
"type": "INT",
"links": [
1893
],
"slot_index": 8,
"shape": 3
}
],
"properties": {
"Node name for S&R": "PreprocessImage"
},
"widgets_values": [
1024,
1024,
"auto",
50
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 716,
"type": "PreprocessImage",
"pos": {
"0": 2276,
"1": 573
},
"size": {
"0": 342.5999755859375,
"1": 290
},
"flags": {},
"order": 61,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1688
},
{
"name": "mask",
"type": "MASK",
"link": 1901
},
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "resized_image",
"type": "IMAGE",
"links": [
1670
],
"slot_index": 0,
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": [
1669
],
"slot_index": 1,
"shape": 3
},
{
"name": "control_image",
"type": "IMAGE",
"links": null,
"shape": 3
},
{
"name": "x",
"type": "INT",
"links": [
1673,
1903
],
"slot_index": 3,
"shape": 3
},
{
"name": "y",
"type": "INT",
"links": [
1674,
1904
],
"slot_index": 4,
"shape": 3
},
{
"name": "original_width",
"type": "INT",
"links": [
1675,
1905
],
"slot_index": 5,
"shape": 3
},
{
"name": "original_height",
"type": "INT",
"links": [
1697,
1906
],
"slot_index": 6,
"shape": 3
},
{
"name": "new_width",
"type": "INT",
"links": [
1907
],
"slot_index": 7,
"shape": 3
},
{
"name": "new_height",
"type": "INT",
"links": [
1908
],
"slot_index": 8,
"shape": 3
}
],
"properties": {
"Node name for S&R": "PreprocessImage"
},
"widgets_values": [
1024,
1024,
"auto",
50
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 804,
"type": "KpsScale",
"pos": {
"0": 2631,
"1": 936
},
"size": [
315,
82
],
"flags": {
"collapsed": true
},
"order": 65,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1909
},
{
"name": "width",
"type": "INT",
"link": 1907,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1908,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1910
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsScale"
},
"widgets_values": [
1024,
1024
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 805,
"type": "KpsMaker",
"pos": {
"0": 2790,
"1": 937
},
"size": [
220.2954731503596,
26
],
"flags": {
"collapsed": true
},
"order": 66,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1910
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
1911
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 795,
"type": "KpsMaker",
"pos": {
"0": 113,
"1": -796
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 27,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1884
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
1885
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 241,
"type": "CheckpointLoaderSimple",
"pos": {
"0": -615,
"1": 415
},
"size": {
"0": 295.705078125,
"1": 310
},
"flags": {},
"order": 7,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
1797,
1827
],
"slot_index": 0,
"shape": 3
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
1830,
1831,
1832,
1834,
1855,
1862,
1863
],
"slot_index": 1,
"shape": 3
},
{
"name": "VAE",
"type": "VAE",
"links": [
1026
],
"slot_index": 2,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"custom_3.9.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 803,
"type": "KpsCrop",
"pos": {
"0": 2379,
"1": 937
},
"size": [
315,
130
],
"flags": {
"collapsed": true
},
"order": 63,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1915
},
{
"name": "x",
"type": "INT",
"link": 1903,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 1904,
"widget": {
"name": "y"
}
},
{
"name": "width",
"type": "INT",
"link": 1905,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1906,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1909
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsCrop"
},
"widgets_values": [
0,
0,
1024,
1024
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 806,
"type": "Reroute",
"pos": {
"0": 1605,
"1": 909
},
"size": [
75,
26
],
"flags": {},
"order": 31,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1916
}
],
"outputs": [
{
"name": "",
"type": "KPS_DATA",
"links": [
1915
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 793,
"type": "KpsDraw",
"pos": {
"0": -149,
"1": -800
},
"size": [
210,
358
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "image_reference",
"type": "IMAGE",
"link": null,
"shape": 7
},
{
"name": "width",
"type": "INT",
"link": 1880,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1881,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1884,
1896,
1897
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsDraw"
},
"widgets_values": [
1024,
1024,
{
"array": [
[
185.59580655300232,
187.02199039701333
],
[
244.0006073599641,
191.19998211359663
],
[
221.05849582172698,
222.48467966573813
],
[
189.05049611109706,
250.2249460816175
],
[
247.2144826215563,
251.77938488154697
]
],
"opacities": [
1,
1,
1,
1,
1
],
"width": 1024,
"height": 1024,
"bbox": [
[
166,
166
],
[
268,
274
]
]
},
4.0916878761297655,
""
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 794,
"type": "KpsDraw",
"pos": {
"0": -153,
"1": -366
},
"size": [
210,
358
],
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "image_reference",
"type": "IMAGE",
"link": null,
"shape": 7
},
{
"name": "width",
"type": "INT",
"link": 1882,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1883,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1898,
1902,
1916
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsDraw"
},
"widgets_values": [
1024,
1024,
{
"array": [
[
724.2338149076375,
238.3685664974333
],
[
795.1653606539041,
237.69913560023844
],
[
751.5988857938721,
276.67966573816165
],
[
732.1322190965569,
307.41650789181705
],
[
793.289723026619,
310.48304727822654
]
],
"opacities": [
1,
1,
1,
1,
1
],
"width": 1024,
"height": 1024,
"bbox": [
[
701,
214
],
[
819,
335
]
]
},
-0.5407245247846199,
""
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 775,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 302,
"1": -742
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 39,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1800
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1801
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1826
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1802
},
{
"name": "image",
"type": "IMAGE",
"link": 1885
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
1804
],
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
1805
],
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
1
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 800,
"type": "MaskFromKps",
"pos": {
"0": 144,
"1": 592
},
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": false
},
"order": 28,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1897
}
],
"outputs": [
{
"name": "mask",
"type": "MASK",
"links": [
1900
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "MaskFromKps"
},
"widgets_values": [
3
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 802,
"type": "MaskFromKps",
"pos": {
"0": 2005,
"1": 591
},
"size": [
245.22620604999838,
58
],
"flags": {
"collapsed": false
},
"order": 30,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1902
}
],
"outputs": [
{
"name": "mask",
"type": "MASK",
"links": [
1901
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "MaskFromKps"
},
"widgets_values": [
4
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 359,
"type": "KSampler",
"pos": {
"0": 1409,
"1": -564
},
"size": {
"0": 316.94384765625,
"1": 486.80694580078125
},
"flags": {},
"order": 48,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1827
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1632
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1636
},
{
"name": "latent_image",
"type": "LATENT",
"link": 1574
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1340
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
717599660603842,
"randomize",
30,
3,
"euler_ancestral",
"normal",
1
],
"color": "#323",
"bgcolor": "#535"
}
],
"links": [
[
1026,
241,
2,
474,
0,
"*"
],
[
1340,
359,
0,
248,
0,
"LATENT"
],
[
1460,
641,
0,
642,
1,
"IMAGE"
],
[
1491,
650,
0,
642,
0,
"INSIGHTFACE_APP"
],
[
1574,
677,
0,
359,
3,
"LATENT"
],
[
1576,
679,
0,
677,
0,
"INT"
],
[
1577,
680,
0,
677,
1,
"INT"
],
[
1591,
684,
0,
685,
1,
"IMAGE"
],
[
1610,
650,
0,
685,
0,
"INSIGHTFACE_APP"
],
[
1621,
474,
0,
248,
1,
"VAE"
],
[
1632,
696,
0,
359,
1,
"CONDITIONING"
],
[
1636,
697,
0,
359,
2,
"CONDITIONING"
],
[
1637,
692,
0,
696,
1,
"CONDITIONING"
],
[
1638,
690,
0,
696,
0,
"CONDITIONING"
],
[
1639,
693,
0,
697,
1,
"CONDITIONING"
],
[
1640,
691,
0,
697,
0,
"CONDITIONING"
],
[
1646,
698,
1,
704,
1,
"MASK"
],
[
1647,
248,
0,
698,
0,
"IMAGE"
],
[
1648,
698,
0,
707,
0,
"IMAGE"
],
[
1650,
698,
3,
708,
3,
"INT"
],
[
1651,
698,
4,
708,
4,
"INT"
],
[
1652,
698,
5,
709,
1,
"INT"
],
[
1655,
700,
0,
710,
0,
"LATENT"
],
[
1665,
714,
0,
715,
0,
"*"
],
[
1667,
715,
0,
700,
0,
"MODEL"
],
[
1669,
716,
1,
718,
1,
"MASK"
],
[
1670,
716,
0,
719,
0,
"IMAGE"
],
[
1673,
716,
3,
720,
3,
"INT"
],
[
1674,
716,
4,
720,
4,
"INT"
],
[
1675,
716,
5,
721,
1,
"INT"
],
[
1677,
717,
0,
722,
0,
"LATENT"
],
[
1683,
715,
0,
726,
0,
"*"
],
[
1684,
726,
0,
717,
0,
"MODEL"
],
[
1686,
727,
0,
719,
1,
"VAE"
],
[
1688,
708,
0,
716,
0,
"IMAGE"
],
[
1692,
719,
0,
718,
0,
"LATENT"
],
[
1693,
718,
0,
717,
3,
"LATENT"
],
[
1694,
707,
0,
704,
0,
"LATENT"
],
[
1695,
704,
0,
700,
3,
"LATENT"
],
[
1697,
716,
6,
721,
2,
"INT"
],
[
1698,
710,
0,
709,
0,
"IMAGE"
],
[
1699,
722,
0,
721,
0,
"IMAGE"
],
[
1700,
698,
6,
709,
2,
"INT"
],
[
1701,
720,
0,
729,
0,
"IMAGE"
],
[
1777,
709,
0,
708,
1,
"IMAGE"
],
[
1778,
248,
0,
708,
0,
"IMAGE"
],
[
1779,
708,
0,
720,
0,
"IMAGE"
],
[
1780,
721,
0,
720,
1,
"IMAGE"
],
[
1797,
241,
0,
714,
0,
"*"
],
[
1800,
252,
0,
775,
0,
"CONDITIONING"
],
[
1801,
287,
0,
775,
1,
"CONDITIONING"
],
[
1802,
636,
0,
775,
3,
"CONTROL_NET"
],
[
1804,
775,
0,
690,
0,
"CONDITIONING"
],
[
1805,
775,
1,
691,
0,
"CONDITIONING"
],
[
1814,
772,
0,
778,
0,
"CONDITIONING"
],
[
1815,
773,
0,
778,
1,
"CONDITIONING"
],
[
1816,
636,
0,
778,
3,
"CONTROL_NET"
],
[
1818,
778,
0,
690,
1,
"CONDITIONING"
],
[
1819,
778,
1,
691,
1,
"CONDITIONING"
],
[
1821,
774,
1,
779,
0,
"RESAMPLER"
],
[
1822,
642,
0,
779,
1,
"FACE_EMBED"
],
[
1823,
774,
1,
780,
0,
"RESAMPLER"
],
[
1824,
685,
0,
780,
1,
"FACE_EMBED"
],
[
1825,
780,
0,
778,
2,
"FACE_CONDITIONING"
],
[
1826,
779,
0,
775,
2,
"FACE_CONDITIONING"
],
[
1827,
241,
0,
359,
0,
"MODEL"
],
[
1830,
241,
1,
287,
0,
"CLIP"
],
[
1831,
241,
1,
252,
0,
"CLIP"
],
[
1832,
241,
1,
772,
0,
"CLIP"
],
[
1834,
241,
1,
773,
0,
"CLIP"
],
[
1843,
732,
0,
784,
0,
"CONDITIONING"
],
[
1844,
783,
0,
784,
1,
"CONDITIONING"
],
[
1845,
735,
0,
784,
3,
"CONTROL_NET"
],
[
1847,
784,
0,
700,
1,
"CONDITIONING"
],
[
1848,
784,
1,
700,
2,
"CONDITIONING"
],
[
1849,
779,
0,
785,
0,
"*"
],
[
1850,
785,
0,
784,
2,
"FACE_CONDITIONING"
],
[
1851,
636,
0,
786,
0,
"*"
],
[
1852,
786,
0,
735,
0,
"*"
],
[
1853,
786,
0,
744,
0,
"*"
],
[
1855,
241,
1,
788,
0,
"*"
],
[
1856,
788,
0,
732,
0,
"CLIP"
],
[
1857,
788,
0,
783,
0,
"CLIP"
],
[
1858,
788,
0,
789,
0,
"*"
],
[
1859,
789,
0,
738,
0,
"CLIP"
],
[
1862,
241,
1,
693,
0,
"CLIP"
],
[
1863,
241,
1,
692,
0,
"CLIP"
],
[
1865,
780,
0,
791,
0,
"*"
],
[
1866,
738,
0,
792,
0,
"CONDITIONING"
],
[
1867,
787,
0,
792,
1,
"CONDITIONING"
],
[
1868,
744,
0,
792,
3,
"CONTROL_NET"
],
[
1870,
792,
0,
717,
1,
"CONDITIONING"
],
[
1871,
792,
1,
717,
2,
"CONDITIONING"
],
[
1872,
791,
0,
792,
2,
"FACE_CONDITIONING"
],
[
1874,
474,
0,
710,
1,
"VAE"
],
[
1875,
474,
0,
722,
1,
"VAE"
],
[
1876,
474,
0,
707,
1,
"VAE"
],
[
1877,
474,
0,
727,
0,
"*"
],
[
1878,
789,
0,
787,
0,
"CLIP"
],
[
1880,
680,
0,
793,
1,
"INT"
],
[
1881,
679,
0,
793,
2,
"INT"
],
[
1882,
680,
0,
794,
1,
"INT"
],
[
1883,
679,
0,
794,
2,
"INT"
],
[
1884,
793,
0,
795,
0,
"KPS_DATA"
],
[
1885,
795,
0,
775,
4,
"IMAGE"
],
[
1887,
698,
3,
796,
1,
"INT"
],
[
1888,
698,
4,
796,
2,
"INT"
],
[
1889,
698,
5,
796,
3,
"INT"
],
[
1890,
698,
6,
796,
4,
"INT"
],
[
1891,
796,
0,
797,
0,
"KPS_DATA"
],
[
1892,
698,
7,
797,
1,
"INT"
],
[
1893,
698,
8,
797,
2,
"INT"
],
[
1894,
797,
0,
799,
0,
"KPS_DATA"
],
[
1895,
799,
0,
784,
4,
"IMAGE"
],
[
1896,
793,
0,
796,
0,
"KPS_DATA"
],
[
1897,
793,
0,
800,
0,
"KPS_DATA"
],
[
1898,
794,
0,
801,
0,
"KPS_DATA"
],
[
1899,
801,
0,
778,
4,
"IMAGE"
],
[
1900,
800,
0,
698,
1,
"MASK"
],
[
1901,
802,
0,
716,
1,
"MASK"
],
[
1902,
794,
0,
802,
0,
"KPS_DATA"
],
[
1903,
716,
3,
803,
1,
"INT"
],
[
1904,
716,
4,
803,
2,
"INT"
],
[
1905,
716,
5,
803,
3,
"INT"
],
[
1906,
716,
6,
803,
4,
"INT"
],
[
1907,
716,
7,
804,
1,
"INT"
],
[
1908,
716,
8,
804,
2,
"INT"
],
[
1909,
803,
0,
804,
0,
"KPS_DATA"
],
[
1910,
804,
0,
805,
0,
"KPS_DATA"
],
[
1911,
805,
0,
792,
4,
"IMAGE"
],
[
1915,
806,
0,
803,
0,
"KPS_DATA"
],
[
1916,
794,
0,
806,
0,
"*"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 1.7449402268887526,
"offset": [
-1259.0888804104598,
696.9174879037733
]
},
"groupNodes": {}
},
"version": 0.4
}
================================================
FILE: workflows/prop2image_latent_upscale.json
================================================
{
"last_node_id": 871,
"last_link_id": 2058,
"nodes": [
{
"id": 650,
"type": "LoadInsightface",
"pos": {
"0": -975,
"1": -570
},
"size": {
"0": 308.15679931640625,
"1": 26
},
"flags": {
"collapsed": false
},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"links": [
1491
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInsightface"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 642,
"type": "FaceEmbed",
"pos": {
"0": -549,
"1": -384
},
"size": {
"0": 292.20001220703125,
"1": 66
},
"flags": {
"collapsed": true
},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 1491
},
{
"name": "face_image",
"type": "IMAGE",
"link": 1460
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "face embeds",
"type": "FACE_EMBED",
"links": [
1897
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbed"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 797,
"type": "Reroute",
"pos": {
"0": -181,
"1": -270
},
"size": [
75,
26
],
"flags": {},
"order": 27,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1901
}
],
"outputs": [
{
"name": "",
"type": "FACE_CONDITIONING",
"links": [
1900
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 798,
"type": "Reroute",
"pos": {
"0": -233,
"1": -459
},
"size": [
75,
26
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1904
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1905
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 774,
"type": "LoadInstantIdAdapter",
"pos": {
"0": -979,
"1": -451
},
"size": {
"0": 315,
"1": 78
},
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "InstantId_adapter",
"type": "INSTANTID_ADAPTER",
"links": [
1913
],
"slot_index": 0,
"shape": 3
},
{
"name": "resampler",
"type": "RESAMPLER",
"links": [
1896
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInstantIdAdapter"
},
"widgets_values": [
"ip-adapter.bin"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 813,
"type": "Reroute",
"pos": {
"0": -158,
"1": 348
},
"size": [
75,
26
],
"flags": {},
"order": 28,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1929
}
],
"outputs": [
{
"name": "",
"type": "FACE_CONDITIONING",
"links": [
1930
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 814,
"type": "Reroute",
"pos": {
"0": 5150,
"1": 340
},
"size": [
75,
26
],
"flags": {},
"order": 39,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1930
}
],
"outputs": [
{
"name": "",
"type": "FACE_CONDITIONING",
"links": [
1931
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 812,
"type": "Reroute",
"pos": {
"0": 4780,
"1": 250
},
"size": [
75,
26
],
"flags": {},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1932
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1925,
1984
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 811,
"type": "Reroute",
"pos": {
"0": -341,
"1": 262
},
"size": [
75,
26
],
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1922
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1932
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 825,
"type": "Reroute",
"pos": {
"0": 5470,
"1": -320
},
"size": [
75,
26
],
"flags": {},
"order": 47,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2048
}
],
"outputs": [
{
"name": "",
"type": "MODEL",
"links": [
1953
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 829,
"type": "Reroute",
"pos": {
"0": 6300,
"1": 420
},
"size": [
75,
26
],
"flags": {},
"order": 50,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1959
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1960
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 806,
"type": "SetLatentNoiseMask",
"pos": {
"0": 5900,
"1": -290
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 67,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1951
},
{
"name": "mask",
"type": "MASK",
"link": 1961
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1954
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "SetLatentNoiseMask"
},
"widgets_values": []
},
{
"id": 821,
"type": "VAEEncode",
"pos": {
"0": 5690,
"1": -290
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 65,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 1947
},
{
"name": "vae",
"type": "VAE",
"link": 1950
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1951
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEEncode"
},
"widgets_values": []
},
{
"id": 832,
"type": "Reroute",
"pos": {
"0": 6540,
"1": -650
},
"size": [
75,
26
],
"flags": {},
"order": 62,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1966,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
1968
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 833,
"type": "Reroute",
"pos": {
"0": 6540,
"1": -630
},
"size": [
75,
26
],
"flags": {},
"order": 63,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1967,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
1969
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 837,
"type": "Reroute",
"pos": {
"0": 5180,
"1": 520
},
"size": [
75,
26
],
"flags": {},
"order": 30,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2047
}
],
"outputs": [
{
"name": "",
"type": "CONTROL_NET",
"links": [
1976
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 836,
"type": "Reroute",
"pos": {
"0": -470,
"1": 525
},
"size": [
75,
26
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1974
}
],
"outputs": [
{
"name": "",
"type": "CONTROL_NET",
"links": [
2045
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 287,
"type": "CLIPTextEncode",
"pos": {
"0": 170,
"1": -134
},
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {
"collapsed": false
},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1902
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1801,
2011
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"ugly, deformed"
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 830,
"type": "ImageScale",
"pos": {
"0": 6700,
"1": -550
},
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 73,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1962
},
{
"name": "width",
"type": "INT",
"link": 1963,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1964,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1982
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"nearest-exact",
512,
512,
"disabled"
]
},
{
"id": 827,
"type": "VAEDecode",
"pos": {
"0": 6510,
"1": -300
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 71,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1957
},
{
"name": "vae",
"type": "VAE",
"link": 1960
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1958,
1962
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 810,
"type": "CLIPTextEncode",
"pos": {
"0": 4910,
"1": -10
},
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {
"collapsed": false
},
"order": 33,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1984
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1928
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 252,
"type": "CLIPTextEncode",
"pos": {
"0": 170,
"1": -457
},
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {
"collapsed": false
},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1905
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1800,
2010
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"man in the city, high quality"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 680,
"type": "PrimitiveNode",
"pos": {
"0": -548,
"1": 111
},
"size": {
"0": 210,
"1": 82
},
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
1577,
1985
],
"slot_index": 0,
"widget": {
"name": "width"
}
}
],
"title": "IMAGE WIDTH",
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
1024,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 679,
"type": "PrimitiveNode",
"pos": {
"0": -550,
"1": -21
},
"size": {
"0": 210,
"1": 82
},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
1576,
1986
],
"slot_index": 0,
"widget": {
"name": "height"
}
}
],
"title": "IMAGE HEIGHT",
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
1024,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 641,
"type": "LoadImage",
"pos": {
"0": -578,
"1": -753
},
"size": {
"0": 235.36587524414062,
"1": 314
},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1460
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"title": "Load face Referecnce",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"han3.jpg",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 842,
"type": "KpsScale",
"pos": {
"0": 5410,
"1": -410
},
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": true
},
"order": 66,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1998
},
{
"name": "width",
"type": "INT",
"link": 1996,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1997,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1999
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsScale"
},
"widgets_values": [
1024,
1024
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 845,
"type": "KpsMaker",
"pos": {
"0": 178,
"1": -599
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2004
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
2005
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 839,
"type": "KpsDraw",
"pos": {
"0": -185,
"1": -734
},
"size": {
"0": 236.70094299316406,
"1": 364.1435852050781
},
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "image_reference",
"type": "IMAGE",
"link": null,
"shape": 7
},
{
"name": "width",
"type": "INT",
"link": 1985,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1986,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
2004,
2008
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsDraw"
},
"widgets_values": [
1024,
1024,
{
"array": [
[
472.04601395803036,
196.62261562933992
],
[
518.1434010837521,
196.62261562934006
],
[
495.09470752089123,
219.6713091922009
],
[
472.0460139580306,
242.7200027550619
],
[
518.1434010837517,
242.72000275506167
]
],
"opacities": [
1,
1,
1,
1,
1
],
"width": 1024,
"height": 1024,
"bbox": [
[
457,
182
],
[
534,
259
]
]
},
1.7663083511306758e-13,
""
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 636,
"type": "ControlNetLoader",
"pos": {
"0": -984,
"1": -248
},
"size": {
"0": 315,
"1": 58
},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
1802,
1974
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetLoader"
},
"widgets_values": [
"ControlNetModel\\diffusion_pytorch_model.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 796,
"type": "FaceEmbedCombine",
"pos": {
"0": -545,
"1": -85
},
"size": {
"0": 367.79998779296875,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "resampler",
"type": "RESAMPLER",
"link": 1896
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": 1897
}
],
"outputs": [
{
"name": "face conditioning",
"type": "FACE_CONDITIONING",
"links": [
1898,
1901,
1929,
2016
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbedCombine"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 801,
"type": "Reroute",
"pos": {
"0": 150,
"1": -329
},
"size": [
75,
26
],
"flags": {},
"order": 37,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1911
}
],
"outputs": [
{
"name": "",
"type": "MODEL",
"links": [
2019,
2023
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 677,
"type": "EmptyLatentImage",
"pos": {
"0": 605,
"1": 72
},
"size": {
"0": 315,
"1": 106
},
"flags": {
"collapsed": true
},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "height",
"type": "INT",
"link": 1576,
"widget": {
"name": "height"
}
},
{
"name": "width",
"type": "INT",
"link": 1577,
"widget": {
"name": "width"
}
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2022
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "EmptyLatentImage"
},
"widgets_values": [
1024,
1024,
1
]
},
{
"id": 775,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 543,
"1": -301
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 38,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1800
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1801
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1900
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1802
},
{
"name": "image",
"type": "IMAGE",
"link": 2005
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
2020
],
"slot_index": 0,
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
2021
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
1
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 794,
"type": "CheckpointLoaderSimple",
"pos": {
"0": -981,
"1": -155
},
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 6,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
1893
],
"slot_index": 0,
"shape": 3
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
1902,
1904,
1922
],
"slot_index": 1,
"shape": 3
},
{
"name": "VAE",
"type": "VAE",
"links": [
1948
],
"slot_index": 2,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"custom_3.9.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 793,
"type": "InstantIdAdapterApply",
"pos": {
"0": -214,
"1": -154
},
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 26,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1893
},
{
"name": "instantId_adapter",
"type": "INSTANTID_ADAPTER",
"link": 1913
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1898
}
],
"outputs": [
{
"name": "model",
"type": "MODEL",
"links": [
1911
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "InstantIdAdapterApply"
},
"widgets_values": [
0.8
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 822,
"type": "Reroute",
"pos": {
"0": -559,
"1": 413
},
"size": [
75,
26
],
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1948
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
2029
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 860,
"type": "Reroute",
"pos": {
"0": 1240,
"1": 425
},
"size": [
75,
26
],
"flags": {},
"order": 24,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2029
}
],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [
2030,
2034
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 861,
"type": "Reroute",
"pos": {
"0": 3263.10205078125,
"1": 409.437744140625
},
"size": [
75,
26
],
"flags": {},
"order": 34,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2030
}
],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [
2031,
2033
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 850,
"type": "Reroute",
"pos": {
"0": 1331,
"1": -513
},
"size": [
107.2,
26
],
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2008
}
],
"outputs": [
{
"name": "KPS_DATA",
"type": "KPS_DATA",
"links": [
2009
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 865,
"type": "Reroute",
"pos": {
"0": 1672,
"1": -591
},
"size": [
90.4,
26
],
"flags": {},
"order": 49,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2043
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2044
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 862,
"type": "Reroute",
"pos": {
"0": 5090,
"1": 410
},
"size": [
75,
26
],
"flags": {},
"order": 40,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2031
}
],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [
2032
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 834,
"type": "PreviewImage",
"pos": {
"0": 6950,
"1": -230
},
"size": {
"0": 828.2597045898438,
"1": 691.5579223632812
},
"flags": {},
"order": 75,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1970
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 823,
"type": "Reroute",
"pos": {
"0": 5400,
"1": 410
},
"size": [
75,
26
],
"flags": {},
"order": 46,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2032
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1950,
1959
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 851,
"type": "Reroute",
"pos": {
"0": 2231.101806640625,
"1": -439.562255859375
},
"size": [
140.8,
26
],
"flags": {},
"order": 31,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2010
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
2012
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 852,
"type": "Reroute",
"pos": {
"0": 2204.1015625,
"1": -129.56224060058594
},
"size": [
140.8,
26
],
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2011
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
2013
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 855,
"type": "Reroute",
"pos": {
"0": 2195.1015625,
"1": -114.56224822998047
},
"size": [
182.79999999999998,
26
],
"flags": {},
"order": 29,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2016
}
],
"outputs": [
{
"name": "FACE_CONDITIONING",
"type": "FACE_CONDITIONING",
"links": [
2017
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 866,
"type": "Reroute",
"pos": {
"0": 2259.10205078125,
"1": 511.437744140625
},
"size": [
132.39999999999998,
26
],
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2045
}
],
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
2046,
2047
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 831,
"type": "ImageCompositeMasked",
"pos": {
"0": 6830,
"1": -610
},
"size": {
"0": 315,
"1": 146
},
"flags": {
"collapsed": true
},
"order": 74,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 1983
},
{
"name": "source",
"type": "IMAGE",
"link": 1982
},
{
"name": "mask",
"type": "MASK",
"link": null,
"shape": 7
},
{
"name": "x",
"type": "INT",
"link": 1968,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 1969,
"widget": {
"name": "y"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1970
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
false
]
},
{
"id": 859,
"type": "VAEDecode",
"pos": {
"0": 3441.10205078125,
"1": -287.562255859375
},
"size": {
"0": 210,
"1": 46
},
"flags": {},
"order": 54,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 2027
},
{
"name": "vae",
"type": "VAE",
"link": 2033
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2035,
2055
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 858,
"type": "Reroute",
"pos": {
"0": 2687.10205078125,
"1": -327.562255859375
},
"size": [
82,
26
],
"flags": {},
"order": 44,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2023
}
],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
2024,
2048
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 864,
"type": "KpsMaker",
"pos": {
"0": 2418.10205078125,
"1": -413.562255859375
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 35,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2036
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
2037
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 849,
"type": "PrimitiveNode",
"pos": {
"0": 2083.10302734375,
"1": -683.562255859375
},
"size": {
"0": 210,
"1": 82
},
"flags": {},
"order": 7,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "FLOAT",
"type": "FLOAT",
"links": [
2006,
2007
],
"slot_index": 0,
"widget": {
"name": "scale_by"
}
}
],
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
1.4000000000000001,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 853,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 2570.10205078125,
"1": -153.562255859375
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 41,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 2012
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 2013
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 2017
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 2046
},
{
"name": "image",
"type": "IMAGE",
"link": 2037
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
2025
],
"slot_index": 0
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
2026
],
"slot_index": 1
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
0.8
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 248,
"type": "VAEDecode",
"pos": {
"0": 1408,
"1": -293
},
"size": {
"0": 140,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 48,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 2018
},
{
"name": "vae",
"type": "VAE",
"link": 2034
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1908
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 809,
"type": "CLIPTextEncode",
"pos": {
"0": 4910,
"1": -160
},
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {
"collapsed": false
},
"order": 32,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1925
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1927
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 844,
"type": "MaskFromKps",
"pos": {
"0": 4520,
"1": -720
},
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": false
},
"order": 42,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2051
}
],
"outputs": [
{
"name": "mask",
"type": "MASK",
"links": [
2003
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "MaskFromKps"
},
"widgets_values": [
3
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 802,
"type": "PreprocessImage",
"pos": {
"0": 4890,
"1": -740
},
"size": {
"0": 342.5999755859375,
"1": 290
},
"flags": {},
"order": 59,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 2054
},
{
"name": "mask",
"type": "MASK",
"link": 2003
},
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "resized_image",
"type": "IMAGE",
"links": [
1943
],
"slot_index": 0,
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": [
1918
],
"slot_index": 1,
"shape": 3
},
{
"name": "control_image",
"type": "IMAGE",
"links": [],
"slot_index": 2,
"shape": 3
},
{
"name": "x",
"type": "INT",
"links": [
1966,
1989
],
"slot_index": 3,
"shape": 3
},
{
"name": "y",
"type": "INT",
"links": [
1967,
1990
],
"slot_index": 4,
"shape": 3
},
{
"name": "original_width",
"type": "INT",
"links": [
1963,
1991
],
"slot_index": 5,
"shape": 3
},
{
"name": "original_height",
"type": "INT",
"links": [
1964,
1992
],
"slot_index": 6,
"shape": 3
},
{
"name": "new_width",
"type": "INT",
"links": [
1996
],
"slot_index": 7,
"shape": 3
},
{
"name": "new_height",
"type": "INT",
"links": [
1997
],
"slot_index": 8,
"shape": 3
}
],
"properties": {
"Node name for S&R": "PreprocessImage"
},
"widgets_values": [
1024,
1024,
"auto",
50
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 828,
"type": "PreviewImage",
"pos": {
"0": 6520,
"1": -240
},
"size": {
"0": 402.61297607421875,
"1": 261.80877685546875
},
"flags": {},
"order": 72,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1958
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 848,
"type": "KpsScaleBy",
"pos": {
"0": 2327,
"1": -499
},
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": true
},
"order": 25,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2009
},
{
"name": "scale",
"type": "FLOAT",
"link": 2007,
"widget": {
"name": "scale"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
2036,
2040
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsScaleBy"
},
"widgets_values": [
1.4000000000000001
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 843,
"type": "KpsMaker",
"pos": {
"0": 5554,
"1": -411
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 68,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1999
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
2000
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 838,
"type": "Reroute",
"pos": {
"0": 6373,
"1": -381
},
"size": [
75,
26
],
"flags": {},
"order": 58,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2053
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1983
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 868,
"type": "Reroute",
"pos": {
"0": 4748,
"1": -395
},
"size": [
82,
26
],
"flags": {},
"order": 57,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2056
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2053,
2054
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 869,
"type": "Reroute",
"pos": {
"0": 3721,
"1": -398
},
"size": [
82,
26
],
"flags": {},
"order": 56,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2055
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2056
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 863,
"type": "PreviewImage",
"pos": {
"0": 3694,
"1": -276
},
"size": {
"0": 371.20855712890625,
"1": 519.438720703125
},
"flags": {},
"order": 55,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 2035
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 800,
"type": "PreviewImage",
"pos": {
"0": 1544,
"1": -218
},
"size": {
"0": 351.6155090332031,
"1": 362.6221008300781
},
"flags": {
"collapsed": false
},
"order": 51,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1908
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 847,
"type": "LatentUpscaleBy",
"pos": {
"0": 2599,
"1": -557
},
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": true
},
"order": 52,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 2044
},
{
"name": "scale_by",
"type": "FLOAT",
"link": 2006,
"widget": {
"name": "scale_by"
}
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2038
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "LatentUpscaleBy"
},
"widgets_values": [
"nearest-exact",
1.4000000000000001
]
},
{
"id": 803,
"type": "Reroute",
"pos": {
"0": 5525,
"1": -739
},
"size": [
75,
26
],
"flags": {},
"order": 60,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1943
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1947
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 805,
"type": "Reroute",
"pos": {
"0": 5726,
"1": -715
},
"size": [
75,
26
],
"flags": {},
"order": 61,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1918
}
],
"outputs": [
{
"name": "",
"type": "MASK",
"links": [
1961
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 807,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 5692,
"1": -164
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 69,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1927
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1928
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1931
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1976
},
{
"name": "image",
"type": "IMAGE",
"link": 2000
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
1955
],
"slot_index": 0,
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
1956
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
1
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 835,
"type": "Reroute",
"pos": {
"0": 4184,
"1": -527
},
"size": [
75,
26
],
"flags": {},
"order": 36,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2040
}
],
"outputs": [
{
"name": "",
"type": "KPS_DATA",
"links": [
2051,
2057
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 870,
"type": "Reroute",
"pos": {
"0": 4359,
"1": -440.2700500488281
},
"size": [
107.2,
26
],
"flags": {},
"order": 43,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2057
}
],
"outputs": [
{
"name": "KPS_DATA",
"type": "KPS_DATA",
"links": [
2058
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 841,
"type": "KpsCrop",
"pos": {
"0": 5260,
"1": -410
},
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 64,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2058
},
{
"name": "x",
"type": "INT",
"link": 1989,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 1990,
"widget": {
"name": "y"
}
},
{
"name": "width",
"type": "INT",
"link": 1991,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1992,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1998
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsCrop"
},
"widgets_values": [
0,
0,
1024,
1024
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 871,
"type": "Note",
"pos": {
"0": 1384,
"1": -182
},
"size": {
"0": 210,
"1": 291.76165771484375
},
"flags": {},
"order": 8,
"mode": 0,
"inputs": [],
"outputs": [],
"properties": {},
"widgets_values": [
"Image should be undercooked here,\nit runs just enough to set up the scene.\n\nIf you want to end generation here set \"end_at_step\" to \"steps\""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 857,
"type": "KSamplerAdvanced",
"pos": {
"0": 1008,
"1": -320
},
"size": {
"0": 315,
"1": 546
},
"flags": {},
"order": 45,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 2019
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 2020
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 2021
},
{
"name": "latent_image",
"type": "LATENT",
"link": 2022
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2018,
2043
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KSamplerAdvanced"
},
"widgets_values": [
"enable",
197208621749654,
"randomize",
50,
4,
"euler",
"normal",
0,
25,
"disable"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 856,
"type": "KSampler",
"pos": {
"0": 2993.10205078125,
"1": -330.562255859375
},
"size": {
"0": 377.1995544433594,
"1": 577.224609375
},
"flags": {},
"order": 53,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 2024
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 2025
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 2026
},
{
"name": "latent_image",
"type": "LATENT",
"link": 2038
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2027
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
221304521576655,
"randomize",
20,
4,
"euler",
"normal",
0.6
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 824,
"type": "KSampler",
"pos": {
"0": 6170,
"1": -290
},
"size": {
"0": 315,
"1": 474
},
"flags": {},
"order": 70,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1953
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1955
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1956
},
{
"name": "latent_image",
"type": "LATENT",
"link": 1954
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1957
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
347340221446662,
"randomize",
20,
4,
"euler",
"normal",
0.6
],
"color": "#323",
"bgcolor": "#535"
}
],
"links": [
[
1460,
641,
0,
642,
1,
"IMAGE"
],
[
1491,
650,
0,
642,
0,
"INSIGHTFACE_APP"
],
[
1576,
679,
0,
677,
0,
"INT"
],
[
1577,
680,
0,
677,
1,
"INT"
],
[
1800,
252,
0,
775,
0,
"CONDITIONING"
],
[
1801,
287,
0,
775,
1,
"CONDITIONING"
],
[
1802,
636,
0,
775,
3,
"CONTROL_NET"
],
[
1893,
794,
0,
793,
0,
"MODEL"
],
[
1896,
774,
1,
796,
0,
"RESAMPLER"
],
[
1897,
642,
0,
796,
1,
"FACE_EMBED"
],
[
1898,
796,
0,
793,
2,
"FACE_CONDITIONING"
],
[
1900,
797,
0,
775,
2,
"FACE_CONDITIONING"
],
[
1901,
796,
0,
797,
0,
"*"
],
[
1902,
794,
1,
287,
0,
"CLIP"
],
[
1904,
794,
1,
798,
0,
"*"
],
[
1905,
798,
0,
252,
0,
"CLIP"
],
[
1908,
248,
0,
800,
0,
"IMAGE"
],
[
1911,
793,
0,
801,
0,
"*"
],
[
1913,
774,
0,
793,
1,
"INSTANTID_ADAPTER"
],
[
1918,
802,
1,
805,
0,
"*"
],
[
1922,
794,
1,
811,
0,
"*"
],
[
1925,
812,
0,
809,
0,
"CLIP"
],
[
1927,
809,
0,
807,
0,
"CONDITIONING"
],
[
1928,
810,
0,
807,
1,
"CONDITIONING"
],
[
1929,
796,
0,
813,
0,
"*"
],
[
1930,
813,
0,
814,
0,
"*"
],
[
1931,
814,
0,
807,
2,
"FACE_CONDITIONING"
],
[
1932,
811,
0,
812,
0,
"*"
],
[
1943,
802,
0,
803,
0,
"*"
],
[
1947,
803,
0,
821,
0,
"IMAGE"
],
[
1948,
794,
2,
822,
0,
"*"
],
[
1950,
823,
0,
821,
1,
"VAE"
],
[
1951,
821,
0,
806,
0,
"LATENT"
],
[
1953,
825,
0,
824,
0,
"MODEL"
],
[
1954,
806,
0,
824,
3,
"LATENT"
],
[
1955,
807,
0,
824,
1,
"CONDITIONING"
],
[
1956,
807,
1,
824,
2,
"CONDITIONING"
],
[
1957,
824,
0,
827,
0,
"LATENT"
],
[
1958,
827,
0,
828,
0,
"IMAGE"
],
[
1959,
823,
0,
829,
0,
"*"
],
[
1960,
829,
0,
827,
1,
"VAE"
],
[
1961,
805,
0,
806,
1,
"MASK"
],
[
1962,
827,
0,
830,
0,
"IMAGE"
],
[
1963,
802,
5,
830,
1,
"INT"
],
[
1964,
802,
6,
830,
2,
"INT"
],
[
1966,
802,
3,
832,
0,
"*"
],
[
1967,
802,
4,
833,
0,
"*"
],
[
1968,
832,
0,
831,
3,
"INT"
],
[
1969,
833,
0,
831,
4,
"INT"
],
[
1970,
831,
0,
834,
0,
"IMAGE"
],
[
1974,
636,
0,
836,
0,
"*"
],
[
1976,
837,
0,
807,
3,
"CONTROL_NET"
],
[
1982,
830,
0,
831,
1,
"IMAGE"
],
[
1983,
838,
0,
831,
0,
"IMAGE"
],
[
1984,
812,
0,
810,
0,
"CLIP"
],
[
1985,
680,
0,
839,
1,
"INT"
],
[
1986,
679,
0,
839,
2,
"INT"
],
[
1989,
802,
3,
841,
1,
"INT"
],
[
1990,
802,
4,
841,
2,
"INT"
],
[
1991,
802,
5,
841,
3,
"INT"
],
[
1992,
802,
6,
841,
4,
"INT"
],
[
1996,
802,
7,
842,
1,
"INT"
],
[
1997,
802,
8,
842,
2,
"INT"
],
[
1998,
841,
0,
842,
0,
"KPS_DATA"
],
[
1999,
842,
0,
843,
0,
"KPS_DATA"
],
[
2000,
843,
0,
807,
4,
"IMAGE"
],
[
2003,
844,
0,
802,
1,
"MASK"
],
[
2004,
839,
0,
845,
0,
"KPS_DATA"
],
[
2005,
845,
0,
775,
4,
"IMAGE"
],
[
2006,
849,
0,
847,
1,
"FLOAT"
],
[
2007,
849,
0,
848,
1,
"FLOAT"
],
[
2008,
839,
0,
850,
0,
"*"
],
[
2009,
850,
0,
848,
0,
"KPS_DATA"
],
[
2010,
252,
0,
851,
0,
"*"
],
[
2011,
287,
0,
852,
0,
"*"
],
[
2012,
851,
0,
853,
0,
"CONDITIONING"
],
[
2013,
852,
0,
853,
1,
"CONDITIONING"
],
[
2016,
796,
0,
855,
0,
"*"
],
[
2017,
855,
0,
853,
2,
"FACE_CONDITIONING"
],
[
2018,
857,
0,
248,
0,
"LATENT"
],
[
2019,
801,
0,
857,
0,
"MODEL"
],
[
2020,
775,
0,
857,
1,
"CONDITIONING"
],
[
2021,
775,
1,
857,
2,
"CONDITIONING"
],
[
2022,
677,
0,
857,
3,
"LATENT"
],
[
2023,
801,
0,
858,
0,
"*"
],
[
2024,
858,
0,
856,
0,
"MODEL"
],
[
2025,
853,
0,
856,
1,
"CONDITIONING"
],
[
2026,
853,
1,
856,
2,
"CONDITIONING"
],
[
2027,
856,
0,
859,
0,
"LATENT"
],
[
2029,
822,
0,
860,
0,
"*"
],
[
2030,
860,
0,
861,
0,
"*"
],
[
2031,
861,
0,
862,
0,
"*"
],
[
2032,
862,
0,
823,
0,
"*"
],
[
2033,
861,
0,
859,
1,
"VAE"
],
[
2034,
860,
0,
248,
1,
"VAE"
],
[
2035,
859,
0,
863,
0,
"IMAGE"
],
[
2036,
848,
0,
864,
0,
"KPS_DATA"
],
[
2037,
864,
0,
853,
4,
"IMAGE"
],
[
2038,
847,
0,
856,
3,
"LATENT"
],
[
2040,
848,
0,
835,
0,
"*"
],
[
2043,
857,
0,
865,
0,
"*"
],
[
2044,
865,
0,
847,
0,
"LATENT"
],
[
2045,
836,
0,
866,
0,
"*"
],
[
2046,
866,
0,
853,
3,
"CONTROL_NET"
],
[
2047,
866,
0,
837,
0,
"*"
],
[
2048,
858,
0,
825,
0,
"*"
],
[
2051,
835,
0,
844,
0,
"KPS_DATA"
],
[
2053,
868,
0,
838,
0,
"*"
],
[
2054,
868,
0,
802,
0,
"IMAGE"
],
[
2055,
859,
0,
869,
0,
"*"
],
[
2056,
869,
0,
868,
0,
"*"
],
[
2057,
835,
0,
870,
0,
"*"
],
[
2058,
870,
0,
841,
0,
"KPS_DATA"
]
],
"groups": [
{
"title": "Latent upscale",
"bounding": [
2071,
-847,
2044,
1475
],
"color": "#3f789e",
"font_size": 24,
"flags": {}
},
{
"title": "Enhance face",
"bounding": [
4511,
-990,
3383,
1704
],
"color": "#88A",
"font_size": 24,
"flags": {}
}
],
"config": {},
"extra": {
"ds": {
"scale": 0.3138428376721215,
"offset": [
1679.847546217188,
1589.2517600833814
]
},
"groupNodes": {}
},
"version": 0.4
}
================================================
FILE: workflows/prop2image_latent_upscale_with_2d_randomizer.json
================================================
{
"last_node_id": 874,
"last_link_id": 2062,
"nodes": [
{
"id": 650,
"type": "LoadInsightface",
"pos": {
"0": -975,
"1": -570
},
"size": {
"0": 308.15679931640625,
"1": 26
},
"flags": {
"collapsed": false
},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"links": [
1491
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInsightface"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 642,
"type": "FaceEmbed",
"pos": {
"0": -549,
"1": -384
},
"size": {
"0": 292.20001220703125,
"1": 66
},
"flags": {
"collapsed": true
},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 1491
},
{
"name": "face_image",
"type": "IMAGE",
"link": 1460
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "face embeds",
"type": "FACE_EMBED",
"links": [
1897
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbed"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 797,
"type": "Reroute",
"pos": {
"0": -181,
"1": -270
},
"size": [
75,
26
],
"flags": {},
"order": 27,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1901
}
],
"outputs": [
{
"name": "",
"type": "FACE_CONDITIONING",
"links": [
1900
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 798,
"type": "Reroute",
"pos": {
"0": -233,
"1": -459
},
"size": [
75,
26
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1904
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1905
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 774,
"type": "LoadInstantIdAdapter",
"pos": {
"0": -979,
"1": -451
},
"size": {
"0": 315,
"1": 78
},
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "InstantId_adapter",
"type": "INSTANTID_ADAPTER",
"links": [
1913
],
"slot_index": 0,
"shape": 3
},
{
"name": "resampler",
"type": "RESAMPLER",
"links": [
1896
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInstantIdAdapter"
},
"widgets_values": [
"ip-adapter.bin"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 813,
"type": "Reroute",
"pos": {
"0": -158,
"1": 348
},
"size": [
75,
26
],
"flags": {},
"order": 28,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1929
}
],
"outputs": [
{
"name": "",
"type": "FACE_CONDITIONING",
"links": [
1930
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 814,
"type": "Reroute",
"pos": {
"0": 5150,
"1": 340
},
"size": [
75,
26
],
"flags": {},
"order": 39,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1930
}
],
"outputs": [
{
"name": "",
"type": "FACE_CONDITIONING",
"links": [
1931
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 812,
"type": "Reroute",
"pos": {
"0": 4780,
"1": 250
},
"size": [
75,
26
],
"flags": {},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1932
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1925,
1984
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 811,
"type": "Reroute",
"pos": {
"0": -341,
"1": 262
},
"size": [
75,
26
],
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1922
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1932
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 825,
"type": "Reroute",
"pos": {
"0": 5470,
"1": -320
},
"size": [
75,
26
],
"flags": {},
"order": 49,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2048
}
],
"outputs": [
{
"name": "",
"type": "MODEL",
"links": [
1953
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 829,
"type": "Reroute",
"pos": {
"0": 6300,
"1": 420
},
"size": [
75,
26
],
"flags": {},
"order": 52,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1959
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1960
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 806,
"type": "SetLatentNoiseMask",
"pos": {
"0": 5900,
"1": -290
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 69,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1951
},
{
"name": "mask",
"type": "MASK",
"link": 1961
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1954
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "SetLatentNoiseMask"
},
"widgets_values": []
},
{
"id": 821,
"type": "VAEEncode",
"pos": {
"0": 5690,
"1": -290
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 67,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 1947
},
{
"name": "vae",
"type": "VAE",
"link": 1950
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1951
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEEncode"
},
"widgets_values": []
},
{
"id": 832,
"type": "Reroute",
"pos": {
"0": 6540,
"1": -650
},
"size": [
75,
26
],
"flags": {},
"order": 64,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1966,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
1968
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 833,
"type": "Reroute",
"pos": {
"0": 6540,
"1": -630
},
"size": [
75,
26
],
"flags": {},
"order": 65,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1967,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
1969
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 837,
"type": "Reroute",
"pos": {
"0": 5180,
"1": 520
},
"size": [
75,
26
],
"flags": {},
"order": 30,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2047
}
],
"outputs": [
{
"name": "",
"type": "CONTROL_NET",
"links": [
1976
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 836,
"type": "Reroute",
"pos": {
"0": -470,
"1": 525
},
"size": [
75,
26
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1974
}
],
"outputs": [
{
"name": "",
"type": "CONTROL_NET",
"links": [
2045
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 830,
"type": "ImageScale",
"pos": {
"0": 6700,
"1": -550
},
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 75,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1962
},
{
"name": "width",
"type": "INT",
"link": 1963,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1964,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1982
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"nearest-exact",
512,
512,
"disabled"
]
},
{
"id": 827,
"type": "VAEDecode",
"pos": {
"0": 6510,
"1": -300
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 73,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1957
},
{
"name": "vae",
"type": "VAE",
"link": 1960
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1958,
1962
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 810,
"type": "CLIPTextEncode",
"pos": {
"0": 4910,
"1": -10
},
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {
"collapsed": false
},
"order": 33,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1984
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1928
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 252,
"type": "CLIPTextEncode",
"pos": {
"0": 170,
"1": -457
},
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {
"collapsed": false
},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1905
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1800,
2010
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"man in the city, high quality"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 680,
"type": "PrimitiveNode",
"pos": {
"0": -548,
"1": 111
},
"size": {
"0": 210,
"1": 82
},
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
1577,
1985
],
"slot_index": 0,
"widget": {
"name": "width"
}
}
],
"title": "IMAGE WIDTH",
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
1024,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 679,
"type": "PrimitiveNode",
"pos": {
"0": -550,
"1": -21
},
"size": {
"0": 210,
"1": 82
},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
1576,
1986
],
"slot_index": 0,
"widget": {
"name": "height"
}
}
],
"title": "IMAGE HEIGHT",
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
1024,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 641,
"type": "LoadImage",
"pos": {
"0": -578,
"1": -753
},
"size": {
"0": 235.36587524414062,
"1": 314
},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1460
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"title": "Load face Referecnce",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"han3.jpg",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 842,
"type": "KpsScale",
"pos": {
"0": 5410,
"1": -410
},
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": true
},
"order": 68,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1998
},
{
"name": "width",
"type": "INT",
"link": 1996,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1997,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1999
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsScale"
},
"widgets_values": [
1024,
1024
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 636,
"type": "ControlNetLoader",
"pos": {
"0": -984,
"1": -248
},
"size": {
"0": 315,
"1": 58
},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
1802,
1974
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetLoader"
},
"widgets_values": [
"ControlNetModel\\diffusion_pytorch_model.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 796,
"type": "FaceEmbedCombine",
"pos": {
"0": -545,
"1": -85
},
"size": {
"0": 367.79998779296875,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "resampler",
"type": "RESAMPLER",
"link": 1896
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": 1897
}
],
"outputs": [
{
"name": "face conditioning",
"type": "FACE_CONDITIONING",
"links": [
1898,
1901,
1929,
2016
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbedCombine"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 801,
"type": "Reroute",
"pos": {
"0": 150,
"1": -329
},
"size": [
75,
26
],
"flags": {},
"order": 37,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1911
}
],
"outputs": [
{
"name": "",
"type": "MODEL",
"links": [
2019,
2023
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 677,
"type": "EmptyLatentImage",
"pos": {
"0": 605,
"1": 72
},
"size": {
"0": 315,
"1": 106
},
"flags": {
"collapsed": true
},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "height",
"type": "INT",
"link": 1576,
"widget": {
"name": "height"
}
},
{
"name": "width",
"type": "INT",
"link": 1577,
"widget": {
"name": "width"
}
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2022
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "EmptyLatentImage"
},
"widgets_values": [
1024,
1024,
1
]
},
{
"id": 775,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 543,
"1": -301
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 38,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1800
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1801
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1900
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1802
},
{
"name": "image",
"type": "IMAGE",
"link": 2005
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
2020
],
"slot_index": 0,
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
2021
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
1
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 794,
"type": "CheckpointLoaderSimple",
"pos": {
"0": -981,
"1": -155
},
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 6,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
1893
],
"slot_index": 0,
"shape": 3
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
1902,
1904,
1922
],
"slot_index": 1,
"shape": 3
},
{
"name": "VAE",
"type": "VAE",
"links": [
1948
],
"slot_index": 2,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"custom_3.9.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 793,
"type": "InstantIdAdapterApply",
"pos": {
"0": -214,
"1": -154
},
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 26,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1893
},
{
"name": "instantId_adapter",
"type": "INSTANTID_ADAPTER",
"link": 1913
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1898
}
],
"outputs": [
{
"name": "model",
"type": "MODEL",
"links": [
1911
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "InstantIdAdapterApply"
},
"widgets_values": [
0.8
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 822,
"type": "Reroute",
"pos": {
"0": -559,
"1": 413
},
"size": [
75,
26
],
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1948
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
2029
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 860,
"type": "Reroute",
"pos": {
"0": 1240,
"1": 425
},
"size": [
75,
26
],
"flags": {},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2029
}
],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [
2030,
2034
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 861,
"type": "Reroute",
"pos": {
"0": 3263.10205078125,
"1": 409.437744140625
},
"size": [
75,
26
],
"flags": {},
"order": 34,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2030
}
],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [
2031,
2033
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 850,
"type": "Reroute",
"pos": {
"0": 1331,
"1": -513
},
"size": [
107.2,
26
],
"flags": {},
"order": 25,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2061
}
],
"outputs": [
{
"name": "KPS_DATA",
"type": "KPS_DATA",
"links": [
2009
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 865,
"type": "Reroute",
"pos": {
"0": 1672,
"1": -591
},
"size": [
90.4,
26
],
"flags": {},
"order": 51,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2043
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2044
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 862,
"type": "Reroute",
"pos": {
"0": 5090,
"1": 410
},
"size": [
75,
26
],
"flags": {},
"order": 40,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2031
}
],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [
2032
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 834,
"type": "PreviewImage",
"pos": {
"0": 6950,
"1": -230
},
"size": {
"0": 828.2597045898438,
"1": 691.5579223632812
},
"flags": {},
"order": 77,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1970
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 823,
"type": "Reroute",
"pos": {
"0": 5400,
"1": 410
},
"size": [
75,
26
],
"flags": {},
"order": 45,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2032
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1950,
1959
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 851,
"type": "Reroute",
"pos": {
"0": 2231.101806640625,
"1": -439.562255859375
},
"size": [
140.8,
26
],
"flags": {},
"order": 31,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2010
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
2012
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 852,
"type": "Reroute",
"pos": {
"0": 2204.1015625,
"1": -129.56224060058594
},
"size": [
140.8,
26
],
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2011
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
2013
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 855,
"type": "Reroute",
"pos": {
"0": 2195.1015625,
"1": -114.56224822998047
},
"size": [
182.79999999999998,
26
],
"flags": {},
"order": 29,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2016
}
],
"outputs": [
{
"name": "FACE_CONDITIONING",
"type": "FACE_CONDITIONING",
"links": [
2017
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 831,
"type": "ImageCompositeMasked",
"pos": {
"0": 6830,
"1": -610
},
"size": {
"0": 315,
"1": 146
},
"flags": {
"collapsed": true
},
"order": 76,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 1983
},
{
"name": "source",
"type": "IMAGE",
"link": 1982
},
{
"name": "mask",
"type": "MASK",
"link": null,
"shape": 7
},
{
"name": "x",
"type": "INT",
"link": 1968,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 1969,
"widget": {
"name": "y"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1970
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
false
]
},
{
"id": 859,
"type": "VAEDecode",
"pos": {
"0": 3441.10205078125,
"1": -287.562255859375
},
"size": {
"0": 210,
"1": 46
},
"flags": {},
"order": 56,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 2027
},
{
"name": "vae",
"type": "VAE",
"link": 2033
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2035,
2055
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 858,
"type": "Reroute",
"pos": {
"0": 2687.10205078125,
"1": -327.562255859375
},
"size": [
82,
26
],
"flags": {},
"order": 43,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2023
}
],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
2024,
2048
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 864,
"type": "KpsMaker",
"pos": {
"0": 2418.10205078125,
"1": -413.562255859375
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 41,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2036
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
2037
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 849,
"type": "PrimitiveNode",
"pos": {
"0": 2083.10302734375,
"1": -683.562255859375
},
"size": {
"0": 210,
"1": 82
},
"flags": {},
"order": 7,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "FLOAT",
"type": "FLOAT",
"links": [
2006,
2007
],
"slot_index": 0,
"widget": {
"name": "scale_by"
}
}
],
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
1.4000000000000001,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 853,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 2570.10205078125,
"1": -153.562255859375
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 46,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 2012
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 2013
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 2017
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 2046
},
{
"name": "image",
"type": "IMAGE",
"link": 2037
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
2025
],
"slot_index": 0
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
2026
],
"slot_index": 1
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
0.8
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 809,
"type": "CLIPTextEncode",
"pos": {
"0": 4910,
"1": -160
},
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {
"collapsed": false
},
"order": 32,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1925
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1927
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 844,
"type": "MaskFromKps",
"pos": {
"0": 4520,
"1": -720
},
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": false
},
"order": 47,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2051
}
],
"outputs": [
{
"name": "mask",
"type": "MASK",
"links": [
2003
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "MaskFromKps"
},
"widgets_values": [
3
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 802,
"type": "PreprocessImage",
"pos": {
"0": 4890,
"1": -740
},
"size": {
"0": 342.5999755859375,
"1": 290
},
"flags": {},
"order": 61,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 2054
},
{
"name": "mask",
"type": "MASK",
"link": 2003
},
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "resized_image",
"type": "IMAGE",
"links": [
1943
],
"slot_index": 0,
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": [
1918
],
"slot_index": 1,
"shape": 3
},
{
"name": "control_image",
"type": "IMAGE",
"links": [],
"slot_index": 2,
"shape": 3
},
{
"name": "x",
"type": "INT",
"links": [
1966,
1989
],
"slot_index": 3,
"shape": 3
},
{
"name": "y",
"type": "INT",
"links": [
1967,
1990
],
"slot_index": 4,
"shape": 3
},
{
"name": "original_width",
"type": "INT",
"links": [
1963,
1991
],
"slot_index": 5,
"shape": 3
},
{
"name": "original_height",
"type": "INT",
"links": [
1964,
1992
],
"slot_index": 6,
"shape": 3
},
{
"name": "new_width",
"type": "INT",
"links": [
1996
],
"slot_index": 7,
"shape": 3
},
{
"name": "new_height",
"type": "INT",
"links": [
1997
],
"slot_index": 8,
"shape": 3
}
],
"properties": {
"Node name for S&R": "PreprocessImage"
},
"widgets_values": [
1024,
1024,
"auto",
50
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 828,
"type": "PreviewImage",
"pos": {
"0": 6520,
"1": -240
},
"size": {
"0": 402.61297607421875,
"1": 261.80877685546875
},
"flags": {},
"order": 74,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1958
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 848,
"type": "KpsScaleBy",
"pos": {
"0": 2327,
"1": -499
},
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": true
},
"order": 36,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2009
},
{
"name": "scale",
"type": "FLOAT",
"link": 2007,
"widget": {
"name": "scale"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
2036,
2040
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsScaleBy"
},
"widgets_values": [
1.4000000000000001
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 843,
"type": "KpsMaker",
"pos": {
"0": 5554,
"1": -411
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 70,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1999
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
2000
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 838,
"type": "Reroute",
"pos": {
"0": 6373,
"1": -381
},
"size": [
75,
26
],
"flags": {},
"order": 60,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2053
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1983
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 868,
"type": "Reroute",
"pos": {
"0": 4748,
"1": -395
},
"size": [
82,
26
],
"flags": {},
"order": 59,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2056
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2053,
2054
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 869,
"type": "Reroute",
"pos": {
"0": 3721,
"1": -398
},
"size": [
82,
26
],
"flags": {},
"order": 58,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2055
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2056
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 863,
"type": "PreviewImage",
"pos": {
"0": 3694,
"1": -276
},
"size": {
"0": 371.20855712890625,
"1": 519.438720703125
},
"flags": {},
"order": 57,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 2035
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 800,
"type": "PreviewImage",
"pos": {
"0": 1544,
"1": -218
},
"size": {
"0": 351.6155090332031,
"1": 362.6221008300781
},
"flags": {
"collapsed": false
},
"order": 53,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1908
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 847,
"type": "LatentUpscaleBy",
"pos": {
"0": 2599,
"1": -557
},
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": true
},
"order": 54,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 2044
},
{
"name": "scale_by",
"type": "FLOAT",
"link": 2006,
"widget": {
"name": "scale_by"
}
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2038
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "LatentUpscaleBy"
},
"widgets_values": [
"nearest-exact",
1.4000000000000001
]
},
{
"id": 803,
"type": "Reroute",
"pos": {
"0": 5525,
"1": -739
},
"size": [
75,
26
],
"flags": {},
"order": 62,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1943
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1947
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 805,
"type": "Reroute",
"pos": {
"0": 5726,
"1": -715
},
"size": [
75,
26
],
"flags": {},
"order": 63,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1918
}
],
"outputs": [
{
"name": "",
"type": "MASK",
"links": [
1961
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 807,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 5692,
"1": -164
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 71,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1927
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1928
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1931
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1976
},
{
"name": "image",
"type": "IMAGE",
"link": 2000
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
1955
],
"slot_index": 0,
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
1956
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
1
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 835,
"type": "Reroute",
"pos": {
"0": 4184,
"1": -527
},
"size": [
75,
26
],
"flags": {},
"order": 42,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2040
}
],
"outputs": [
{
"name": "",
"type": "KPS_DATA",
"links": [
2051,
2057
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 870,
"type": "Reroute",
"pos": {
"0": 4359,
"1": -440.2700500488281
},
"size": [
107.2,
26
],
"flags": {},
"order": 48,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2057
}
],
"outputs": [
{
"name": "KPS_DATA",
"type": "KPS_DATA",
"links": [
2058
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 841,
"type": "KpsCrop",
"pos": {
"0": 5260,
"1": -410
},
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 66,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2058
},
{
"name": "x",
"type": "INT",
"link": 1989,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 1990,
"widget": {
"name": "y"
}
},
{
"name": "width",
"type": "INT",
"link": 1991,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1992,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1998
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsCrop"
},
"widgets_values": [
0,
0,
1024,
1024
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 839,
"type": "KpsDraw",
"pos": {
"0": -185,
"1": -734
},
"size": {
"0": 236.70094299316406,
"1": 364.1435852050781
},
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "image_reference",
"type": "IMAGE",
"link": null,
"shape": 7
},
{
"name": "width",
"type": "INT",
"link": 1985,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1986,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
2059
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsDraw"
},
"widgets_values": [
1024,
1024,
{
"array": [
[
472.04601395803036,
196.62261562933992
],
[
518.1434010837521,
196.62261562934006
],
[
495.09470752089123,
219.6713091922009
],
[
472.0460139580306,
242.7200027550619
],
[
518.1434010837517,
242.72000275506167
]
],
"opacities": [
1,
1,
1,
1,
1
],
"width": 1024,
"height": 1024,
"bbox": [
[
457,
182
],
[
534,
259
]
]
},
1.7663083511306758e-13,
""
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 873,
"type": "Kps2dRandomizer",
"pos": {
"0": 124,
"1": -918
},
"size": {
"0": 315,
"1": 250
},
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2059
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
2060,
2061
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "Kps2dRandomizer"
},
"widgets_values": [
427557663333553,
"randomize",
-10,
10,
0.9,
1.2,
500,
50,
100
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 874,
"type": "PreviewImage",
"pos": {
"0": 563,
"1": -930
},
"size": {
"0": 357.7528991699219,
"1": 273.61285400390625
},
"flags": {},
"order": 35,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 2062
}
],
"outputs": [],
"title": "Randomized KPS",
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 845,
"type": "KpsMaker",
"pos": {
"0": 214,
"1": -566
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 24,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2060
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
2005,
2062
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 287,
"type": "CLIPTextEncode",
"pos": {
"0": 167,
"1": -137
},
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {
"collapsed": false
},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1902
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1801,
2011
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"ugly, deformed"
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 248,
"type": "VAEDecode",
"pos": {
"0": 1412,
"1": -302
},
"size": {
"0": 140,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 50,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 2018
},
{
"name": "vae",
"type": "VAE",
"link": 2034
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1908
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 866,
"type": "Reroute",
"pos": {
"0": 2259,
"1": 504
},
"size": [
132.39999999999998,
26
],
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2045
}
],
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
2046,
2047
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 871,
"type": "Note",
"pos": {
"0": 1390,
"1": -164
},
"size": {
"0": 210,
"1": 291.76165771484375
},
"flags": {},
"order": 8,
"mode": 0,
"inputs": [],
"outputs": [],
"properties": {},
"widgets_values": [
"Image should be undercooked here,\nit runs just enough to set up the scene.\n\nIf you want to end generation here set \"end_at_step\" to \"steps\""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 857,
"type": "KSamplerAdvanced",
"pos": {
"0": 1010,
"1": -329
},
"size": {
"0": 315,
"1": 546
},
"flags": {},
"order": 44,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 2019
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 2020
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 2021
},
{
"name": "latent_image",
"type": "LATENT",
"link": 2022
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2018,
2043
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KSamplerAdvanced"
},
"widgets_values": [
"enable",
999475885971695,
"randomize",
50,
4,
"euler",
"normal",
0,
25,
"disable"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 856,
"type": "KSampler",
"pos": {
"0": 2993.10205078125,
"1": -330.562255859375
},
"size": {
"0": 377.1995544433594,
"1": 577.224609375
},
"flags": {},
"order": 55,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 2024
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 2025
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 2026
},
{
"name": "latent_image",
"type": "LATENT",
"link": 2038
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2027
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
651934171295422,
"randomize",
20,
4,
"euler",
"normal",
0.6
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 824,
"type": "KSampler",
"pos": {
"0": 6170,
"1": -290
},
"size": {
"0": 315,
"1": 474
},
"flags": {},
"order": 72,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1953
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1955
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1956
},
{
"name": "latent_image",
"type": "LATENT",
"link": 1954
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1957
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
711522245776442,
"randomize",
20,
4,
"euler",
"normal",
0.6
],
"color": "#323",
"bgcolor": "#535"
}
],
"links": [
[
1460,
641,
0,
642,
1,
"IMAGE"
],
[
1491,
650,
0,
642,
0,
"INSIGHTFACE_APP"
],
[
1576,
679,
0,
677,
0,
"INT"
],
[
1577,
680,
0,
677,
1,
"INT"
],
[
1800,
252,
0,
775,
0,
"CONDITIONING"
],
[
1801,
287,
0,
775,
1,
"CONDITIONING"
],
[
1802,
636,
0,
775,
3,
"CONTROL_NET"
],
[
1893,
794,
0,
793,
0,
"MODEL"
],
[
1896,
774,
1,
796,
0,
"RESAMPLER"
],
[
1897,
642,
0,
796,
1,
"FACE_EMBED"
],
[
1898,
796,
0,
793,
2,
"FACE_CONDITIONING"
],
[
1900,
797,
0,
775,
2,
"FACE_CONDITIONING"
],
[
1901,
796,
0,
797,
0,
"*"
],
[
1902,
794,
1,
287,
0,
"CLIP"
],
[
1904,
794,
1,
798,
0,
"*"
],
[
1905,
798,
0,
252,
0,
"CLIP"
],
[
1908,
248,
0,
800,
0,
"IMAGE"
],
[
1911,
793,
0,
801,
0,
"*"
],
[
1913,
774,
0,
793,
1,
"INSTANTID_ADAPTER"
],
[
1918,
802,
1,
805,
0,
"*"
],
[
1922,
794,
1,
811,
0,
"*"
],
[
1925,
812,
0,
809,
0,
"CLIP"
],
[
1927,
809,
0,
807,
0,
"CONDITIONING"
],
[
1928,
810,
0,
807,
1,
"CONDITIONING"
],
[
1929,
796,
0,
813,
0,
"*"
],
[
1930,
813,
0,
814,
0,
"*"
],
[
1931,
814,
0,
807,
2,
"FACE_CONDITIONING"
],
[
1932,
811,
0,
812,
0,
"*"
],
[
1943,
802,
0,
803,
0,
"*"
],
[
1947,
803,
0,
821,
0,
"IMAGE"
],
[
1948,
794,
2,
822,
0,
"*"
],
[
1950,
823,
0,
821,
1,
"VAE"
],
[
1951,
821,
0,
806,
0,
"LATENT"
],
[
1953,
825,
0,
824,
0,
"MODEL"
],
[
1954,
806,
0,
824,
3,
"LATENT"
],
[
1955,
807,
0,
824,
1,
"CONDITIONING"
],
[
1956,
807,
1,
824,
2,
"CONDITIONING"
],
[
1957,
824,
0,
827,
0,
"LATENT"
],
[
1958,
827,
0,
828,
0,
"IMAGE"
],
[
1959,
823,
0,
829,
0,
"*"
],
[
1960,
829,
0,
827,
1,
"VAE"
],
[
1961,
805,
0,
806,
1,
"MASK"
],
[
1962,
827,
0,
830,
0,
"IMAGE"
],
[
1963,
802,
5,
830,
1,
"INT"
],
[
1964,
802,
6,
830,
2,
"INT"
],
[
1966,
802,
3,
832,
0,
"*"
],
[
1967,
802,
4,
833,
0,
"*"
],
[
1968,
832,
0,
831,
3,
"INT"
],
[
1969,
833,
0,
831,
4,
"INT"
],
[
1970,
831,
0,
834,
0,
"IMAGE"
],
[
1974,
636,
0,
836,
0,
"*"
],
[
1976,
837,
0,
807,
3,
"CONTROL_NET"
],
[
1982,
830,
0,
831,
1,
"IMAGE"
],
[
1983,
838,
0,
831,
0,
"IMAGE"
],
[
1984,
812,
0,
810,
0,
"CLIP"
],
[
1985,
680,
0,
839,
1,
"INT"
],
[
1986,
679,
0,
839,
2,
"INT"
],
[
1989,
802,
3,
841,
1,
"INT"
],
[
1990,
802,
4,
841,
2,
"INT"
],
[
1991,
802,
5,
841,
3,
"INT"
],
[
1992,
802,
6,
841,
4,
"INT"
],
[
1996,
802,
7,
842,
1,
"INT"
],
[
1997,
802,
8,
842,
2,
"INT"
],
[
1998,
841,
0,
842,
0,
"KPS_DATA"
],
[
1999,
842,
0,
843,
0,
"KPS_DATA"
],
[
2000,
843,
0,
807,
4,
"IMAGE"
],
[
2003,
844,
0,
802,
1,
"MASK"
],
[
2005,
845,
0,
775,
4,
"IMAGE"
],
[
2006,
849,
0,
847,
1,
"FLOAT"
],
[
2007,
849,
0,
848,
1,
"FLOAT"
],
[
2009,
850,
0,
848,
0,
"KPS_DATA"
],
[
2010,
252,
0,
851,
0,
"*"
],
[
2011,
287,
0,
852,
0,
"*"
],
[
2012,
851,
0,
853,
0,
"CONDITIONING"
],
[
2013,
852,
0,
853,
1,
"CONDITIONING"
],
[
2016,
796,
0,
855,
0,
"*"
],
[
2017,
855,
0,
853,
2,
"FACE_CONDITIONING"
],
[
2018,
857,
0,
248,
0,
"LATENT"
],
[
2019,
801,
0,
857,
0,
"MODEL"
],
[
2020,
775,
0,
857,
1,
"CONDITIONING"
],
[
2021,
775,
1,
857,
2,
"CONDITIONING"
],
[
2022,
677,
0,
857,
3,
"LATENT"
],
[
2023,
801,
0,
858,
0,
"*"
],
[
2024,
858,
0,
856,
0,
"MODEL"
],
[
2025,
853,
0,
856,
1,
"CONDITIONING"
],
[
2026,
853,
1,
856,
2,
"CONDITIONING"
],
[
2027,
856,
0,
859,
0,
"LATENT"
],
[
2029,
822,
0,
860,
0,
"*"
],
[
2030,
860,
0,
861,
0,
"*"
],
[
2031,
861,
0,
862,
0,
"*"
],
[
2032,
862,
0,
823,
0,
"*"
],
[
2033,
861,
0,
859,
1,
"VAE"
],
[
2034,
860,
0,
248,
1,
"VAE"
],
[
2035,
859,
0,
863,
0,
"IMAGE"
],
[
2036,
848,
0,
864,
0,
"KPS_DATA"
],
[
2037,
864,
0,
853,
4,
"IMAGE"
],
[
2038,
847,
0,
856,
3,
"LATENT"
],
[
2040,
848,
0,
835,
0,
"*"
],
[
2043,
857,
0,
865,
0,
"*"
],
[
2044,
865,
0,
847,
0,
"LATENT"
],
[
2045,
836,
0,
866,
0,
"*"
],
[
2046,
866,
0,
853,
3,
"CONTROL_NET"
],
[
2047,
866,
0,
837,
0,
"*"
],
[
2048,
858,
0,
825,
0,
"*"
],
[
2051,
835,
0,
844,
0,
"KPS_DATA"
],
[
2053,
868,
0,
838,
0,
"*"
],
[
2054,
868,
0,
802,
0,
"IMAGE"
],
[
2055,
859,
0,
869,
0,
"*"
],
[
2056,
869,
0,
868,
0,
"*"
],
[
2057,
835,
0,
870,
0,
"*"
],
[
2058,
870,
0,
841,
0,
"KPS_DATA"
],
[
2059,
839,
0,
873,
0,
"KPS_DATA"
],
[
2060,
873,
0,
845,
0,
"KPS_DATA"
],
[
2061,
873,
0,
850,
0,
"*"
],
[
2062,
845,
0,
874,
0,
"IMAGE"
]
],
"groups": [
{
"title": "Latent upscale",
"bounding": [
2071,
-847,
2044,
1475
],
"color": "#3f789e",
"font_size": 24,
"flags": {}
},
{
"title": "Enhance face",
"bounding": [
4511,
-990,
3383,
1704
],
"color": "#88A",
"font_size": 24,
"flags": {}
}
],
"config": {},
"extra": {
"ds": {
"scale": 1.310999419150096,
"offset": [
-685.4397943829316,
328.253528736961
]
},
"groupNodes": {}
},
"version": 0.4
}
================================================
FILE: workflows/prop2image_latent_upscale_with_3d_and_2d_randomizer.json
================================================
{
"last_node_id": 877,
"last_link_id": 2067,
"nodes": [
{
"id": 650,
"type": "LoadInsightface",
"pos": {
"0": -975,
"1": -570
},
"size": {
"0": 308.15679931640625,
"1": 26
},
"flags": {
"collapsed": false
},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"links": [
1491
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInsightface"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 642,
"type": "FaceEmbed",
"pos": {
"0": -549,
"1": -384
},
"size": {
"0": 292.20001220703125,
"1": 66
},
"flags": {
"collapsed": true
},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 1491
},
{
"name": "face_image",
"type": "IMAGE",
"link": 1460
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "face embeds",
"type": "FACE_EMBED",
"links": [
1897
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbed"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 797,
"type": "Reroute",
"pos": {
"0": -181,
"1": -270
},
"size": [
75,
26
],
"flags": {},
"order": 31,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1901
}
],
"outputs": [
{
"name": "",
"type": "FACE_CONDITIONING",
"links": [
1900
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 798,
"type": "Reroute",
"pos": {
"0": -233,
"1": -459
},
"size": [
75,
26
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1904
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1905
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 774,
"type": "LoadInstantIdAdapter",
"pos": {
"0": -979,
"1": -451
},
"size": {
"0": 315,
"1": 78
},
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "InstantId_adapter",
"type": "INSTANTID_ADAPTER",
"links": [
1913
],
"slot_index": 0,
"shape": 3
},
{
"name": "resampler",
"type": "RESAMPLER",
"links": [
1896
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInstantIdAdapter"
},
"widgets_values": [
"ip-adapter.bin"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 813,
"type": "Reroute",
"pos": {
"0": -158,
"1": 348
},
"size": [
75,
26
],
"flags": {},
"order": 32,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1929
}
],
"outputs": [
{
"name": "",
"type": "FACE_CONDITIONING",
"links": [
1930
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 814,
"type": "Reroute",
"pos": {
"0": 5150,
"1": 340
},
"size": [
75,
26
],
"flags": {},
"order": 37,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1930
}
],
"outputs": [
{
"name": "",
"type": "FACE_CONDITIONING",
"links": [
1931
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 812,
"type": "Reroute",
"pos": {
"0": 4780,
"1": 250
},
"size": [
75,
26
],
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1932
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1925,
1984
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 811,
"type": "Reroute",
"pos": {
"0": -341,
"1": 262
},
"size": [
75,
26
],
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1922
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1932
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 825,
"type": "Reroute",
"pos": {
"0": 5470,
"1": -320
},
"size": [
75,
26
],
"flags": {},
"order": 46,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2048
}
],
"outputs": [
{
"name": "",
"type": "MODEL",
"links": [
1953
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 829,
"type": "Reroute",
"pos": {
"0": 6300,
"1": 420
},
"size": [
75,
26
],
"flags": {},
"order": 45,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1959
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1960
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 806,
"type": "SetLatentNoiseMask",
"pos": {
"0": 5900,
"1": -290
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 71,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1951
},
{
"name": "mask",
"type": "MASK",
"link": 1961
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1954
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "SetLatentNoiseMask"
},
"widgets_values": []
},
{
"id": 821,
"type": "VAEEncode",
"pos": {
"0": 5690,
"1": -290
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 69,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 1947
},
{
"name": "vae",
"type": "VAE",
"link": 1950
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1951
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEEncode"
},
"widgets_values": []
},
{
"id": 832,
"type": "Reroute",
"pos": {
"0": 6540,
"1": -650
},
"size": [
75,
26
],
"flags": {},
"order": 66,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1966,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
1968
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 833,
"type": "Reroute",
"pos": {
"0": 6540,
"1": -630
},
"size": [
75,
26
],
"flags": {},
"order": 67,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1967,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
1969
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 837,
"type": "Reroute",
"pos": {
"0": 5180,
"1": 520
},
"size": [
75,
26
],
"flags": {},
"order": 25,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2047
}
],
"outputs": [
{
"name": "",
"type": "CONTROL_NET",
"links": [
1976
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 836,
"type": "Reroute",
"pos": {
"0": -470,
"1": 525
},
"size": [
75,
26
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1974
}
],
"outputs": [
{
"name": "",
"type": "CONTROL_NET",
"links": [
2045
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 830,
"type": "ImageScale",
"pos": {
"0": 6700,
"1": -550
},
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 77,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1962
},
{
"name": "width",
"type": "INT",
"link": 1963,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1964,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1982
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"nearest-exact",
512,
512,
"disabled"
]
},
{
"id": 827,
"type": "VAEDecode",
"pos": {
"0": 6510,
"1": -300
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 75,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1957
},
{
"name": "vae",
"type": "VAE",
"link": 1960
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1958,
1962
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 810,
"type": "CLIPTextEncode",
"pos": {
"0": 4910,
"1": -10
},
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {
"collapsed": false
},
"order": 28,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1984
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1928
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 252,
"type": "CLIPTextEncode",
"pos": {
"0": 170,
"1": -457
},
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {
"collapsed": false
},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1905
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1800,
2010
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"man in the city, high quality"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 842,
"type": "KpsScale",
"pos": {
"0": 5410,
"1": -410
},
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": true
},
"order": 70,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1998
},
{
"name": "width",
"type": "INT",
"link": 1996,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1997,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1999
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsScale"
},
"widgets_values": [
1024,
1024
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 636,
"type": "ControlNetLoader",
"pos": {
"0": -984,
"1": -248
},
"size": {
"0": 315,
"1": 58
},
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
1802,
1974
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetLoader"
},
"widgets_values": [
"ControlNetModel\\diffusion_pytorch_model.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 796,
"type": "FaceEmbedCombine",
"pos": {
"0": -545,
"1": -85
},
"size": {
"0": 367.79998779296875,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "resampler",
"type": "RESAMPLER",
"link": 1896
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": 1897
}
],
"outputs": [
{
"name": "face conditioning",
"type": "FACE_CONDITIONING",
"links": [
1898,
1901,
1929,
2016
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbedCombine"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 801,
"type": "Reroute",
"pos": {
"0": 150,
"1": -329
},
"size": [
75,
26
],
"flags": {},
"order": 36,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1911
}
],
"outputs": [
{
"name": "",
"type": "MODEL",
"links": [
2019,
2023
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 677,
"type": "EmptyLatentImage",
"pos": {
"0": 605,
"1": 72
},
"size": {
"0": 315,
"1": 106
},
"flags": {
"collapsed": true
},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "height",
"type": "INT",
"link": 1576,
"widget": {
"name": "height"
}
},
{
"name": "width",
"type": "INT",
"link": 1577,
"widget": {
"name": "width"
}
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2022
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "EmptyLatentImage"
},
"widgets_values": [
1024,
1024,
1
]
},
{
"id": 775,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 543,
"1": -301
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 42,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1800
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1801
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1900
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1802
},
{
"name": "image",
"type": "IMAGE",
"link": 2005
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
2020
],
"slot_index": 0,
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
2021
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
1
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 794,
"type": "CheckpointLoaderSimple",
"pos": {
"0": -981,
"1": -155
},
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
1893
],
"slot_index": 0,
"shape": 3
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
1902,
1904,
1922
],
"slot_index": 1,
"shape": 3
},
{
"name": "VAE",
"type": "VAE",
"links": [
1948
],
"slot_index": 2,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"custom_3.9.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 793,
"type": "InstantIdAdapterApply",
"pos": {
"0": -214,
"1": -154
},
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 30,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1893
},
{
"name": "instantId_adapter",
"type": "INSTANTID_ADAPTER",
"link": 1913
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1898
}
],
"outputs": [
{
"name": "model",
"type": "MODEL",
"links": [
1911
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "InstantIdAdapterApply"
},
"widgets_values": [
0.8
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 822,
"type": "Reroute",
"pos": {
"0": -559,
"1": 413
},
"size": [
75,
26
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1948
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
2029
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 860,
"type": "Reroute",
"pos": {
"0": 1240,
"1": 425
},
"size": [
75,
26
],
"flags": {},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2029
}
],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [
2030,
2034
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 861,
"type": "Reroute",
"pos": {
"0": 3263.10205078125,
"1": 409.437744140625
},
"size": [
75,
26
],
"flags": {},
"order": 29,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2030
}
],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [
2031,
2033
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 850,
"type": "Reroute",
"pos": {
"0": 1331,
"1": -513
},
"size": [
107.2,
26
],
"flags": {},
"order": 39,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2061
}
],
"outputs": [
{
"name": "KPS_DATA",
"type": "KPS_DATA",
"links": [
2009
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 865,
"type": "Reroute",
"pos": {
"0": 1672,
"1": -591
},
"size": [
90.4,
26
],
"flags": {},
"order": 51,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2043
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2044
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 862,
"type": "Reroute",
"pos": {
"0": 5090,
"1": 410
},
"size": [
75,
26
],
"flags": {},
"order": 35,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2031
}
],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [
2032
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 834,
"type": "PreviewImage",
"pos": {
"0": 6950,
"1": -230
},
"size": {
"0": 828.2597045898438,
"1": 691.5579223632812
},
"flags": {},
"order": 79,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1970
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 823,
"type": "Reroute",
"pos": {
"0": 5400,
"1": 410
},
"size": [
75,
26
],
"flags": {},
"order": 40,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2032
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1950,
1959
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 851,
"type": "Reroute",
"pos": {
"0": 2231.101806640625,
"1": -439.562255859375
},
"size": [
140.8,
26
],
"flags": {},
"order": 26,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2010
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
2012
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 852,
"type": "Reroute",
"pos": {
"0": 2204.1015625,
"1": -129.56224060058594
},
"size": [
140.8,
26
],
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2011
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
2013
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 855,
"type": "Reroute",
"pos": {
"0": 2195.1015625,
"1": -114.56224822998047
},
"size": [
182.79999999999998,
26
],
"flags": {},
"order": 33,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2016
}
],
"outputs": [
{
"name": "FACE_CONDITIONING",
"type": "FACE_CONDITIONING",
"links": [
2017
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 831,
"type": "ImageCompositeMasked",
"pos": {
"0": 6830,
"1": -610
},
"size": {
"0": 315,
"1": 146
},
"flags": {
"collapsed": true
},
"order": 78,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 1983
},
{
"name": "source",
"type": "IMAGE",
"link": 1982
},
{
"name": "mask",
"type": "MASK",
"link": null,
"shape": 7
},
{
"name": "x",
"type": "INT",
"link": 1968,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 1969,
"widget": {
"name": "y"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1970
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
false
]
},
{
"id": 859,
"type": "VAEDecode",
"pos": {
"0": 3441.10205078125,
"1": -287.562255859375
},
"size": {
"0": 210,
"1": 46
},
"flags": {},
"order": 58,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 2027
},
{
"name": "vae",
"type": "VAE",
"link": 2033
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2035,
2055
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 858,
"type": "Reroute",
"pos": {
"0": 2687.10205078125,
"1": -327.562255859375
},
"size": [
82,
26
],
"flags": {},
"order": 41,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2023
}
],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
2024,
2048
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 864,
"type": "KpsMaker",
"pos": {
"0": 2418.10205078125,
"1": -413.562255859375
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 48,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2036
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
2037
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 849,
"type": "PrimitiveNode",
"pos": {
"0": 2083.10302734375,
"1": -683.562255859375
},
"size": {
"0": 210,
"1": 82
},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "FLOAT",
"type": "FLOAT",
"links": [
2006,
2007
],
"slot_index": 0,
"widget": {
"name": "scale_by"
}
}
],
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
1.4000000000000001,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 853,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 2570.10205078125,
"1": -153.562255859375
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 52,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 2012
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 2013
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 2017
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 2046
},
{
"name": "image",
"type": "IMAGE",
"link": 2037
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
2025
],
"slot_index": 0
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
2026
],
"slot_index": 1
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
0.8
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 809,
"type": "CLIPTextEncode",
"pos": {
"0": 4910,
"1": -160
},
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {
"collapsed": false
},
"order": 27,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1925
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1927
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 844,
"type": "MaskFromKps",
"pos": {
"0": 4520,
"1": -720
},
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": false
},
"order": 53,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2051
}
],
"outputs": [
{
"name": "mask",
"type": "MASK",
"links": [
2003
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "MaskFromKps"
},
"widgets_values": [
3
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 802,
"type": "PreprocessImage",
"pos": {
"0": 4890,
"1": -740
},
"size": {
"0": 342.5999755859375,
"1": 290
},
"flags": {},
"order": 63,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 2054
},
{
"name": "mask",
"type": "MASK",
"link": 2003
},
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "resized_image",
"type": "IMAGE",
"links": [
1943
],
"slot_index": 0,
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": [
1918
],
"slot_index": 1,
"shape": 3
},
{
"name": "control_image",
"type": "IMAGE",
"links": [],
"slot_index": 2,
"shape": 3
},
{
"name": "x",
"type": "INT",
"links": [
1966,
1989
],
"slot_index": 3,
"shape": 3
},
{
"name": "y",
"type": "INT",
"links": [
1967,
1990
],
"slot_index": 4,
"shape": 3
},
{
"name": "original_width",
"type": "INT",
"links": [
1963,
1991
],
"slot_index": 5,
"shape": 3
},
{
"name": "original_height",
"type": "INT",
"links": [
1964,
1992
],
"slot_index": 6,
"shape": 3
},
{
"name": "new_width",
"type": "INT",
"links": [
1996
],
"slot_index": 7,
"shape": 3
},
{
"name": "new_height",
"type": "INT",
"links": [
1997
],
"slot_index": 8,
"shape": 3
}
],
"properties": {
"Node name for S&R": "PreprocessImage"
},
"widgets_values": [
1024,
1024,
"auto",
50
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 828,
"type": "PreviewImage",
"pos": {
"0": 6520,
"1": -240
},
"size": {
"0": 402.61297607421875,
"1": 261.80877685546875
},
"flags": {},
"order": 76,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1958
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 848,
"type": "KpsScaleBy",
"pos": {
"0": 2327,
"1": -499
},
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": true
},
"order": 44,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2009
},
{
"name": "scale",
"type": "FLOAT",
"link": 2007,
"widget": {
"name": "scale"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
2036,
2040
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsScaleBy"
},
"widgets_values": [
1.4000000000000001
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 843,
"type": "KpsMaker",
"pos": {
"0": 5554,
"1": -411
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 72,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1999
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
2000
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 838,
"type": "Reroute",
"pos": {
"0": 6373,
"1": -381
},
"size": [
75,
26
],
"flags": {},
"order": 62,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2053
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1983
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 868,
"type": "Reroute",
"pos": {
"0": 4748,
"1": -395
},
"size": [
82,
26
],
"flags": {},
"order": 61,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2056
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2053,
2054
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 869,
"type": "Reroute",
"pos": {
"0": 3721,
"1": -398
},
"size": [
82,
26
],
"flags": {},
"order": 60,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2055
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2056
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 863,
"type": "PreviewImage",
"pos": {
"0": 3694,
"1": -276
},
"size": {
"0": 371.20855712890625,
"1": 519.438720703125
},
"flags": {},
"order": 59,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 2035
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 847,
"type": "LatentUpscaleBy",
"pos": {
"0": 2599,
"1": -557
},
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": true
},
"order": 56,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 2044
},
{
"name": "scale_by",
"type": "FLOAT",
"link": 2006,
"widget": {
"name": "scale_by"
}
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2038
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "LatentUpscaleBy"
},
"widgets_values": [
"nearest-exact",
1.4000000000000001
]
},
{
"id": 803,
"type": "Reroute",
"pos": {
"0": 5525,
"1": -739
},
"size": [
75,
26
],
"flags": {},
"order": 64,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1943
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1947
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 805,
"type": "Reroute",
"pos": {
"0": 5726,
"1": -715
},
"size": [
75,
26
],
"flags": {},
"order": 65,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1918
}
],
"outputs": [
{
"name": "",
"type": "MASK",
"links": [
1961
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 807,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 5692,
"1": -164
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 73,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1927
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1928
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1931
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1976
},
{
"name": "image",
"type": "IMAGE",
"link": 2000
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
1955
],
"slot_index": 0,
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
1956
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
1
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 835,
"type": "Reroute",
"pos": {
"0": 4184,
"1": -527
},
"size": [
75,
26
],
"flags": {},
"order": 49,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2040
}
],
"outputs": [
{
"name": "",
"type": "KPS_DATA",
"links": [
2051,
2057
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 870,
"type": "Reroute",
"pos": {
"0": 4359,
"1": -440.2700500488281
},
"size": [
107.2,
26
],
"flags": {},
"order": 54,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2057
}
],
"outputs": [
{
"name": "KPS_DATA",
"type": "KPS_DATA",
"links": [
2058
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 841,
"type": "KpsCrop",
"pos": {
"0": 5260,
"1": -410
},
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 68,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2058
},
{
"name": "x",
"type": "INT",
"link": 1989,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 1990,
"widget": {
"name": "y"
}
},
{
"name": "width",
"type": "INT",
"link": 1991,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1992,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1998
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsCrop"
},
"widgets_values": [
0,
0,
1024,
1024
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 287,
"type": "CLIPTextEncode",
"pos": {
"0": 167,
"1": -137
},
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {
"collapsed": false
},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1902
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1801,
2011
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"ugly, deformed"
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 248,
"type": "VAEDecode",
"pos": {
"0": 1412,
"1": -302
},
"size": {
"0": 140,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 50,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 2018
},
{
"name": "vae",
"type": "VAE",
"link": 2034
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1908
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 866,
"type": "Reroute",
"pos": {
"0": 2259,
"1": 504
},
"size": [
132.39999999999998,
26
],
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2045
}
],
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
2046,
2047
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 679,
"type": "PrimitiveNode",
"pos": {
"0": -550,
"1": -21
},
"size": {
"0": 210,
"1": 82
},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
1576,
2063
],
"slot_index": 0,
"widget": {
"name": "height"
}
}
],
"title": "IMAGE HEIGHT",
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
1024,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 680,
"type": "PrimitiveNode",
"pos": {
"0": -545,
"1": 109
},
"size": {
"0": 210,
"1": 82
},
"flags": {},
"order": 6,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
1577,
2064
],
"slot_index": 0,
"widget": {
"name": "width"
}
}
],
"title": "IMAGE WIDTH",
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
1024,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 641,
"type": "LoadImage",
"pos": {
"0": -578,
"1": -753
},
"size": {
"0": 235.36587524414062,
"1": 314
},
"flags": {},
"order": 7,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1460,
2065
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"title": "Load face Referecnce",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"han3.jpg",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 873,
"type": "Kps2dRandomizer",
"pos": {
"0": 190,
"1": -900
},
"size": {
"0": 315,
"1": 250
},
"flags": {},
"order": 34,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2067
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
2060,
2061
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "Kps2dRandomizer"
},
"widgets_values": [
1116735576949457,
"randomize",
0,
0,
0.9,
1.2,
500,
50,
100
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 845,
"type": "KpsMaker",
"pos": {
"0": 299,
"1": -533
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 38,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2060
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
2005,
2062
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 876,
"type": "Kps3dRandomizer",
"pos": {
"0": 190,
"1": -1110
},
"size": {
"0": 315,
"1": 154
},
"flags": {},
"order": 24,
"mode": 0,
"inputs": [
{
"name": "kps_data_3d",
"type": "KPS_DATA_3D",
"link": 2066
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
2067
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "Kps3dRandomizer"
},
"widgets_values": [
843840005996875,
"randomize",
10,
40,
5
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 874,
"type": "PreviewImage",
"pos": {
"0": 644,
"1": -1104
},
"size": {
"0": 357.7528991699219,
"1": 273.61285400390625
},
"flags": {},
"order": 43,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 2062
}
],
"outputs": [],
"title": "Randomized KPS",
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 824,
"type": "KSampler",
"pos": {
"0": 6170,
"1": -290
},
"size": {
"0": 315,
"1": 474
},
"flags": {},
"order": 74,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1953
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1955
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1956
},
{
"name": "latent_image",
"type": "LATENT",
"link": 1954
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1957
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
934650058220617,
"randomize",
20,
4,
"euler",
"normal",
0.6
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 856,
"type": "KSampler",
"pos": {
"0": 2993.10205078125,
"1": -330.562255859375
},
"size": {
"0": 377.1995544433594,
"1": 577.224609375
},
"flags": {},
"order": 57,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 2024
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 2025
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 2026
},
{
"name": "latent_image",
"type": "LATENT",
"link": 2038
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2027
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
909511219778624,
"randomize",
20,
4,
"euler",
"normal",
0.6
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 857,
"type": "KSamplerAdvanced",
"pos": {
"0": 1010,
"1": -329
},
"size": {
"0": 315,
"1": 546
},
"flags": {},
"order": 47,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 2019
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 2020
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 2021
},
{
"name": "latent_image",
"type": "LATENT",
"link": 2022
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2018,
2043
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KSamplerAdvanced"
},
"widgets_values": [
"enable",
163892629628008,
"randomize",
50,
4,
"euler",
"normal",
0,
25,
"disable"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 800,
"type": "PreviewImage",
"pos": {
"0": 1544,
"1": -218
},
"size": {
"0": 351.6155090332031,
"1": 362.6221008300781
},
"flags": {
"collapsed": false
},
"order": 55,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1908
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 877,
"type": "Reroute",
"pos": {
"0": 10,
"1": 10
},
"size": [
75,
26
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "*",
"type": "*",
"links": null
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 871,
"type": "Note",
"pos": {
"0": 1390,
"1": -164
},
"size": {
"0": 210,
"1": 291.76165771484375
},
"flags": {},
"order": 9,
"mode": 0,
"inputs": [],
"outputs": [],
"properties": {},
"widgets_values": [
"Image should be undercooked here,\nit runs just enough to set up the scene.\n\nIf you want to end generation here set \"end_at_step\" to \"steps\""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 875,
"type": "Kps3dFromImage",
"pos": {
"0": -150,
"1": -1110
},
"size": {
"0": 282.88043212890625,
"1": 452
},
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 2065,
"shape": 7
},
{
"name": "height",
"type": "INT",
"link": 2063,
"widget": {
"name": "height"
}
},
{
"name": "width",
"type": "INT",
"link": 2064,
"widget": {
"name": "width"
}
}
],
"outputs": [
{
"name": "kps_data_3d",
"type": "KPS_DATA_3D",
"links": [
2066
],
"slot_index": 0
},
{
"name": "kps_data",
"type": "KPS_DATA",
"links": null
}
],
"properties": {
"Node name for S&R": "Kps3dFromImage"
},
"widgets_values": [
1024,
1024,
{
"array": [
[
433.71764694995295,
172.7762382386228,
-175.3184183546636
],
[
510.58058985938527,
171.3798893004592,
-178.85594444475473
],
[
471.28693477460877,
221.9133957763224,
-210.66604318438232
],
[
443.745690971483,
251.81752034424395,
-190.96613998861835
],
[
505.75817676067993,
251.9400693705256,
-193.018352114209
]
],
"opacities": [
1,
1,
1,
1,
1
],
"width": 1024,
"height": 1024,
"jawline": [
[
389.5054435329504,
184.08690828360517,
-84.70850413422372
],
[
392.6796166007638,
207.80457406029515,
-90.81767394113862
],
[
396.4141106016439,
232.0361228375122,
-98.91880999782093
],
[
401.14585839703494,
254.89363805554515,
-111.20308728063011
],
[
408.19609823157344,
274.27907070316644,
-133.42087883243875
],
[
419.92919533488913,
287.6516462677532,
-152.61183045125605
],
[
433.5344446267935,
296.46188051844075,
-168.43349062170628
],
[
448.6603667867491,
301.6221061799145,
-188.01250272777727
],
[
475.1533525199095,
305.75185507846186,
-200.302485922294
],
[
502.4359767320889,
299.8296148922806,
-189.45694953673942
],
[
522.0828042744778,
291.97027718100156,
-169.90656380213005
],
[
538.5056323641735,
279.88841151901994,
-151.81017910191878
],
[
548.5354512893102,
267.18307062655623,
-132.84052569185022
],
[
553.8612593217774,
252.19326743772805,
-116.19439052523256
],
[
558.5857300123821,
229.64150356913615,
-102.36937589587579
],
[
561.2528615262969,
202.32078347136647,
-97.8671312045414
],
[
564.2930455073111,
179.5307629968404,
-94.30836072844278
]
],
"eyebrow_left": [
[
406.31616873809094,
158.2001328094812,
-161.06855634387378
],
[
413.9742969223488,
152.44289411674904,
-171.95529469632896
],
[
423.5018503978363,
149.84059499093166,
-179.0134852922498
],
[
435.64616039579005,
150.19255837608924,
-184.03046211413218
],
[
448.45686602052655,
153.20145564716825,
-187.80730975232115
]
],
"eyebrow_right": [
[
491.97211319774135,
150.33177536078384,
-190.61048762766953
],
[
503.6685988803016,
146.20546332103757,
-188.51662577540498
],
[
515.3465287524316,
144.26134685895133,
-185.04321001035308
],
[
526.2051631198273,
146.17209513323644,
-179.30524314030254
],
[
534.96947577357,
151.1995257339739,
-172.32034396171218
]
],
"nose_bridge": [
[
471.5168654690798,
173.42783762352252,
-194.5102695268997
],
[
471.2686048610005,
184.58726974574859,
-199.3650927688463
],
[
470.9936884278496,
193.34149771990909,
-204.43279552902652
],
[
470.6608133242049,
200.83933597301794,
-210.66604318438232
]
],
"nose_lower": [
[
453.2040877482686,
222.37412848158033,
-192.50507822832841
],
[
462.4582415264144,
221.79110491783845,
-197.95465149943493
],
[
471.28693477460877,
221.9133957763224,
-202.1372895000506
],
[
479.54669073950134,
224.1201172947257,
-200.12580536142025
],
[
490.2029215538137,
220.86723531971003,
-194.47887692782862
]
],
"eye_left": [
[
418.97791154378496,
173.92322935556828,
-167.25896832950173
],
[
427.6343423292303,
167.86664510186577,
-176.8816364689355
],
[
439.058525527588,
167.02624437970246,
-178.32930029068427
],
[
449.84793865433267,
173.54614301663577,
-176.74648159317667
],
[
439.23950115349606,
177.25477183132384,
-177.97111667516035
],
[
427.54766249128636,
177.04041188212753,
-174.72299466890766
]
],
"eye_right": [
[
494.5967115670507,
173.32064958118073,
-179.09774480709376
],
[
505.26510853881007,
166.35182941571605,
-181.04383383250638
],
[
516.8274437796986,
166.34545589822002,
-180.19699505089773
],
[
526.3777160213488,
171.89412728170768,
-172.09711756222737
],
[
515.8415009618066,
175.39902943335085,
-179.7639750451314
],
[
504.57518737149826,
174.9682280570924,
-180.93600642147902
]
],
"mouth_outer": [
[
443.745690971483,
251.81752034424395,
-190.96613998861835
],
[
453.2569153337911,
244.3802708460644,
-200.90158950762958
],
[
461.79155546085974,
239.53281547102048,
-205.59297236452548
],
[
471.961882209677,
241.41664975243742,
-207.63840405579907
],
[
481.14678247619725,
239.40700707629864,
-206.37752917350332
],
[
490.5062041736924,
243.48734911263784,
-202.6979467571814
],
[
505.75817676067993,
251.9400693705256,
-193.018352114209
],
[
492.56944893874584,
257.8767830888436,
-202.2980171062937
],
[
482.58348626817605,
258.73995098363105,
-206.94778452442625
],
[
473.0707774410334,
258.53165797767133,
-207.95714321195672
],
[
463.54022276490224,
258.729624271739,
-206.82339126236639
],
[
452.64360546032856,
256.97518046323245,
-200.86574855639492
]
],
"mouth_inner": [
[
447.09712850311803,
250.76035548527176,
-193.23393432657062
],
[
462.586647734597,
247.93850078333764,
-201.67408705676309
],
[
472.4697950798916,
247.40065658412345,
-203.3730827757579
],
[
481.03599622018055,
247.31542894003948,
-202.68430268994098
],
[
498.183469045925,
250.57274817407102,
-195.56475892037878
],
[
481.4259264070287,
248.66235488050702,
-205.9814453151741
],
[
472.489480374436,
248.94056295307345,
-207.00892289439247
],
[
461.94374537736854,
249.91406531023253,
-205.6796612786808
]
],
"rotateX": 0,
"rotateY": 360,
"rotateZ": 0,
"defaultKpsData": "{\"array\":[[259.0189223240886,206.00637784680464,-161.878141518296],[709.3234785408645,197.8258129982231,-182.60287642703724],[479.1200639261718,493.87833644249673,-368.9635836021195],[317.7686102999715,669.0728194129958,-253.5509305043247],[681.0711828557334,669.7907776748775,-265.5738954793406]],\"height\":1024,\"width\":1024,\"rotateX\":0,\"rotateY\":0,\"rotateZ\":0,\"opacities\":[1,1,1,1,1],\"jawline\":[[0,272.2703805291043,368.9635836021195],[18.59601702137716,411.2212527934467,333.17277343242273],[40.47469613651369,553.1827287081389,285.71195110670936],[68.19582559735079,687.0943752944843,213.7440323555739],[109.49993131776831,800.6646903908388,83.58023187967251],[178.23873943733744,879.0084471759787,-28.850708505627438],[257.94562435102677,930.6235489955409,-121.54252320835153],[346.56143071735266,960.8549327874205,-236.24693113058848],[501.77162345594223,985.0492281741899,-308.24827818855186],[661.6079440970946,950.3535524961192,-244.70927923577125],[776.7096514044409,904.3093152307649,-130.17258002997417],[872.9234318664877,833.5272328741225,-24.15420273262737],[931.683518184544,759.0924965031143,86.98025344441623],[962.8849727708185,671.2741484511048,184.50228714745202],[990.5634690287446,539.1537580997029,265.4966758829751],[1006.1889632823313,379.0942512233561,291.8732524355998],[1024,245.57802523075014,312.7224484103779]],\"eyebrow_left\":[[98.48629087885193,120.61169429464823,-78.39476778799411],[143.351734263276,86.8826863171701,-142.17515007477272],[199.16927880702656,71.63701514406281,-183.5258356416079],[270.31719374740595,73.69900639704827,-212.91799050600852],[345.36921352198056,91.32674870131498,-235.04480006125783]],\"eyebrow_right\":[[600.3049904657246,74.5146145449765,-251.46732724243566],[668.8293091453716,50.340454129869954,-239.20035571528254],[737.2449178841147,38.95077182581002,-218.8512136523637],[800.8606518756158,50.14496529701001,-185.23511040155245],[852.2067202240371,79.59836403355236,-144.31380546869116]],\"nose_bridge\":[[480.4671218895442,209.82379831942703,-274.31435197247015],[479.0126774106356,275.20176771816944,-302.7565237489472],[477.4020687383591,326.48875457696914,-332.4458585061444],[475.4519069289294,370.4151331327517,-368.9635836021195]],\"nose_lower\":[[373.18099762049303,496.5775570099449,-262.5668603509639],[427.39681934800626,493.1618906667494,-294.4933984267684],[479.1200639261718,493.87833644249673,-318.9975466858585],[527.5101671858453,506.80650073630306,-307.21318821482834],[589.9401120480451,487.7493645047273,-274.1304372034271]],\"eye_left\":[[172.66560615392797,212.72607015040668,-114.66153843808252],[223.37964435897322,177.24333450019273,-171.03631595934817],[290.3086682884536,172.31981401147067,-179.51751105972022],[353.5188669351921,210.5168950904759,-170.2445058354395],[291.36892106860694,232.24404200103095,-177.41907834393618],[222.87182713937767,230.98820585763428,-158.38982857546176]],\"eye_right\":[[615.6813026286832,209.19583298253698,-184.0194733036943],[678.1825233999625,168.3687275767284,-195.4207119471242],[745.920916472067,168.33138807528752,-190.4594738354277],[801.8715597956372,200.83849631700764,-143.00602487961916],[740.144731925126,221.372102606823,-187.92260920145966],[674.1405932667781,218.84823590057175,-194.78900084379217]],\"mouth_outer\":[[317.7686102999715,669.0728194129958,-253.5509305043247],[373.4904900957268,625.5014024468599,-311.758149966949],[423.49101296691,597.1023956067004,-339.2427998574267],[483.0742698635661,608.1389123983984,-351.2260413928955],[536.8843671855499,596.365342207373,-343.8391565973692],[591.7169051343292,620.2701855601886,-322.28217914729674],[681.0711828557334,669.7907776748775,-265.5738954793406],[603.8045052589911,704.5712471068532,-319.9391756511496],[545.3013525230012,709.6281499665452,-347.1800198665548],[489.57077593197357,708.4078572473047,-353.0933872012854],[433.7356487369116,709.5676505211727,-346.45125707725856],[369.89739022289973,699.2891728739157,-311.5481743528338]],\"mouth_inner\":[[337.4031381133213,662.8793777537512,-266.83689229927944],[428.14909213906014,646.3474316537943,-316.28385706160196],[486.0498972720599,643.1964503841036,-326.23748990854693],[536.2353215731629,642.6971408990134,-322.2022448459132],[636.6944615534592,661.7802729860227,-280.4921193125181],[538.5197428182757,650.5881591832574,-341.51868382728924],[486.1652243398013,652.2180520537465,-347.5382013973857],[424.3826235430874,657.9213536750901,-339.75067025036293]]}"
},
-1.0407629248871881,
null,
"",
""
],
"color": "#432",
"bgcolor": "#653"
}
],
"links": [
[
1460,
641,
0,
642,
1,
"IMAGE"
],
[
1491,
650,
0,
642,
0,
"INSIGHTFACE_APP"
],
[
1576,
679,
0,
677,
0,
"INT"
],
[
1577,
680,
0,
677,
1,
"INT"
],
[
1800,
252,
0,
775,
0,
"CONDITIONING"
],
[
1801,
287,
0,
775,
1,
"CONDITIONING"
],
[
1802,
636,
0,
775,
3,
"CONTROL_NET"
],
[
1893,
794,
0,
793,
0,
"MODEL"
],
[
1896,
774,
1,
796,
0,
"RESAMPLER"
],
[
1897,
642,
0,
796,
1,
"FACE_EMBED"
],
[
1898,
796,
0,
793,
2,
"FACE_CONDITIONING"
],
[
1900,
797,
0,
775,
2,
"FACE_CONDITIONING"
],
[
1901,
796,
0,
797,
0,
"*"
],
[
1902,
794,
1,
287,
0,
"CLIP"
],
[
1904,
794,
1,
798,
0,
"*"
],
[
1905,
798,
0,
252,
0,
"CLIP"
],
[
1908,
248,
0,
800,
0,
"IMAGE"
],
[
1911,
793,
0,
801,
0,
"*"
],
[
1913,
774,
0,
793,
1,
"INSTANTID_ADAPTER"
],
[
1918,
802,
1,
805,
0,
"*"
],
[
1922,
794,
1,
811,
0,
"*"
],
[
1925,
812,
0,
809,
0,
"CLIP"
],
[
1927,
809,
0,
807,
0,
"CONDITIONING"
],
[
1928,
810,
0,
807,
1,
"CONDITIONING"
],
[
1929,
796,
0,
813,
0,
"*"
],
[
1930,
813,
0,
814,
0,
"*"
],
[
1931,
814,
0,
807,
2,
"FACE_CONDITIONING"
],
[
1932,
811,
0,
812,
0,
"*"
],
[
1943,
802,
0,
803,
0,
"*"
],
[
1947,
803,
0,
821,
0,
"IMAGE"
],
[
1948,
794,
2,
822,
0,
"*"
],
[
1950,
823,
0,
821,
1,
"VAE"
],
[
1951,
821,
0,
806,
0,
"LATENT"
],
[
1953,
825,
0,
824,
0,
"MODEL"
],
[
1954,
806,
0,
824,
3,
"LATENT"
],
[
1955,
807,
0,
824,
1,
"CONDITIONING"
],
[
1956,
807,
1,
824,
2,
"CONDITIONING"
],
[
1957,
824,
0,
827,
0,
"LATENT"
],
[
1958,
827,
0,
828,
0,
"IMAGE"
],
[
1959,
823,
0,
829,
0,
"*"
],
[
1960,
829,
0,
827,
1,
"VAE"
],
[
1961,
805,
0,
806,
1,
"MASK"
],
[
1962,
827,
0,
830,
0,
"IMAGE"
],
[
1963,
802,
5,
830,
1,
"INT"
],
[
1964,
802,
6,
830,
2,
"INT"
],
[
1966,
802,
3,
832,
0,
"*"
],
[
1967,
802,
4,
833,
0,
"*"
],
[
1968,
832,
0,
831,
3,
"INT"
],
[
1969,
833,
0,
831,
4,
"INT"
],
[
1970,
831,
0,
834,
0,
"IMAGE"
],
[
1974,
636,
0,
836,
0,
"*"
],
[
1976,
837,
0,
807,
3,
"CONTROL_NET"
],
[
1982,
830,
0,
831,
1,
"IMAGE"
],
[
1983,
838,
0,
831,
0,
"IMAGE"
],
[
1984,
812,
0,
810,
0,
"CLIP"
],
[
1989,
802,
3,
841,
1,
"INT"
],
[
1990,
802,
4,
841,
2,
"INT"
],
[
1991,
802,
5,
841,
3,
"INT"
],
[
1992,
802,
6,
841,
4,
"INT"
],
[
1996,
802,
7,
842,
1,
"INT"
],
[
1997,
802,
8,
842,
2,
"INT"
],
[
1998,
841,
0,
842,
0,
"KPS_DATA"
],
[
1999,
842,
0,
843,
0,
"KPS_DATA"
],
[
2000,
843,
0,
807,
4,
"IMAGE"
],
[
2003,
844,
0,
802,
1,
"MASK"
],
[
2005,
845,
0,
775,
4,
"IMAGE"
],
[
2006,
849,
0,
847,
1,
"FLOAT"
],
[
2007,
849,
0,
848,
1,
"FLOAT"
],
[
2009,
850,
0,
848,
0,
"KPS_DATA"
],
[
2010,
252,
0,
851,
0,
"*"
],
[
2011,
287,
0,
852,
0,
"*"
],
[
2012,
851,
0,
853,
0,
"CONDITIONING"
],
[
2013,
852,
0,
853,
1,
"CONDITIONING"
],
[
2016,
796,
0,
855,
0,
"*"
],
[
2017,
855,
0,
853,
2,
"FACE_CONDITIONING"
],
[
2018,
857,
0,
248,
0,
"LATENT"
],
[
2019,
801,
0,
857,
0,
"MODEL"
],
[
2020,
775,
0,
857,
1,
"CONDITIONING"
],
[
2021,
775,
1,
857,
2,
"CONDITIONING"
],
[
2022,
677,
0,
857,
3,
"LATENT"
],
[
2023,
801,
0,
858,
0,
"*"
],
[
2024,
858,
0,
856,
0,
"MODEL"
],
[
2025,
853,
0,
856,
1,
"CONDITIONING"
],
[
2026,
853,
1,
856,
2,
"CONDITIONING"
],
[
2027,
856,
0,
859,
0,
"LATENT"
],
[
2029,
822,
0,
860,
0,
"*"
],
[
2030,
860,
0,
861,
0,
"*"
],
[
2031,
861,
0,
862,
0,
"*"
],
[
2032,
862,
0,
823,
0,
"*"
],
[
2033,
861,
0,
859,
1,
"VAE"
],
[
2034,
860,
0,
248,
1,
"VAE"
],
[
2035,
859,
0,
863,
0,
"IMAGE"
],
[
2036,
848,
0,
864,
0,
"KPS_DATA"
],
[
2037,
864,
0,
853,
4,
"IMAGE"
],
[
2038,
847,
0,
856,
3,
"LATENT"
],
[
2040,
848,
0,
835,
0,
"*"
],
[
2043,
857,
0,
865,
0,
"*"
],
[
2044,
865,
0,
847,
0,
"LATENT"
],
[
2045,
836,
0,
866,
0,
"*"
],
[
2046,
866,
0,
853,
3,
"CONTROL_NET"
],
[
2047,
866,
0,
837,
0,
"*"
],
[
2048,
858,
0,
825,
0,
"*"
],
[
2051,
835,
0,
844,
0,
"KPS_DATA"
],
[
2053,
868,
0,
838,
0,
"*"
],
[
2054,
868,
0,
802,
0,
"IMAGE"
],
[
2055,
859,
0,
869,
0,
"*"
],
[
2056,
869,
0,
868,
0,
"*"
],
[
2057,
835,
0,
870,
0,
"*"
],
[
2058,
870,
0,
841,
0,
"KPS_DATA"
],
[
2060,
873,
0,
845,
0,
"KPS_DATA"
],
[
2061,
873,
0,
850,
0,
"*"
],
[
2062,
845,
0,
874,
0,
"IMAGE"
],
[
2063,
679,
0,
875,
1,
"INT"
],
[
2064,
680,
0,
875,
2,
"INT"
],
[
2065,
641,
0,
875,
0,
"IMAGE"
],
[
2066,
875,
0,
876,
0,
"KPS_DATA_3D"
],
[
2067,
876,
0,
873,
0,
"KPS_DATA"
]
],
"groups": [
{
"title": "Enhance face",
"bounding": [
4511,
-990,
3383,
1704
],
"color": "#88A",
"font_size": 24,
"flags": {}
},
{
"title": "Latent upscale",
"bounding": [
2071,
-847,
2044,
1475
],
"color": "#3f789e",
"font_size": 24,
"flags": {}
}
],
"config": {},
"extra": {
"ds": {
"scale": 0.4177248169415962,
"offset": [
1285.377823150568,
1786.0416007980189
]
},
"groupNodes": {}
},
"version": 0.4
}
================================================
FILE: workflows/prop2image_latent_upscale_with_3d_and_2d_randomizer_with_rotation.json
================================================
{
"last_node_id": 895,
"last_link_id": 2096,
"nodes": [
{
"id": 650,
"type": "LoadInsightface",
"pos": {
"0": -975,
"1": -570
},
"size": {
"0": 308.15679931640625,
"1": 26
},
"flags": {
"collapsed": false
},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"links": [
1491
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInsightface"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 642,
"type": "FaceEmbed",
"pos": {
"0": -549,
"1": -384
},
"size": {
"0": 292.20001220703125,
"1": 66
},
"flags": {
"collapsed": true
},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 1491
},
{
"name": "face_image",
"type": "IMAGE",
"link": 1460
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "face embeds",
"type": "FACE_EMBED",
"links": [
1897
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbed"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 797,
"type": "Reroute",
"pos": {
"0": -181,
"1": -270
},
"size": [
75,
26
],
"flags": {},
"order": 28,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1901
}
],
"outputs": [
{
"name": "",
"type": "FACE_CONDITIONING",
"links": [
1900
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 798,
"type": "Reroute",
"pos": {
"0": -233,
"1": -459
},
"size": [
75,
26
],
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1904
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1905
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 774,
"type": "LoadInstantIdAdapter",
"pos": {
"0": -979,
"1": -451
},
"size": {
"0": 315,
"1": 78
},
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "InstantId_adapter",
"type": "INSTANTID_ADAPTER",
"links": [
1913
],
"slot_index": 0,
"shape": 3
},
{
"name": "resampler",
"type": "RESAMPLER",
"links": [
1896
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInstantIdAdapter"
},
"widgets_values": [
"ip-adapter.bin"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 813,
"type": "Reroute",
"pos": {
"0": -158,
"1": 348
},
"size": [
75,
26
],
"flags": {},
"order": 29,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1929
}
],
"outputs": [
{
"name": "",
"type": "FACE_CONDITIONING",
"links": [
1930
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 814,
"type": "Reroute",
"pos": {
"0": 5659.376953125,
"1": 361.3683776855469
},
"size": [
75,
26
],
"flags": {},
"order": 37,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1930
}
],
"outputs": [
{
"name": "",
"type": "FACE_CONDITIONING",
"links": [
1931
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 812,
"type": "Reroute",
"pos": {
"0": 5289.376953125,
"1": 271.3683776855469
},
"size": [
75,
26
],
"flags": {},
"order": 24,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1932
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1925,
1984
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 811,
"type": "Reroute",
"pos": {
"0": -341,
"1": 262
},
"size": [
75,
26
],
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1922
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1932
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 825,
"type": "Reroute",
"pos": {
"0": 5979.376953125,
"1": -298.6316223144531
},
"size": [
75,
26
],
"flags": {},
"order": 46,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2048
}
],
"outputs": [
{
"name": "",
"type": "MODEL",
"links": [
1953
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 829,
"type": "Reroute",
"pos": {
"0": 6809.376953125,
"1": 441.3683776855469
},
"size": [
75,
26
],
"flags": {},
"order": 51,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1959
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1960
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 806,
"type": "SetLatentNoiseMask",
"pos": {
"0": 6409.376953125,
"1": -268.6316223144531
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 81,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1951
},
{
"name": "mask",
"type": "MASK",
"link": 1961
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1954
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "SetLatentNoiseMask"
},
"widgets_values": []
},
{
"id": 821,
"type": "VAEEncode",
"pos": {
"0": 6199.376953125,
"1": -268.6316223144531
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 79,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 1947
},
{
"name": "vae",
"type": "VAE",
"link": 1950
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1951
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEEncode"
},
"widgets_values": []
},
{
"id": 832,
"type": "Reroute",
"pos": {
"0": 7049.376953125,
"1": -628.6316528320312
},
"size": [
75,
26
],
"flags": {},
"order": 76,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1966,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
1968
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 833,
"type": "Reroute",
"pos": {
"0": 7049.376953125,
"1": -608.6316528320312
},
"size": [
75,
26
],
"flags": {},
"order": 77,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1967,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
1969
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 837,
"type": "Reroute",
"pos": {
"0": 5689.376953125,
"1": 541.3683471679688
},
"size": [
75,
26
],
"flags": {},
"order": 26,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2047
}
],
"outputs": [
{
"name": "",
"type": "CONTROL_NET",
"links": [
1976
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 836,
"type": "Reroute",
"pos": {
"0": -470,
"1": 525
},
"size": [
75,
26
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1974
}
],
"outputs": [
{
"name": "",
"type": "CONTROL_NET",
"links": [
2045
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 827,
"type": "VAEDecode",
"pos": {
"0": 7019.376953125,
"1": -278.6316223144531
},
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 85,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1957
},
{
"name": "vae",
"type": "VAE",
"link": 1960
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1958,
1962
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 810,
"type": "CLIPTextEncode",
"pos": {
"0": 5419.376953125,
"1": 11.368349075317383
},
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {
"collapsed": false
},
"order": 34,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1984
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1928
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 252,
"type": "CLIPTextEncode",
"pos": {
"0": 170,
"1": -457
},
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {
"collapsed": false
},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1905
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1800,
2010
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"man in the city, high quality"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 842,
"type": "KpsScale",
"pos": {
"0": 5919.376953125,
"1": -388.6316223144531
},
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": true
},
"order": 80,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1998
},
{
"name": "width",
"type": "INT",
"link": 1996,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1997,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1999
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsScale"
},
"widgets_values": [
1024,
1024
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 636,
"type": "ControlNetLoader",
"pos": {
"0": -984,
"1": -248
},
"size": {
"0": 315,
"1": 58
},
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
1802,
1974
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetLoader"
},
"widgets_values": [
"ControlNetModel\\diffusion_pytorch_model.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 796,
"type": "FaceEmbedCombine",
"pos": {
"0": -545,
"1": -85
},
"size": {
"0": 367.79998779296875,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "resampler",
"type": "RESAMPLER",
"link": 1896
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": 1897
}
],
"outputs": [
{
"name": "face conditioning",
"type": "FACE_CONDITIONING",
"links": [
1898,
1901,
1929,
2016
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbedCombine"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 801,
"type": "Reroute",
"pos": {
"0": 150,
"1": -329
},
"size": [
75,
26
],
"flags": {},
"order": 36,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1911
}
],
"outputs": [
{
"name": "",
"type": "MODEL",
"links": [
2019,
2023
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 677,
"type": "EmptyLatentImage",
"pos": {
"0": 605,
"1": 72
},
"size": {
"0": 315,
"1": 106
},
"flags": {
"collapsed": true
},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "height",
"type": "INT",
"link": 1576,
"widget": {
"name": "height"
}
},
{
"name": "width",
"type": "INT",
"link": 1577,
"widget": {
"name": "width"
}
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2022
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "EmptyLatentImage"
},
"widgets_values": [
1024,
1024,
1
]
},
{
"id": 775,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 543,
"1": -301
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 42,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1800
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1801
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1900
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1802
},
{
"name": "image",
"type": "IMAGE",
"link": 2005
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
2020
],
"slot_index": 0,
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
2021
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
1
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 793,
"type": "InstantIdAdapterApply",
"pos": {
"0": -214,
"1": -154
},
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 27,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1893
},
{
"name": "instantId_adapter",
"type": "INSTANTID_ADAPTER",
"link": 1913
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1898
}
],
"outputs": [
{
"name": "model",
"type": "MODEL",
"links": [
1911
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "InstantIdAdapterApply"
},
"widgets_values": [
0.8
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 822,
"type": "Reroute",
"pos": {
"0": -559,
"1": 413
},
"size": [
75,
26
],
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1948
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
2029
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 860,
"type": "Reroute",
"pos": {
"0": 1240,
"1": 425
},
"size": [
75,
26
],
"flags": {},
"order": 25,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2029
}
],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [
2030,
2034
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 861,
"type": "Reroute",
"pos": {
"0": 3263.10205078125,
"1": 409.437744140625
},
"size": [
75,
26
],
"flags": {},
"order": 35,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2030
}
],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [
2031,
2033
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 850,
"type": "Reroute",
"pos": {
"0": 1331,
"1": -513
},
"size": [
107.2,
26
],
"flags": {},
"order": 39,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2061
}
],
"outputs": [
{
"name": "KPS_DATA",
"type": "KPS_DATA",
"links": [
2009
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 865,
"type": "Reroute",
"pos": {
"0": 1672,
"1": -591
},
"size": [
90.4,
26
],
"flags": {},
"order": 53,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2043
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2044
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 862,
"type": "Reroute",
"pos": {
"0": 5599.376953125,
"1": 431.3683776855469
},
"size": [
75,
26
],
"flags": {},
"order": 40,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2031
}
],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [
2032
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 823,
"type": "Reroute",
"pos": {
"0": 5909.376953125,
"1": 431.3683776855469
},
"size": [
75,
26
],
"flags": {},
"order": 45,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2032
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1950,
1959
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 851,
"type": "Reroute",
"pos": {
"0": 2231.101806640625,
"1": -439.562255859375
},
"size": [
140.8,
26
],
"flags": {},
"order": 32,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2010
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
2012
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 852,
"type": "Reroute",
"pos": {
"0": 2204.1015625,
"1": -129.56224060058594
},
"size": [
140.8,
26
],
"flags": {},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2011
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
2013
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 855,
"type": "Reroute",
"pos": {
"0": 2195.1015625,
"1": -114.56224822998047
},
"size": [
182.79999999999998,
26
],
"flags": {},
"order": 30,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2016
}
],
"outputs": [
{
"name": "FACE_CONDITIONING",
"type": "FACE_CONDITIONING",
"links": [
2017
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 859,
"type": "VAEDecode",
"pos": {
"0": 3441.10205078125,
"1": -287.562255859375
},
"size": {
"0": 210,
"1": 46
},
"flags": {},
"order": 65,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 2027
},
{
"name": "vae",
"type": "VAE",
"link": 2033
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2035,
2055
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 858,
"type": "Reroute",
"pos": {
"0": 2687.10205078125,
"1": -327.562255859375
},
"size": [
82,
26
],
"flags": {},
"order": 41,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2023
}
],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
2024,
2048
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 864,
"type": "KpsMaker",
"pos": {
"0": 2418.10205078125,
"1": -413.562255859375
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 48,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2036
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
2037
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 849,
"type": "PrimitiveNode",
"pos": {
"0": 2083.10302734375,
"1": -683.562255859375
},
"size": {
"0": 210,
"1": 82
},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "FLOAT",
"type": "FLOAT",
"links": [
2006,
2007
],
"slot_index": 0,
"widget": {
"name": "scale_by"
}
}
],
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
1.4000000000000001,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 853,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 2570.10205078125,
"1": -153.562255859375
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 54,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 2012
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 2013
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 2017
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 2046
},
{
"name": "image",
"type": "IMAGE",
"link": 2037
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
2025
],
"slot_index": 0
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
2026
],
"slot_index": 1
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
0.8
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 809,
"type": "CLIPTextEncode",
"pos": {
"0": 5419.376953125,
"1": -138.63165283203125
},
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {
"collapsed": false
},
"order": 33,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1925
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1927
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 828,
"type": "PreviewImage",
"pos": {
"0": 7029.376953125,
"1": -218.6316680908203
},
"size": {
"0": 402.61297607421875,
"1": 261.80877685546875
},
"flags": {},
"order": 86,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1958
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 843,
"type": "KpsMaker",
"pos": {
"0": 6059.376953125,
"1": -388.6316223144531
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 82,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 1999
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
2000
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 838,
"type": "Reroute",
"pos": {
"0": 6879.376953125,
"1": -358.6316223144531
},
"size": [
75,
26
],
"flags": {},
"order": 72,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2053
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1983
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 868,
"type": "Reroute",
"pos": {
"0": 5259.376953125,
"1": -378.6316223144531
},
"size": [
82,
26
],
"flags": {},
"order": 70,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2078
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2053,
2054
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 863,
"type": "PreviewImage",
"pos": {
"0": 3694,
"1": -276
},
"size": {
"0": 371.20855712890625,
"1": 519.438720703125
},
"flags": {},
"order": 66,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 2035
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 847,
"type": "LatentUpscaleBy",
"pos": {
"0": 2599,
"1": -557
},
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": true
},
"order": 59,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 2044
},
{
"name": "scale_by",
"type": "FLOAT",
"link": 2006,
"widget": {
"name": "scale_by"
}
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2038
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "LatentUpscaleBy"
},
"widgets_values": [
"nearest-exact",
1.4000000000000001
]
},
{
"id": 803,
"type": "Reroute",
"pos": {
"0": 6039.376953125,
"1": -718.6316528320312
},
"size": [
75,
26
],
"flags": {},
"order": 74,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1943
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1947
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 805,
"type": "Reroute",
"pos": {
"0": 6239.376953125,
"1": -698.6316528320312
},
"size": [
75,
26
],
"flags": {},
"order": 75,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1918
}
],
"outputs": [
{
"name": "",
"type": "MASK",
"links": [
1961
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 807,
"type": "ControlNetInstantIdApply",
"pos": {
"0": 6199.376953125,
"1": -138.63165283203125
},
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 83,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1927
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1928
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1931
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1976
},
{
"name": "image",
"type": "IMAGE",
"link": 2000
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
1955
],
"slot_index": 0,
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
1956
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
1
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 287,
"type": "CLIPTextEncode",
"pos": {
"0": 167,
"1": -137
},
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {
"collapsed": false
},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1902
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1801,
2011
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
"ugly, deformed"
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 248,
"type": "VAEDecode",
"pos": {
"0": 1412,
"1": -302
},
"size": {
"0": 140,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 52,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 2018
},
{
"name": "vae",
"type": "VAE",
"link": 2034
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1908
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
},
"widgets_values": []
},
{
"id": 866,
"type": "Reroute",
"pos": {
"0": 2259,
"1": 504
},
"size": [
132.39999999999998,
26
],
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2045
}
],
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
2046,
2047
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 679,
"type": "PrimitiveNode",
"pos": {
"0": -550,
"1": -21
},
"size": {
"0": 210,
"1": 82
},
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
1576,
2063
],
"slot_index": 0,
"widget": {
"name": "height"
}
}
],
"title": "IMAGE HEIGHT",
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
1024,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 680,
"type": "PrimitiveNode",
"pos": {
"0": -545,
"1": 109
},
"size": {
"0": 210,
"1": 82
},
"flags": {},
"order": 5,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
1577,
2064
],
"slot_index": 0,
"widget": {
"name": "width"
}
}
],
"title": "IMAGE WIDTH",
"properties": {
"Run widget replace on values": false
},
"widgets_values": [
1024,
"fixed"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 641,
"type": "LoadImage",
"pos": {
"0": -578,
"1": -753
},
"size": {
"0": 235.36587524414062,
"1": 314
},
"flags": {},
"order": 6,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1460,
2065
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"title": "Load face Referecnce",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"han3.jpg",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 873,
"type": "Kps2dRandomizer",
"pos": {
"0": 190,
"1": -900
},
"size": {
"0": 315,
"1": 250
},
"flags": {},
"order": 31,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2067
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
2060,
2061
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "Kps2dRandomizer"
},
"widgets_values": [
320005400209870,
"randomize",
0,
0,
0.9,
1.2,
500,
50,
100
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 845,
"type": "KpsMaker",
"pos": {
"0": 299,
"1": -533
},
"size": {
"0": 279.5999755859375,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 38,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2060
}
],
"outputs": [
{
"name": "control_image",
"type": "IMAGE",
"links": [
2005,
2062
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsMaker"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 874,
"type": "PreviewImage",
"pos": {
"0": 644,
"1": -1104
},
"size": {
"0": 357.7528991699219,
"1": 273.61285400390625
},
"flags": {},
"order": 43,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 2062
}
],
"outputs": [],
"title": "Randomized KPS",
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 824,
"type": "KSampler",
"pos": {
"0": 6679.376953125,
"1": -268.6316223144531
},
"size": {
"0": 315,
"1": 474
},
"flags": {},
"order": 84,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1953
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1955
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1956
},
{
"name": "latent_image",
"type": "LATENT",
"link": 1954
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1957
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
530821850570197,
"randomize",
20,
4,
"euler",
"normal",
0.6
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 856,
"type": "KSampler",
"pos": {
"0": 2993.10205078125,
"1": -330.562255859375
},
"size": {
"0": 377.1995544433594,
"1": 577.224609375
},
"flags": {},
"order": 62,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 2024
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 2025
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 2026
},
{
"name": "latent_image",
"type": "LATENT",
"link": 2038
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2027
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
945295579210304,
"randomize",
20,
4,
"euler",
"normal",
0.6
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 857,
"type": "KSamplerAdvanced",
"pos": {
"0": 1010,
"1": -329
},
"size": {
"0": 315,
"1": 546
},
"flags": {},
"order": 47,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 2019
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 2020
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 2021
},
{
"name": "latent_image",
"type": "LATENT",
"link": 2022
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
2018,
2043
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KSamplerAdvanced"
},
"widgets_values": [
"enable",
236272004051104,
"randomize",
50,
4,
"euler",
"normal",
0,
25,
"disable"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 877,
"type": "Reroute",
"pos": {
"0": 10,
"1": 10
},
"size": [
75,
26
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "*",
"type": "*",
"links": null
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 794,
"type": "CheckpointLoaderSimple",
"pos": {
"0": -981,
"1": -155
},
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 8,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
1893
],
"slot_index": 0,
"shape": 3
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
1902,
1904,
1922
],
"slot_index": 1,
"shape": 3
},
{
"name": "VAE",
"type": "VAE",
"links": [
1948
],
"slot_index": 2,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"custom_3.9.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 802,
"type": "PreprocessImage",
"pos": {
"0": 5399.376953125,
"1": -718.6316528320312
},
"size": {
"0": 342.5999755859375,
"1": 290
},
"flags": {},
"order": 73,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 2054
},
{
"name": "mask",
"type": "MASK",
"link": 2003
},
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": null,
"shape": 7
}
],
"outputs": [
{
"name": "resized_image",
"type": "IMAGE",
"links": [
1943
],
"slot_index": 0,
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": [
1918
],
"slot_index": 1,
"shape": 3
},
{
"name": "control_image",
"type": "IMAGE",
"links": [],
"slot_index": 2,
"shape": 3
},
{
"name": "x",
"type": "INT",
"links": [
1966,
1989
],
"slot_index": 3,
"shape": 3
},
{
"name": "y",
"type": "INT",
"links": [
1967,
1990
],
"slot_index": 4,
"shape": 3
},
{
"name": "original_width",
"type": "INT",
"links": [
1963,
1991
],
"slot_index": 5,
"shape": 3
},
{
"name": "original_height",
"type": "INT",
"links": [
1964,
1992
],
"slot_index": 6,
"shape": 3
},
{
"name": "new_width",
"type": "INT",
"links": [
1996
],
"slot_index": 7,
"shape": 3
},
{
"name": "new_height",
"type": "INT",
"links": [
1997
],
"slot_index": 8,
"shape": 3
}
],
"properties": {
"Node name for S&R": "PreprocessImage"
},
"widgets_values": [
1024,
1024,
"auto",
50
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 841,
"type": "KpsCrop",
"pos": {
"0": 5769.376953125,
"1": -388.6316223144531
},
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 78,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2058
},
{
"name": "x",
"type": "INT",
"link": 1989,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 1990,
"widget": {
"name": "y"
}
},
{
"name": "width",
"type": "INT",
"link": 1991,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1992,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
1998
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsCrop"
},
"widgets_values": [
0,
0,
1024,
1024
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 844,
"type": "MaskFromKps",
"pos": {
"0": 4949.376953125,
"1": -698.6316528320312
},
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": false
},
"order": 64,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2076
}
],
"outputs": [
{
"name": "mask",
"type": "MASK",
"links": [
2003
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "MaskFromKps"
},
"widgets_values": [
3
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 869,
"type": "Reroute",
"pos": {
"0": 3721,
"1": -398
},
"size": [
82,
26
],
"flags": {},
"order": 67,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2055
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2077,
2084
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 848,
"type": "KpsScaleBy",
"pos": {
"0": 2327,
"1": -499
},
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": true
},
"order": 44,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2009
},
{
"name": "scale",
"type": "FLOAT",
"link": 2007,
"widget": {
"name": "scale"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
2036,
2079,
2089,
2090
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsScaleBy"
},
"widgets_values": [
1.4000000000000001
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 876,
"type": "Kps3dRandomizer",
"pos": {
"0": 190,
"1": -1110
},
"size": {
"0": 315,
"1": 154
},
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "kps_data_3d",
"type": "KPS_DATA_3D",
"link": 2066
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
2067
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "Kps3dRandomizer"
},
"widgets_values": [
791399708832399,
"randomize",
10,
40,
70
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 871,
"type": "Note",
"pos": {
"0": 1390,
"1": -164
},
"size": {
"0": 210,
"1": 291.76165771484375
},
"flags": {},
"order": 9,
"mode": 0,
"inputs": [],
"outputs": [],
"properties": {},
"widgets_values": [
"Image should be undercooked here,\nit runs just enough to set up the scene.\n\nIf you want to end generation here set \"end_at_step\" to \"steps\""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 800,
"type": "PreviewImage",
"pos": {
"0": 1544,
"1": -218
},
"size": {
"0": 351.6155090332031,
"1": 362.6221008300781
},
"flags": {
"collapsed": false
},
"order": 58,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1908
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 889,
"type": "Reroute",
"pos": {
"0": 7129.376953125,
"1": -918.6316528320312
},
"size": [
82,
26
],
"flags": {},
"order": 71,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2086
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2087,
2094
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 892,
"type": "Reroute",
"pos": {
"0": 6969.376953125,
"1": -998.6316528320312
},
"size": [
107.2,
26
],
"flags": {},
"order": 57,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2091
}
],
"outputs": [
{
"name": "KPS_DATA",
"type": "KPS_DATA",
"links": [
2092
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 886,
"type": "ComposeRotated",
"pos": {
"0": 7909.37841796875,
"1": -918.6316528320312
},
"size": {
"0": 289.79998779296875,
"1": 46
},
"flags": {},
"order": 90,
"mode": 0,
"inputs": [
{
"name": "original_image",
"type": "IMAGE",
"link": 2087
},
{
"name": "rotated_image",
"type": "IMAGE",
"link": 2088
}
],
"outputs": [
{
"name": "image",
"type": "IMAGE",
"links": [
2095
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "ComposeRotated"
},
"widgets_values": [],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 893,
"type": "MaskFromKps",
"pos": {
"0": 7419.376953125,
"1": -968.6316528320312
},
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": true
},
"order": 61,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2092
}
],
"outputs": [
{
"name": "mask",
"type": "MASK",
"links": [
2093
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "MaskFromKps"
},
"widgets_values": [
4
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 831,
"type": "ImageCompositeMasked",
"pos": {
"0": 7339.376953125,
"1": -588.6316528320312
},
"size": {
"0": 315,
"1": 146
},
"flags": {
"collapsed": true
},
"order": 88,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 1983
},
{
"name": "source",
"type": "IMAGE",
"link": 1982
},
{
"name": "mask",
"type": "MASK",
"link": null,
"shape": 7
},
{
"name": "x",
"type": "INT",
"link": 1968,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 1969,
"widget": {
"name": "y"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2082
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
false
]
},
{
"id": 830,
"type": "ImageScale",
"pos": {
"0": 7209.376953125,
"1": -528.6316528320312
},
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 87,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1962
},
{
"name": "width",
"type": "INT",
"link": 1963,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 1964,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1982
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"nearest-exact",
512,
512,
"disabled"
]
},
{
"id": 884,
"type": "RotateImage",
"pos": {
"0": 7549.376953125,
"1": -738.6316528320312
},
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": true
},
"order": 89,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 2082
},
{
"name": "angle",
"type": "FLOAT",
"link": 2081,
"widget": {
"name": "angle"
}
}
],
"outputs": [
{
"name": "rotated_image",
"type": "IMAGE",
"links": [
2088
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "RotateImage"
},
"widgets_values": [
0,
false
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 894,
"type": "PreviewImage",
"pos": {
"0": 7459.376953125,
"1": -218.6316680908203
},
"size": {
"0": 1107.3201904296875,
"1": 1167.626708984375
},
"flags": {},
"order": 92,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 2096
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#233",
"bgcolor": "#355"
},
{
"id": 880,
"type": "RotateImage",
"pos": {
"0": 5009.376953125,
"1": -348.6316223144531
},
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": true
},
"order": 68,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 2077
},
{
"name": "angle",
"type": "FLOAT",
"link": 2069,
"widget": {
"name": "angle"
}
}
],
"outputs": [
{
"name": "rotated_image",
"type": "IMAGE",
"links": [
2078
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "RotateImage"
},
"widgets_values": [
0,
true
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 835,
"type": "Reroute",
"pos": {
"0": 4865.376953125,
"1": -563.6316528320312
},
"size": [
75,
26
],
"flags": {},
"order": 60,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2075
}
],
"outputs": [
{
"name": "",
"type": "KPS_DATA",
"links": [
2057,
2076
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 885,
"type": "Reroute",
"pos": {
"0": 5041.376953125,
"1": -793.6316528320312
},
"size": [
82,
26
],
"flags": {},
"order": 56,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2080,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "FLOAT",
"type": "FLOAT",
"links": [
2081
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 878,
"type": "AngleFromKps",
"pos": {
"0": 4522,
"1": -784
},
"size": {
"0": 283.8384704589844,
"1": 58
},
"flags": {
"collapsed": false
},
"order": 49,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2079
}
],
"outputs": [
{
"name": "angle",
"type": "FLOAT",
"links": [
2069,
2070,
2080
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "AngleFromKps"
},
"widgets_values": [
"any"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 895,
"type": "Note",
"pos": {
"0": 4735,
"1": -917
},
"size": {
"0": 253.791748046875,
"1": 139.83102416992188
},
"flags": {},
"order": 10,
"mode": 0,
"inputs": [],
"outputs": [],
"properties": {},
"widgets_values": [
"Change Rotation mode here"
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 891,
"type": "Reroute",
"pos": {
"0": 4281,
"1": -1019
},
"size": [
107.2,
26
],
"flags": {},
"order": 50,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2090
}
],
"outputs": [
{
"name": "KPS_DATA",
"type": "KPS_DATA",
"links": [
2091
]
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 887,
"type": "Reroute",
"pos": {
"0": 4286,
"1": -939
},
"size": [
82,
26
],
"flags": {},
"order": 69,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2084
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2086
]
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 879,
"type": "KpsRotate",
"pos": {
"0": 4506,
"1": -565
},
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": false
},
"order": 55,
"mode": 0,
"inputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"link": 2089
},
{
"name": "angle",
"type": "FLOAT",
"link": 2070,
"widget": {
"name": "angle"
}
}
],
"outputs": [
{
"name": "kps_data",
"type": "KPS_DATA",
"links": [
2075
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "KpsRotate"
},
"widgets_values": [
0,
true
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 870,
"type": "Reroute",
"pos": {
"0": 4977,
"1": -418
},
"size": [
107.2,
26
],
"flags": {},
"order": 63,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 2057
}
],
"outputs": [
{
"name": "KPS_DATA",
"type": "KPS_DATA",
"links": [
2058
],
"slot_index": 0
}
],
"properties": {
"showOutputText": true,
"horizontal": false
}
},
{
"id": 890,
"type": "ImageCompositeMasked",
"pos": {
"0": 8235,
"1": -673
},
"size": {
"0": 315,
"1": 146
},
"flags": {
"collapsed": true
},
"order": 91,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 2094
},
{
"name": "source",
"type": "IMAGE",
"link": 2095
},
{
"name": "mask",
"type": "MASK",
"link": 2093,
"shape": 7
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2096
],
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
false
]
},
{
"id": 875,
"type": "Kps3dFromImage",
"pos": {
"0": -150,
"1": -1110
},
"size": {
"0": 282.88043212890625,
"1": 452
},
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 2065,
"shape": 7
},
{
"name": "height",
"type": "INT",
"link": 2063,
"widget": {
"name": "height"
}
},
{
"name": "width",
"type": "INT",
"link": 2064,
"widget": {
"name": "width"
}
}
],
"outputs": [
{
"name": "kps_data_3d",
"type": "KPS_DATA_3D",
"links": [
2066
],
"slot_index": 0
},
{
"name": "kps_data",
"type": "KPS_DATA",
"links": null
}
],
"properties": {
"Node name for S&R": "Kps3dFromImage"
},
"widgets_values": [
1024,
1024,
{
"array": [
[
455.93826177816265,
135.74188019160567,
-175.3184183546636
],
[
532.8012046875956,
134.34553125344215,
-178.85594444475473
],
[
493.5075496028185,
184.87903772930446,
-210.66604318438232
],
[
465.9663057996927,
214.78316229722586,
-190.96613998861835
],
[
527.9787915888902,
214.90571132350746,
-193.018352114209
]
],
"opacities": [
1,
1,
1,
1,
1
],
"width": 1024,
"height": 1024,
"jawline": [
[
411.7260583611601,
147.05255023658785,
-84.7085041342237
],
[
414.9002314289735,
170.77021601327752,
-90.81767394113861
],
[
418.6347254298535,
195.00176479049418,
-98.91880999782092
],
[
423.36647322524465,
217.85928000852707,
-111.2030872806301
],
[
430.41671305978315,
237.24471265614872,
-133.42087883243875
],
[
442.14981016309883,
250.61728822073567,
-152.61183045125603
],
[
455.7550594550032,
259.4275224714234,
-168.43349062170628
],
[
470.8809816149588,
264.5877481328971,
-188.01250272777727
],
[
497.3739673481192,
268.71749703144457,
-200.302485922294
],
[
524.6565915602991,
262.79525684526317,
-189.45694953673942
],
[
544.303419102688,
254.93591913398424,
-169.90656380213005
],
[
560.7262471923838,
242.85405347200208,
-151.81017910191875
],
[
570.7560661175205,
230.1487125795386,
-132.8405256918502
],
[
576.0818741499877,
215.1589093907099,
-116.19439052523256
],
[
580.8063448405924,
192.60714552211815,
-102.36937589587578
],
[
583.4734763545072,
165.28642542434883,
-97.8671312045414
],
[
586.5136603355214,
142.49640494982324,
-94.30836072844276
]
],
"eyebrow_left": [
[
428.53678356630064,
121.16577476246434,
-161.06855634387378
],
[
436.1949117505585,
115.40853606973228,
-171.95529469632896
],
[
445.722465226046,
112.80623694391495,
-179.0134852922498
],
[
457.8667752239997,
113.15820032907256,
-184.03046211413218
],
[
470.67748084873625,
116.16709760015145,
-187.80730975232115
]
],
"eyebrow_right": [
[
514.1927280259512,
113.29741731376708,
-190.61048762766953
],
[
525.8892137085119,
109.171105274021,
-188.51662577540498
],
[
537.5671435806419,
107.22698881193472,
-185.04321001035308
],
[
548.4257779480375,
109.13773708621984,
-179.30524314030254
],
[
557.1900906017803,
114.16516768695715,
-172.32034396171218
]
],
"nose_bridge": [
[
493.7374802972895,
136.39347957650546,
-194.5102695268997
],
[
493.48921968921013,
147.55291169873126,
-199.3650927688463
],
[
493.2143032560593,
156.30713967289168,
-204.43279552902652
],
[
492.8814281524146,
163.8049779260003,
-210.66604318438232
]
],
"nose_lower": [
[
475.4247025764783,
185.33977043456235,
-192.50507822832841
],
[
484.6788563546241,
184.75674687082056,
-197.95465149943493
],
[
493.5075496028185,
184.87903772930446,
-202.13728950005063
],
[
501.76730556771093,
187.08575924770773,
-200.12580536142025
],
[
512.4235363820234,
183.8328772726921,
-194.47887692782862
]
],
"eye_left": [
[
441.19852637199466,
136.88887130855113,
-167.25896832950173
],
[
449.85495715744,
130.83228705484885,
-176.8816364689355
],
[
461.2791403557977,
129.9918863326855,
-178.32930029068427
],
[
472.0685534825423,
136.51178496961865,
-176.74648159317667
],
[
461.46011598170577,
140.22041378430666,
-177.97111667516035
],
[
449.76827731949606,
140.0060538351104,
-174.72299466890766
]
],
"eye_right": [
[
516.8173263952606,
136.28629153416364,
-179.09774480709376
],
[
527.4857233670203,
129.3174713686991,
-181.04383383250638
],
[
539.0480586079088,
129.3110978512031,
-180.19699505089773
],
[
548.598330849559,
134.85976923469062,
-172.09711756222737
],
[
538.0621157900167,
138.36467138633373,
-179.7639750451314
],
[
526.7958021997085,
137.93387001007528,
-180.93600642147902
]
],
"mouth_outer": [
[
465.9663057996927,
214.78316229722586,
-190.96613998861835
],
[
475.4775301620008,
207.3459127990462,
-200.90158950762958
],
[
484.01217028906945,
202.4984574240024,
-205.59297236452548
],
[
494.1824970378867,
204.38229170541928,
-207.63840405579907
],
[
503.36739730440695,
202.37264902928055,
-206.37752917350335
],
[
512.7268190019021,
206.4529910656196,
-202.69794675718143
],
[
527.9787915888902,
214.90571132350746,
-193.018352114209
],
[
514.7900637669557,
220.84242504182558,
-202.2980171062937
],
[
504.80410109638575,
221.705592936613,
-206.94778452442628
],
[
495.2913922692431,
221.49729993065327,
-207.95714321195675
],
[
485.76083759311194,
221.69526622472105,
-206.82339126236639
],
[
474.86422028853826,
219.94082241621436,
-200.86574855639492
]
],
"mouth_inner": [
[
469.31774333132773,
213.72599743825364,
-193.23393432657062
],
[
484.8072625628067,
210.90414273631947,
-201.67408705676309
],
[
494.6904099081013,
210.36629853710528,
-203.3730827757579
],
[
503.2566110483902,
210.28107089302134,
-202.68430268994098
],
[
520.4040838741352,
213.5383901270529,
-195.56475892037878
],
[
503.64654123523843,
211.62799683348885,
-205.9814453151741
],
[
494.71009520264573,
211.90620490605534,
-207.00892289439247
],
[
484.16436020557825,
212.87970726321436,
-205.6796612786808
]
],
"rotateX": 18,
"rotateY": 182,
"rotateZ": 0,
"defaultKpsData": "{\"array\":[[259.0189223240886,206.00637784680464,-161.878141518296],[709.3234785408645,197.8258129982231,-182.60287642703724],[479.1200639261718,493.87833644249673,-368.9635836021195],[317.7686102999715,669.0728194129958,-253.5509305043247],[681.0711828557334,669.7907776748775,-265.5738954793406]],\"height\":1024,\"width\":1024,\"rotateX\":0,\"rotateY\":0,\"rotateZ\":0,\"opacities\":[1,1,1,1,1],\"jawline\":[[0,272.2703805291043,368.9635836021195],[18.59601702137716,411.2212527934467,333.17277343242273],[40.47469613651369,553.1827287081389,285.71195110670936],[68.19582559735079,687.0943752944843,213.7440323555739],[109.49993131776831,800.6646903908388,83.58023187967251],[178.23873943733744,879.0084471759787,-28.850708505627438],[257.94562435102677,930.6235489955409,-121.54252320835153],[346.56143071735266,960.8549327874205,-236.24693113058848],[501.77162345594223,985.0492281741899,-308.24827818855186],[661.6079440970946,950.3535524961192,-244.70927923577125],[776.7096514044409,904.3093152307649,-130.17258002997417],[872.9234318664877,833.5272328741225,-24.15420273262737],[931.683518184544,759.0924965031143,86.98025344441623],[962.8849727708185,671.2741484511048,184.50228714745202],[990.5634690287446,539.1537580997029,265.4966758829751],[1006.1889632823313,379.0942512233561,291.8732524355998],[1024,245.57802523075014,312.7224484103779]],\"eyebrow_left\":[[98.48629087885193,120.61169429464823,-78.39476778799411],[143.351734263276,86.8826863171701,-142.17515007477272],[199.16927880702656,71.63701514406281,-183.5258356416079],[270.31719374740595,73.69900639704827,-212.91799050600852],[345.36921352198056,91.32674870131498,-235.04480006125783]],\"eyebrow_right\":[[600.3049904657246,74.5146145449765,-251.46732724243566],[668.8293091453716,50.340454129869954,-239.20035571528254],[737.2449178841147,38.95077182581002,-218.8512136523637],[800.8606518756158,50.14496529701001,-185.23511040155245],[852.2067202240371,79.59836403355236,-144.31380546869116]],\"nose_bridge\":[[480.4671218895442,209.82379831942703,-274.31435197247015],[479.0126774106356,275.20176771816944,-302.7565237489472],[477.4020687383591,326.48875457696914,-332.4458585061444],[475.4519069289294,370.4151331327517,-368.9635836021195]],\"nose_lower\":[[373.18099762049303,496.5775570099449,-262.5668603509639],[427.39681934800626,493.1618906667494,-294.4933984267684],[479.1200639261718,493.87833644249673,-318.9975466858585],[527.5101671858453,506.80650073630306,-307.21318821482834],[589.9401120480451,487.7493645047273,-274.1304372034271]],\"eye_left\":[[172.66560615392797,212.72607015040668,-114.66153843808252],[223.37964435897322,177.24333450019273,-171.03631595934817],[290.3086682884536,172.31981401147067,-179.51751105972022],[353.5188669351921,210.5168950904759,-170.2445058354395],[291.36892106860694,232.24404200103095,-177.41907834393618],[222.87182713937767,230.98820585763428,-158.38982857546176]],\"eye_right\":[[615.6813026286832,209.19583298253698,-184.0194733036943],[678.1825233999625,168.3687275767284,-195.4207119471242],[745.920916472067,168.33138807528752,-190.4594738354277],[801.8715597956372,200.83849631700764,-143.00602487961916],[740.144731925126,221.372102606823,-187.92260920145966],[674.1405932667781,218.84823590057175,-194.78900084379217]],\"mouth_outer\":[[317.7686102999715,669.0728194129958,-253.5509305043247],[373.4904900957268,625.5014024468599,-311.758149966949],[423.49101296691,597.1023956067004,-339.2427998574267],[483.0742698635661,608.1389123983984,-351.2260413928955],[536.8843671855499,596.365342207373,-343.8391565973692],[591.7169051343292,620.2701855601886,-322.28217914729674],[681.0711828557334,669.7907776748775,-265.5738954793406],[603.8045052589911,704.5712471068532,-319.9391756511496],[545.3013525230012,709.6281499665452,-347.1800198665548],[489.57077593197357,708.4078572473047,-353.0933872012854],[433.7356487369116,709.5676505211727,-346.45125707725856],[369.89739022289973,699.2891728739157,-311.5481743528338]],\"mouth_inner\":[[337.4031381133213,662.8793777537512,-266.83689229927944],[428.14909213906014,646.3474316537943,-316.28385706160196],[486.0498972720599,643.1964503841036,-326.23748990854693],[536.2353215731629,642.6971408990134,-322.2022448459132],[636.6944615534592,661.7802729860227,-280.4921193125181],[538.5197428182757,650.5881591832574,-341.51868382728924],[486.1652243398013,652.2180520537465,-347.5382013973857],[424.3826235430874,657.9213536750901,-339.75067025036293]]}"
},
-1.0407629248871373,
null,
"",
""
],
"color": "#432",
"bgcolor": "#653"
}
],
"links": [
[
1460,
641,
0,
642,
1,
"IMAGE"
],
[
1491,
650,
0,
642,
0,
"INSIGHTFACE_APP"
],
[
1576,
679,
0,
677,
0,
"INT"
],
[
1577,
680,
0,
677,
1,
"INT"
],
[
1800,
252,
0,
775,
0,
"CONDITIONING"
],
[
1801,
287,
0,
775,
1,
"CONDITIONING"
],
[
1802,
636,
0,
775,
3,
"CONTROL_NET"
],
[
1893,
794,
0,
793,
0,
"MODEL"
],
[
1896,
774,
1,
796,
0,
"RESAMPLER"
],
[
1897,
642,
0,
796,
1,
"FACE_EMBED"
],
[
1898,
796,
0,
793,
2,
"FACE_CONDITIONING"
],
[
1900,
797,
0,
775,
2,
"FACE_CONDITIONING"
],
[
1901,
796,
0,
797,
0,
"*"
],
[
1902,
794,
1,
287,
0,
"CLIP"
],
[
1904,
794,
1,
798,
0,
"*"
],
[
1905,
798,
0,
252,
0,
"CLIP"
],
[
1908,
248,
0,
800,
0,
"IMAGE"
],
[
1911,
793,
0,
801,
0,
"*"
],
[
1913,
774,
0,
793,
1,
"INSTANTID_ADAPTER"
],
[
1918,
802,
1,
805,
0,
"*"
],
[
1922,
794,
1,
811,
0,
"*"
],
[
1925,
812,
0,
809,
0,
"CLIP"
],
[
1927,
809,
0,
807,
0,
"CONDITIONING"
],
[
1928,
810,
0,
807,
1,
"CONDITIONING"
],
[
1929,
796,
0,
813,
0,
"*"
],
[
1930,
813,
0,
814,
0,
"*"
],
[
1931,
814,
0,
807,
2,
"FACE_CONDITIONING"
],
[
1932,
811,
0,
812,
0,
"*"
],
[
1943,
802,
0,
803,
0,
"*"
],
[
1947,
803,
0,
821,
0,
"IMAGE"
],
[
1948,
794,
2,
822,
0,
"*"
],
[
1950,
823,
0,
821,
1,
"VAE"
],
[
1951,
821,
0,
806,
0,
"LATENT"
],
[
1953,
825,
0,
824,
0,
"MODEL"
],
[
1954,
806,
0,
824,
3,
"LATENT"
],
[
1955,
807,
0,
824,
1,
"CONDITIONING"
],
[
1956,
807,
1,
824,
2,
"CONDITIONING"
],
[
1957,
824,
0,
827,
0,
"LATENT"
],
[
1958,
827,
0,
828,
0,
"IMAGE"
],
[
1959,
823,
0,
829,
0,
"*"
],
[
1960,
829,
0,
827,
1,
"VAE"
],
[
1961,
805,
0,
806,
1,
"MASK"
],
[
1962,
827,
0,
830,
0,
"IMAGE"
],
[
1963,
802,
5,
830,
1,
"INT"
],
[
1964,
802,
6,
830,
2,
"INT"
],
[
1966,
802,
3,
832,
0,
"*"
],
[
1967,
802,
4,
833,
0,
"*"
],
[
1968,
832,
0,
831,
3,
"INT"
],
[
1969,
833,
0,
831,
4,
"INT"
],
[
1974,
636,
0,
836,
0,
"*"
],
[
1976,
837,
0,
807,
3,
"CONTROL_NET"
],
[
1982,
830,
0,
831,
1,
"IMAGE"
],
[
1983,
838,
0,
831,
0,
"IMAGE"
],
[
1984,
812,
0,
810,
0,
"CLIP"
],
[
1989,
802,
3,
841,
1,
"INT"
],
[
1990,
802,
4,
841,
2,
"INT"
],
[
1991,
802,
5,
841,
3,
"INT"
],
[
1992,
802,
6,
841,
4,
"INT"
],
[
1996,
802,
7,
842,
1,
"INT"
],
[
1997,
802,
8,
842,
2,
"INT"
],
[
1998,
841,
0,
842,
0,
"KPS_DATA"
],
[
1999,
842,
0,
843,
0,
"KPS_DATA"
],
[
2000,
843,
0,
807,
4,
"IMAGE"
],
[
2003,
844,
0,
802,
1,
"MASK"
],
[
2005,
845,
0,
775,
4,
"IMAGE"
],
[
2006,
849,
0,
847,
1,
"FLOAT"
],
[
2007,
849,
0,
848,
1,
"FLOAT"
],
[
2009,
850,
0,
848,
0,
"KPS_DATA"
],
[
2010,
252,
0,
851,
0,
"*"
],
[
2011,
287,
0,
852,
0,
"*"
],
[
2012,
851,
0,
853,
0,
"CONDITIONING"
],
[
2013,
852,
0,
853,
1,
"CONDITIONING"
],
[
2016,
796,
0,
855,
0,
"*"
],
[
2017,
855,
0,
853,
2,
"FACE_CONDITIONING"
],
[
2018,
857,
0,
248,
0,
"LATENT"
],
[
2019,
801,
0,
857,
0,
"MODEL"
],
[
2020,
775,
0,
857,
1,
"CONDITIONING"
],
[
2021,
775,
1,
857,
2,
"CONDITIONING"
],
[
2022,
677,
0,
857,
3,
"LATENT"
],
[
2023,
801,
0,
858,
0,
"*"
],
[
2024,
858,
0,
856,
0,
"MODEL"
],
[
2025,
853,
0,
856,
1,
"CONDITIONING"
],
[
2026,
853,
1,
856,
2,
"CONDITIONING"
],
[
2027,
856,
0,
859,
0,
"LATENT"
],
[
2029,
822,
0,
860,
0,
"*"
],
[
2030,
860,
0,
861,
0,
"*"
],
[
2031,
861,
0,
862,
0,
"*"
],
[
2032,
862,
0,
823,
0,
"*"
],
[
2033,
861,
0,
859,
1,
"VAE"
],
[
2034,
860,
0,
248,
1,
"VAE"
],
[
2035,
859,
0,
863,
0,
"IMAGE"
],
[
2036,
848,
0,
864,
0,
"KPS_DATA"
],
[
2037,
864,
0,
853,
4,
"IMAGE"
],
[
2038,
847,
0,
856,
3,
"LATENT"
],
[
2043,
857,
0,
865,
0,
"*"
],
[
2044,
865,
0,
847,
0,
"LATENT"
],
[
2045,
836,
0,
866,
0,
"*"
],
[
2046,
866,
0,
853,
3,
"CONTROL_NET"
],
[
2047,
866,
0,
837,
0,
"*"
],
[
2048,
858,
0,
825,
0,
"*"
],
[
2053,
868,
0,
838,
0,
"*"
],
[
2054,
868,
0,
802,
0,
"IMAGE"
],
[
2055,
859,
0,
869,
0,
"*"
],
[
2057,
835,
0,
870,
0,
"*"
],
[
2058,
870,
0,
841,
0,
"KPS_DATA"
],
[
2060,
873,
0,
845,
0,
"KPS_DATA"
],
[
2061,
873,
0,
850,
0,
"*"
],
[
2062,
845,
0,
874,
0,
"IMAGE"
],
[
2063,
679,
0,
875,
1,
"INT"
],
[
2064,
680,
0,
875,
2,
"INT"
],
[
2065,
641,
0,
875,
0,
"IMAGE"
],
[
2066,
875,
0,
876,
0,
"KPS_DATA_3D"
],
[
2067,
876,
0,
873,
0,
"KPS_DATA"
],
[
2069,
878,
0,
880,
1,
"FLOAT"
],
[
2070,
878,
0,
879,
1,
"FLOAT"
],
[
2075,
879,
0,
835,
0,
"*"
],
[
2076,
835,
0,
844,
0,
"KPS_DATA"
],
[
2077,
869,
0,
880,
0,
"IMAGE"
],
[
2078,
880,
0,
868,
0,
"*"
],
[
2079,
848,
0,
878,
0,
"KPS_DATA"
],
[
2080,
878,
0,
885,
0,
"*"
],
[
2081,
885,
0,
884,
1,
"FLOAT"
],
[
2082,
831,
0,
884,
0,
"IMAGE"
],
[
2084,
869,
0,
887,
0,
"*"
],
[
2086,
887,
0,
889,
0,
"*"
],
[
2087,
889,
0,
886,
0,
"IMAGE"
],
[
2088,
884,
0,
886,
1,
"IMAGE"
],
[
2089,
848,
0,
879,
0,
"KPS_DATA"
],
[
2090,
848,
0,
891,
0,
"*"
],
[
2091,
891,
0,
892,
0,
"*"
],
[
2092,
892,
0,
893,
0,
"KPS_DATA"
],
[
2093,
893,
0,
890,
2,
"MASK"
],
[
2094,
889,
0,
890,
0,
"IMAGE"
],
[
2095,
886,
0,
890,
1,
"IMAGE"
],
[
2096,
890,
0,
894,
0,
"IMAGE"
]
],
"groups": [
{
"title": "Enhance face",
"bounding": [
4430,
-1188,
4193,
2310
],
"color": "#88A",
"font_size": 24,
"flags": {}
},
{
"title": "Latent upscale",
"bounding": [
2071,
-847,
2044,
1475
],
"color": "#3f789e",
"font_size": 24,
"flags": {}
}
],
"config": {},
"extra": {
"ds": {
"scale": 1.5863092971716108,
"offset": [
374.4669341811946,
1105.5680870320302
]
},
"groupNodes": {}
},
"version": 0.4
}
================================================
FILE: workflows/simple.json
================================================
{
"last_node_id": 651,
"last_link_id": 1489,
"nodes": [
{
"id": 369,
"type": "PreviewImage",
"pos": [
670,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 28,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1052
}
],
"title": "InstantId Control Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 268,
"type": "PreviewImage",
"pos": [
910,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 26,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 926
}
],
"title": "Image for inpaint",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 412,
"type": "Reroute",
"pos": [
1201,
144
],
"size": [
75,
26
],
"flags": {},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1437,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
840
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 413,
"type": "Reroute",
"pos": [
1201,
164
],
"size": [
75,
26
],
"flags": {},
"order": 24,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1438,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
841
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 395,
"type": "PreviewImage",
"pos": [
1440,
430
],
"size": {
"0": 612.2093505859375,
"1": 842.1597900390625
},
"flags": {},
"order": 39,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1418
}
],
"title": "Output Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 258,
"type": "PreviewImage",
"pos": [
2100,
430
],
"size": {
"0": 612.114013671875,
"1": 845.9668579101562
},
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1281
}
],
"title": "Input Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 630,
"type": "SetLatentNoiseMask",
"pos": [
894,
510
],
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 34,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1419
},
{
"name": "mask",
"type": "MASK",
"link": 1421
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1420
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "SetLatentNoiseMask"
}
},
{
"id": 354,
"type": "VAEEncode",
"pos": [
751,
510
],
"size": {
"0": 309.7555847167969,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 25,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 923
},
{
"name": "vae",
"type": "VAE",
"link": 1024
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1419
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEEncode"
}
},
{
"id": 569,
"type": "Reroute",
"pos": [
206,
313
],
"size": [
75,
26
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1415
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1314
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 248,
"type": "VAEDecode",
"pos": [
1438,
323
],
"size": {
"0": 140,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 36,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1340
},
{
"name": "vae",
"type": "VAE",
"link": 768
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
797
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
}
},
{
"id": 394,
"type": "ImageScale",
"pos": [
1603,
186
],
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 37,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 797
},
{
"name": "width",
"type": "INT",
"link": 840,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 841,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
781
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"bilinear",
512,
512,
"disabled"
]
},
{
"id": 396,
"type": "ImageCompositeMasked",
"pos": [
1840,
149
],
"size": {
"0": 327.45550537109375,
"1": 140.86239624023438
},
"flags": {
"collapsed": true
},
"order": 38,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 1032
},
{
"name": "source",
"type": "IMAGE",
"link": 781
},
{
"name": "mask",
"type": "MASK",
"link": null
},
{
"name": "x",
"type": "INT",
"link": 836,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 838,
"widget": {
"name": "y"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1418
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
false
]
},
{
"id": 326,
"type": "PreviewImage",
"pos": [
1390,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 33,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 590
}
],
"title": "Blurred Mask",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 269,
"type": "LoadInsightface",
"pos": [
-457,
80
],
"size": {
"0": 279.5220031738281,
"1": 41.10993957519531
},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"links": [
947,
1431
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInsightface"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 389,
"type": "Reroute",
"pos": [
1708,
311
],
"size": [
75,
26
],
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1314
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1032
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 392,
"type": "Reroute",
"pos": [
756,
293
],
"size": [
75,
26
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1027
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
768
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 262,
"type": "MaskToImage",
"pos": [
890,
20
],
"size": {
"0": 210,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 27,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 828,
"slot_index": 0
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
408,
558
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "MaskToImage"
}
},
{
"id": 323,
"type": "ImageToMask",
"pos": [
1440,
20
],
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": true
},
"order": 32,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 563
}
],
"outputs": [
{
"name": "MASK",
"type": "MASK",
"links": [
1421
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageToMask"
},
"widgets_values": [
"red"
]
},
{
"id": 264,
"type": "PreviewImage",
"pos": [
1150,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 30,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 408
}
],
"title": "Mask",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 407,
"type": "Reroute",
"pos": [
802,
43
],
"size": [
75,
26
],
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1432
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
923,
926
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 408,
"type": "Reroute",
"pos": [
802,
62
],
"size": [
75,
26
],
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1433
}
],
"outputs": [
{
"name": "",
"type": "MASK",
"links": [
828
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 579,
"type": "Reroute",
"pos": [
1967,
51
],
"size": [
75,
26
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1260
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1281
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 410,
"type": "Reroute",
"pos": [
1118,
104
],
"size": [
75,
26
],
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1435,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
836
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 411,
"type": "Reroute",
"pos": [
1118,
124
],
"size": [
75,
26
],
"flags": {},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1436,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
838
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 632,
"type": "PreprocessImage",
"pos": [
335,
43
],
"size": {
"0": 325.7662353515625,
"1": 290
},
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1439
},
{
"name": "mask",
"type": "MASK",
"link": 1440
},
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 1431
}
],
"outputs": [
{
"name": "resized_image",
"type": "IMAGE",
"links": [
1432
],
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": [
1433
],
"shape": 3
},
{
"name": "control_image",
"type": "IMAGE",
"links": [
1434
],
"slot_index": 2,
"shape": 3
},
{
"name": "x",
"type": "INT",
"links": [
1435
],
"shape": 3
},
{
"name": "y",
"type": "INT",
"links": [
1436
],
"shape": 3
},
{
"name": "original_width",
"type": "INT",
"links": [
1437
],
"shape": 3
},
{
"name": "original_height",
"type": "INT",
"links": [
1438
],
"shape": 3
},
{
"name": "new_width",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "new_height",
"type": "INT",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "PreprocessImage"
},
"widgets_values": [
1024,
1024,
"auto",
150
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 438,
"type": "FaceEmbed",
"pos": [
-70,
-43
],
"size": {
"0": 292.20001220703125,
"1": 66
},
"flags": {
"collapsed": true
},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 947
},
{
"name": "face_image",
"type": "IMAGE",
"link": 1235
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": null
}
],
"outputs": [
{
"name": "face embeds",
"type": "FACE_EMBED",
"links": [
1464
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbed"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 636,
"type": "ControlNetLoader",
"pos": [
-148,
964
],
"size": {
"0": 308.55364990234375,
"1": 58
},
"flags": {},
"order": 1,
"mode": 0,
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
1473
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetLoader"
},
"widgets_values": [
"ControlNetModel\\diffusion_pytorch_model.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 481,
"type": "Reroute",
"pos": [
802,
82
],
"size": [
75,
26
],
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1434
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1052,
1474
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 474,
"type": "Reroute",
"pos": [
496,
480
],
"size": [
75,
26
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1026
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1024,
1027
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 644,
"type": "FaceEmbedCombine",
"pos": [
190,
445
],
"size": {
"0": 245.1999969482422,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "resampler",
"type": "RESAMPLER",
"link": 1468
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": 1464
}
],
"outputs": [
{
"name": "face conditioning",
"type": "FACE_CONDITIONING",
"links": [
1470
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbedCombine"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 646,
"type": "LoadInstantIdAdapter",
"pos": [
-151,
803
],
"size": {
"0": 303.55364990234375,
"1": 78
},
"flags": {},
"order": 2,
"mode": 0,
"outputs": [
{
"name": "InstantId_adapter",
"type": "INSTANTID_ADAPTER",
"links": [],
"slot_index": 0,
"shape": 3
},
{
"name": "resampler",
"type": "RESAMPLER",
"links": [
1468
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInstantIdAdapter"
},
"widgets_values": [
"ip-adapter.bin"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 359,
"type": "KSampler",
"pos": [
1097,
420
],
"size": {
"0": 316.94384765625,
"1": 486.80694580078125
},
"flags": {},
"order": 35,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1489
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1475
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1476
},
{
"name": "latent_image",
"type": "LATENT",
"link": 1420
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1340
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
421094154862615,
"randomize",
30,
3,
"euler",
"karras",
0.7000000000000001
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 252,
"type": "CLIPTextEncode",
"pos": [
330,
785
],
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1324
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1471
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 287,
"type": "CLIPTextEncode",
"pos": [
328,
930
],
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1488
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1472
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 319,
"type": "ImageBlur",
"pos": [
1100,
-10
],
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": false
},
"order": 31,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 558
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
563,
590
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageBlur"
},
"widgets_values": [
1,
0.1
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 648,
"type": "ControlNetInstantIdApply",
"pos": [
729,
610
],
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 29,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1471
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1472
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1470
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1473
},
{
"name": "image",
"type": "IMAGE",
"link": 1474
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
1475
],
"slot_index": 0,
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
1476
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
0.8
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 471,
"type": "Reroute",
"pos": [
229,
784
],
"size": [
75,
26
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1487
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1324,
1488
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 241,
"type": "CheckpointLoaderSimple",
"pos": [
-155,
614
],
"size": {
"0": 311.5732421875,
"1": 98
},
"flags": {},
"order": 3,
"mode": 0,
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
1489
],
"slot_index": 0,
"shape": 3
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
1487
],
"slot_index": 1,
"shape": 3
},
{
"name": "VAE",
"type": "VAE",
"links": [
1026
],
"slot_index": 2,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"custom_3.9.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 562,
"type": "LoadImage",
"pos": [
-120,
-400
],
"size": [
270,
314
],
"flags": {},
"order": 4,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1235
],
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"title": "Load face Referecnce",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"han3.jpg",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 253,
"type": "LoadImage",
"pos": [
-134,
42
],
"size": {
"0": 290.3117370605469,
"1": 314
},
"flags": {},
"order": 5,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1260,
1415,
1439
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": [
1440
],
"slot_index": 1,
"shape": 3
}
],
"title": "Load Pose Image",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"z19900074AMP,Luke-Skywalker-i-Yoda---Gwiezdne-wojny--Imperium-k.jpg",
"image"
],
"color": "#223",
"bgcolor": "#335"
}
],
"links": [
[
408,
262,
0,
264,
0,
"IMAGE"
],
[
558,
262,
0,
319,
0,
"IMAGE"
],
[
563,
319,
0,
323,
0,
"IMAGE"
],
[
590,
319,
0,
326,
0,
"IMAGE"
],
[
768,
392,
0,
248,
1,
"VAE"
],
[
781,
394,
0,
396,
1,
"IMAGE"
],
[
797,
248,
0,
394,
0,
"IMAGE"
],
[
828,
408,
0,
262,
0,
"MASK"
],
[
836,
410,
0,
396,
3,
"INT"
],
[
838,
411,
0,
396,
4,
"INT"
],
[
840,
412,
0,
394,
1,
"INT"
],
[
841,
413,
0,
394,
2,
"INT"
],
[
923,
407,
0,
354,
0,
"IMAGE"
],
[
926,
407,
0,
268,
0,
"IMAGE"
],
[
947,
269,
0,
438,
0,
"INSIGHTFACE_APP"
],
[
1024,
474,
0,
354,
1,
"VAE"
],
[
1026,
241,
2,
474,
0,
"*"
],
[
1027,
474,
0,
392,
0,
"*"
],
[
1032,
389,
0,
396,
0,
"IMAGE"
],
[
1052,
481,
0,
369,
0,
"IMAGE"
],
[
1235,
562,
0,
438,
1,
"IMAGE"
],
[
1260,
253,
0,
579,
0,
"*"
],
[
1281,
579,
0,
258,
0,
"IMAGE"
],
[
1314,
569,
0,
389,
0,
"*"
],
[
1324,
471,
0,
252,
0,
"CLIP"
],
[
1340,
359,
0,
248,
0,
"LATENT"
],
[
1415,
253,
0,
569,
0,
"*"
],
[
1418,
396,
0,
395,
0,
"IMAGE"
],
[
1419,
354,
0,
630,
0,
"LATENT"
],
[
1420,
630,
0,
359,
3,
"LATENT"
],
[
1421,
323,
0,
630,
1,
"MASK"
],
[
1431,
269,
0,
632,
2,
"INSIGHTFACE_APP"
],
[
1432,
632,
0,
407,
0,
"*"
],
[
1433,
632,
1,
408,
0,
"*"
],
[
1434,
632,
2,
481,
0,
"*"
],
[
1435,
632,
3,
410,
0,
"*"
],
[
1436,
632,
4,
411,
0,
"*"
],
[
1437,
632,
5,
412,
0,
"*"
],
[
1438,
632,
6,
413,
0,
"*"
],
[
1439,
253,
0,
632,
0,
"IMAGE"
],
[
1440,
253,
1,
632,
1,
"MASK"
],
[
1464,
438,
0,
644,
1,
"FACE_EMBED"
],
[
1468,
646,
1,
644,
0,
"RESAMPLER"
],
[
1470,
644,
0,
648,
2,
"FACE_CONDITIONING"
],
[
1471,
252,
0,
648,
0,
"CONDITIONING"
],
[
1472,
287,
0,
648,
1,
"CONDITIONING"
],
[
1473,
636,
0,
648,
3,
"CONTROL_NET"
],
[
1474,
481,
0,
648,
4,
"IMAGE"
],
[
1475,
648,
0,
359,
1,
"CONDITIONING"
],
[
1476,
648,
1,
359,
2,
"CONDITIONING"
],
[
1487,
241,
1,
471,
0,
"*"
],
[
1488,
471,
0,
287,
0,
"CLIP"
],
[
1489,
241,
0,
359,
0,
"MODEL"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 1.228459735736783,
"offset": [
-136.4629761089401,
-318.2211074138637
]
},
"groupNodes": {}
},
"version": 0.4
}
================================================
FILE: workflows/simple_two_embeds.json
================================================
{
"last_node_id": 653,
"last_link_id": 1492,
"nodes": [
{
"id": 369,
"type": "PreviewImage",
"pos": [
670,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 30,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1052
}
],
"title": "InstantId Control Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 268,
"type": "PreviewImage",
"pos": [
910,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 28,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 926
}
],
"title": "Image for inpaint",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 412,
"type": "Reroute",
"pos": [
1201,
144
],
"size": [
75,
26
],
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1437,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
840
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 413,
"type": "Reroute",
"pos": [
1201,
164
],
"size": [
75,
26
],
"flags": {},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1438,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
841
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 395,
"type": "PreviewImage",
"pos": [
1440,
430
],
"size": {
"0": 612.2093505859375,
"1": 842.1597900390625
},
"flags": {},
"order": 41,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1418
}
],
"title": "Output Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 258,
"type": "PreviewImage",
"pos": [
2100,
430
],
"size": {
"0": 612.114013671875,
"1": 845.9668579101562
},
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1281
}
],
"title": "Input Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 630,
"type": "SetLatentNoiseMask",
"pos": [
894,
510
],
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 36,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1419
},
{
"name": "mask",
"type": "MASK",
"link": 1421
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1420
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "SetLatentNoiseMask"
}
},
{
"id": 354,
"type": "VAEEncode",
"pos": [
751,
510
],
"size": {
"0": 309.7555847167969,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 27,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 923
},
{
"name": "vae",
"type": "VAE",
"link": 1024
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1419
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEEncode"
}
},
{
"id": 569,
"type": "Reroute",
"pos": [
206,
313
],
"size": [
75,
26
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1415
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1314
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 248,
"type": "VAEDecode",
"pos": [
1438,
323
],
"size": {
"0": 140,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 38,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1340
},
{
"name": "vae",
"type": "VAE",
"link": 768
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
797
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
}
},
{
"id": 394,
"type": "ImageScale",
"pos": [
1603,
186
],
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 39,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 797
},
{
"name": "width",
"type": "INT",
"link": 840,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 841,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
781
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"bilinear",
512,
512,
"disabled"
]
},
{
"id": 396,
"type": "ImageCompositeMasked",
"pos": [
1840,
149
],
"size": {
"0": 327.45550537109375,
"1": 140.86239624023438
},
"flags": {
"collapsed": true
},
"order": 40,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 1032
},
{
"name": "source",
"type": "IMAGE",
"link": 781
},
{
"name": "mask",
"type": "MASK",
"link": null
},
{
"name": "x",
"type": "INT",
"link": 836,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 838,
"widget": {
"name": "y"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1418
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
false
]
},
{
"id": 326,
"type": "PreviewImage",
"pos": [
1390,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 35,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 590
}
],
"title": "Blurred Mask",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 389,
"type": "Reroute",
"pos": [
1708,
311
],
"size": [
75,
26
],
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1314
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1032
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 392,
"type": "Reroute",
"pos": [
756,
293
],
"size": [
75,
26
],
"flags": {},
"order": 25,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1027
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
768
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 262,
"type": "MaskToImage",
"pos": [
890,
20
],
"size": {
"0": 210,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 29,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 828,
"slot_index": 0
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
408,
558
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "MaskToImage"
}
},
{
"id": 323,
"type": "ImageToMask",
"pos": [
1440,
20
],
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": true
},
"order": 34,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 563
}
],
"outputs": [
{
"name": "MASK",
"type": "MASK",
"links": [
1421
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageToMask"
},
"widgets_values": [
"red"
]
},
{
"id": 264,
"type": "PreviewImage",
"pos": [
1150,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 32,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 408
}
],
"title": "Mask",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 407,
"type": "Reroute",
"pos": [
802,
43
],
"size": [
75,
26
],
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1432
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
923,
926
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 408,
"type": "Reroute",
"pos": [
802,
62
],
"size": [
75,
26
],
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1433
}
],
"outputs": [
{
"name": "",
"type": "MASK",
"links": [
828
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 579,
"type": "Reroute",
"pos": [
1967,
51
],
"size": [
75,
26
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1260
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1281
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 410,
"type": "Reroute",
"pos": [
1118,
104
],
"size": [
75,
26
],
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1435,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
836
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 411,
"type": "Reroute",
"pos": [
1118,
124
],
"size": [
75,
26
],
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1436,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
838
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 632,
"type": "PreprocessImage",
"pos": [
335,
43
],
"size": {
"0": 325.7662353515625,
"1": 290
},
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1439
},
{
"name": "mask",
"type": "MASK",
"link": 1440
},
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 1431
}
],
"outputs": [
{
"name": "resized_image",
"type": "IMAGE",
"links": [
1432
],
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": [
1433
],
"shape": 3
},
{
"name": "control_image",
"type": "IMAGE",
"links": [
1434
],
"slot_index": 2,
"shape": 3
},
{
"name": "x",
"type": "INT",
"links": [
1435
],
"shape": 3
},
{
"name": "y",
"type": "INT",
"links": [
1436
],
"shape": 3
},
{
"name": "original_width",
"type": "INT",
"links": [
1437
],
"shape": 3
},
{
"name": "original_height",
"type": "INT",
"links": [
1438
],
"shape": 3
},
{
"name": "new_width",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "new_height",
"type": "INT",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "PreprocessImage"
},
"widgets_values": [
1024,
1024,
"auto",
150
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 636,
"type": "ControlNetLoader",
"pos": [
-148,
964
],
"size": {
"0": 308.55364990234375,
"1": 58
},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
1473
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetLoader"
},
"widgets_values": [
"ControlNetModel\\diffusion_pytorch_model.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 481,
"type": "Reroute",
"pos": [
802,
82
],
"size": [
75,
26
],
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1434
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1052,
1474
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 646,
"type": "LoadInstantIdAdapter",
"pos": [
-151,
803
],
"size": {
"0": 303.55364990234375,
"1": 78
},
"flags": {},
"order": 1,
"mode": 0,
"outputs": [
{
"name": "InstantId_adapter",
"type": "INSTANTID_ADAPTER",
"links": [],
"slot_index": 0,
"shape": 3
},
{
"name": "resampler",
"type": "RESAMPLER",
"links": [
1468
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInstantIdAdapter"
},
"widgets_values": [
"ip-adapter.bin"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 474,
"type": "Reroute",
"pos": [
496,
484
],
"size": [
75,
26
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1026
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1024,
1027
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 438,
"type": "FaceEmbed",
"pos": [
-400,
-40
],
"size": {
"0": 292.20001220703125,
"1": 66
},
"flags": {
"collapsed": true
},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 947
},
{
"name": "face_image",
"type": "IMAGE",
"link": 1235
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": null
}
],
"outputs": [
{
"name": "face embeds",
"type": "FACE_EMBED",
"links": [
1489
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbed"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 644,
"type": "FaceEmbedCombine",
"pos": [
410,
680
],
"size": {
"0": 245.1999969482422,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 26,
"mode": 0,
"inputs": [
{
"name": "resampler",
"type": "RESAMPLER",
"link": 1468
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": 1490
}
],
"outputs": [
{
"name": "face conditioning",
"type": "FACE_CONDITIONING",
"links": [
1470
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbedCombine"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 269,
"type": "LoadInsightface",
"pos": [
-457,
80
],
"size": {
"0": 279.5220031738281,
"1": 41.10993957519531
},
"flags": {
"collapsed": true
},
"order": 2,
"mode": 0,
"outputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"links": [
947,
1431,
1491
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInsightface"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 652,
"type": "FaceEmbed",
"pos": [
-110,
-40
],
"size": {
"0": 292.20001220703125,
"1": 66
},
"flags": {
"collapsed": true
},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 1491
},
{
"name": "face_image",
"type": "IMAGE",
"link": 1488
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": 1489
}
],
"outputs": [
{
"name": "face embeds",
"type": "FACE_EMBED",
"links": [
1490
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbed"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 653,
"type": "LoadImage",
"pos": [
-130,
-410
],
"size": {
"0": 238.0138702392578,
"1": 314
},
"flags": {},
"order": 3,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1488
],
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"title": "Load face Referecnce",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"han3.jpg",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 562,
"type": "LoadImage",
"pos": [
-440,
-410
],
"size": {
"0": 265.1659851074219,
"1": 314
},
"flags": {},
"order": 4,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1235
],
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"title": "Load face Referecnce",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"harrison-ford-jako-indiana-jones-7e66c.jpg",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 253,
"type": "LoadImage",
"pos": [
-134,
42
],
"size": {
"0": 290.3117370605469,
"1": 314
},
"flags": {},
"order": 5,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1260,
1415,
1439
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": [
1440
],
"slot_index": 1,
"shape": 3
}
],
"title": "Load Pose Image",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"clipspace/clipspace-mask-52383064.099999964.png [input]",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 252,
"type": "CLIPTextEncode",
"pos": [
330,
785
],
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1324
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1471
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 287,
"type": "CLIPTextEncode",
"pos": [
328,
930
],
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {},
"order": 24,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1492
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1472
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 648,
"type": "ControlNetInstantIdApply",
"pos": [
729,
610
],
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 31,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1471
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1472
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1470
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1473
},
{
"name": "image",
"type": "IMAGE",
"link": 1474
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
1475
],
"slot_index": 0,
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
1476
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
0.7000000000000001
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 359,
"type": "KSampler",
"pos": [
1097,
420
],
"size": {
"0": 316.94384765625,
"1": 486.80694580078125
},
"flags": {},
"order": 37,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1487
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1475
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1476
},
{
"name": "latent_image",
"type": "LATENT",
"link": 1420
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1340
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
782404709542421,
"randomize",
30,
3,
"euler",
"karras",
0.7000000000000001
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 241,
"type": "CheckpointLoaderSimple",
"pos": [
-155,
614
],
"size": {
"0": 311.5732421875,
"1": 98
},
"flags": {},
"order": 6,
"mode": 0,
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
1487
],
"slot_index": 0,
"shape": 3
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
1015
],
"slot_index": 1,
"shape": 3
},
{
"name": "VAE",
"type": "VAE",
"links": [
1026
],
"slot_index": 2,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"custom_3.9.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 471,
"type": "Reroute",
"pos": [
229,
784
],
"size": [
75,
26
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1015
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1324,
1492
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 319,
"type": "ImageBlur",
"pos": [
1100,
-10
],
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": false
},
"order": 33,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 558
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
563,
590
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageBlur"
},
"widgets_values": [
1,
0.1
],
"color": "#323",
"bgcolor": "#535"
}
],
"links": [
[
408,
262,
0,
264,
0,
"IMAGE"
],
[
558,
262,
0,
319,
0,
"IMAGE"
],
[
563,
319,
0,
323,
0,
"IMAGE"
],
[
590,
319,
0,
326,
0,
"IMAGE"
],
[
768,
392,
0,
248,
1,
"VAE"
],
[
781,
394,
0,
396,
1,
"IMAGE"
],
[
797,
248,
0,
394,
0,
"IMAGE"
],
[
828,
408,
0,
262,
0,
"MASK"
],
[
836,
410,
0,
396,
3,
"INT"
],
[
838,
411,
0,
396,
4,
"INT"
],
[
840,
412,
0,
394,
1,
"INT"
],
[
841,
413,
0,
394,
2,
"INT"
],
[
923,
407,
0,
354,
0,
"IMAGE"
],
[
926,
407,
0,
268,
0,
"IMAGE"
],
[
947,
269,
0,
438,
0,
"INSIGHTFACE_APP"
],
[
1015,
241,
1,
471,
0,
"*"
],
[
1024,
474,
0,
354,
1,
"VAE"
],
[
1026,
241,
2,
474,
0,
"*"
],
[
1027,
474,
0,
392,
0,
"*"
],
[
1032,
389,
0,
396,
0,
"IMAGE"
],
[
1052,
481,
0,
369,
0,
"IMAGE"
],
[
1235,
562,
0,
438,
1,
"IMAGE"
],
[
1260,
253,
0,
579,
0,
"*"
],
[
1281,
579,
0,
258,
0,
"IMAGE"
],
[
1314,
569,
0,
389,
0,
"*"
],
[
1324,
471,
0,
252,
0,
"CLIP"
],
[
1340,
359,
0,
248,
0,
"LATENT"
],
[
1415,
253,
0,
569,
0,
"*"
],
[
1418,
396,
0,
395,
0,
"IMAGE"
],
[
1419,
354,
0,
630,
0,
"LATENT"
],
[
1420,
630,
0,
359,
3,
"LATENT"
],
[
1421,
323,
0,
630,
1,
"MASK"
],
[
1431,
269,
0,
632,
2,
"INSIGHTFACE_APP"
],
[
1432,
632,
0,
407,
0,
"*"
],
[
1433,
632,
1,
408,
0,
"*"
],
[
1434,
632,
2,
481,
0,
"*"
],
[
1435,
632,
3,
410,
0,
"*"
],
[
1436,
632,
4,
411,
0,
"*"
],
[
1437,
632,
5,
412,
0,
"*"
],
[
1438,
632,
6,
413,
0,
"*"
],
[
1439,
253,
0,
632,
0,
"IMAGE"
],
[
1440,
253,
1,
632,
1,
"MASK"
],
[
1468,
646,
1,
644,
0,
"RESAMPLER"
],
[
1470,
644,
0,
648,
2,
"FACE_CONDITIONING"
],
[
1471,
252,
0,
648,
0,
"CONDITIONING"
],
[
1472,
287,
0,
648,
1,
"CONDITIONING"
],
[
1473,
636,
0,
648,
3,
"CONTROL_NET"
],
[
1474,
481,
0,
648,
4,
"IMAGE"
],
[
1475,
648,
0,
359,
1,
"CONDITIONING"
],
[
1476,
648,
1,
359,
2,
"CONDITIONING"
],
[
1487,
241,
0,
359,
0,
"MODEL"
],
[
1488,
653,
0,
652,
1,
"IMAGE"
],
[
1489,
438,
0,
652,
2,
"FACE_EMBED"
],
[
1490,
652,
0,
644,
1,
"FACE_EMBED"
],
[
1491,
269,
0,
652,
0,
"INSIGHTFACE_APP"
],
[
1492,
471,
0,
287,
0,
"CLIP"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.6934334949441707,
"offset": [
315.9759796687978,
359.160125843015
]
},
"groupNodes": {}
},
"version": 0.4
}
================================================
FILE: workflows/simple_with_adapter.json
================================================
{
"last_node_id": 651,
"last_link_id": 1488,
"nodes": [
{
"id": 369,
"type": "PreviewImage",
"pos": [
670,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 29,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1052
}
],
"title": "InstantId Control Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 268,
"type": "PreviewImage",
"pos": [
910,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 27,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 926
}
],
"title": "Image for inpaint",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 412,
"type": "Reroute",
"pos": [
1201,
144
],
"size": [
75,
26
],
"flags": {},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1437,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
840
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 413,
"type": "Reroute",
"pos": [
1201,
164
],
"size": [
75,
26
],
"flags": {},
"order": 24,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1438,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
841
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 395,
"type": "PreviewImage",
"pos": [
1440,
430
],
"size": {
"0": 612.2093505859375,
"1": 842.1597900390625
},
"flags": {},
"order": 40,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1418
}
],
"title": "Output Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 258,
"type": "PreviewImage",
"pos": [
2100,
430
],
"size": {
"0": 612.114013671875,
"1": 845.9668579101562
},
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1281
}
],
"title": "Input Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 630,
"type": "SetLatentNoiseMask",
"pos": [
894,
510
],
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 35,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1419
},
{
"name": "mask",
"type": "MASK",
"link": 1421
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1420
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "SetLatentNoiseMask"
}
},
{
"id": 354,
"type": "VAEEncode",
"pos": [
751,
510
],
"size": {
"0": 309.7555847167969,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 26,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 923
},
{
"name": "vae",
"type": "VAE",
"link": 1024
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1419
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEEncode"
}
},
{
"id": 569,
"type": "Reroute",
"pos": [
206,
313
],
"size": [
75,
26
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1415
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1314
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 248,
"type": "VAEDecode",
"pos": [
1438,
323
],
"size": {
"0": 140,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 37,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1340
},
{
"name": "vae",
"type": "VAE",
"link": 768
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
797
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
}
},
{
"id": 394,
"type": "ImageScale",
"pos": [
1603,
186
],
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 38,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 797
},
{
"name": "width",
"type": "INT",
"link": 840,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 841,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
781
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"bilinear",
512,
512,
"disabled"
]
},
{
"id": 396,
"type": "ImageCompositeMasked",
"pos": [
1840,
149
],
"size": {
"0": 327.45550537109375,
"1": 140.86239624023438
},
"flags": {
"collapsed": true
},
"order": 39,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 1032
},
{
"name": "source",
"type": "IMAGE",
"link": 781
},
{
"name": "mask",
"type": "MASK",
"link": null
},
{
"name": "x",
"type": "INT",
"link": 836,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 838,
"widget": {
"name": "y"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1418
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
false
]
},
{
"id": 326,
"type": "PreviewImage",
"pos": [
1390,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 34,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 590
}
],
"title": "Blurred Mask",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 269,
"type": "LoadInsightface",
"pos": [
-457,
80
],
"size": {
"0": 279.5220031738281,
"1": 41.10993957519531
},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"links": [
947,
1431
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInsightface"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 389,
"type": "Reroute",
"pos": [
1708,
311
],
"size": [
75,
26
],
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1314
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1032
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 392,
"type": "Reroute",
"pos": [
756,
293
],
"size": [
75,
26
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1027
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
768
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 262,
"type": "MaskToImage",
"pos": [
890,
20
],
"size": {
"0": 210,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 28,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 828,
"slot_index": 0
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
408,
558
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "MaskToImage"
}
},
{
"id": 323,
"type": "ImageToMask",
"pos": [
1440,
20
],
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": true
},
"order": 33,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 563
}
],
"outputs": [
{
"name": "MASK",
"type": "MASK",
"links": [
1421
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageToMask"
},
"widgets_values": [
"red"
]
},
{
"id": 264,
"type": "PreviewImage",
"pos": [
1150,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 31,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 408
}
],
"title": "Mask",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 407,
"type": "Reroute",
"pos": [
802,
43
],
"size": [
75,
26
],
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1432
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
923,
926
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 408,
"type": "Reroute",
"pos": [
802,
62
],
"size": [
75,
26
],
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1433
}
],
"outputs": [
{
"name": "",
"type": "MASK",
"links": [
828
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 579,
"type": "Reroute",
"pos": [
1967,
51
],
"size": [
75,
26
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1260
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1281
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 410,
"type": "Reroute",
"pos": [
1118,
104
],
"size": [
75,
26
],
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1435,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
836
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 411,
"type": "Reroute",
"pos": [
1118,
124
],
"size": [
75,
26
],
"flags": {},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1436,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
838
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 632,
"type": "PreprocessImage",
"pos": [
335,
43
],
"size": {
"0": 325.7662353515625,
"1": 290
},
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1439
},
{
"name": "mask",
"type": "MASK",
"link": 1440
},
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 1431
}
],
"outputs": [
{
"name": "resized_image",
"type": "IMAGE",
"links": [
1432
],
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": [
1433
],
"shape": 3
},
{
"name": "control_image",
"type": "IMAGE",
"links": [
1434
],
"slot_index": 2,
"shape": 3
},
{
"name": "x",
"type": "INT",
"links": [
1435
],
"shape": 3
},
{
"name": "y",
"type": "INT",
"links": [
1436
],
"shape": 3
},
{
"name": "original_width",
"type": "INT",
"links": [
1437
],
"shape": 3
},
{
"name": "original_height",
"type": "INT",
"links": [
1438
],
"shape": 3
},
{
"name": "new_width",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "new_height",
"type": "INT",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "PreprocessImage"
},
"widgets_values": [
1024,
1024,
"auto",
150
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 438,
"type": "FaceEmbed",
"pos": [
-70,
-43
],
"size": {
"0": 292.20001220703125,
"1": 66
},
"flags": {
"collapsed": true
},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 947
},
{
"name": "face_image",
"type": "IMAGE",
"link": 1235
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": null
}
],
"outputs": [
{
"name": "face embeds",
"type": "FACE_EMBED",
"links": [
1464
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbed"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 636,
"type": "ControlNetLoader",
"pos": [
-148,
964
],
"size": {
"0": 308.55364990234375,
"1": 58
},
"flags": {},
"order": 1,
"mode": 0,
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": [
1473
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetLoader"
},
"widgets_values": [
"ControlNetModel\\diffusion_pytorch_model.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 481,
"type": "Reroute",
"pos": [
802,
82
],
"size": [
75,
26
],
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1434
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1052,
1474
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 474,
"type": "Reroute",
"pos": [
496,
480
],
"size": [
75,
26
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1026
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1024,
1027
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 644,
"type": "FaceEmbedCombine",
"pos": [
190,
445
],
"size": {
"0": 245.1999969482422,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "resampler",
"type": "RESAMPLER",
"link": 1468
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": 1464
}
],
"outputs": [
{
"name": "face conditioning",
"type": "FACE_CONDITIONING",
"links": [
1470,
1485
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbedCombine"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 646,
"type": "LoadInstantIdAdapter",
"pos": [
-151,
803
],
"size": {
"0": 303.55364990234375,
"1": 78
},
"flags": {},
"order": 2,
"mode": 0,
"outputs": [
{
"name": "InstantId_adapter",
"type": "INSTANTID_ADAPTER",
"links": [
1486
],
"slot_index": 0,
"shape": 3
},
{
"name": "resampler",
"type": "RESAMPLER",
"links": [
1468
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInstantIdAdapter"
},
"widgets_values": [
"ip-adapter.bin"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 359,
"type": "KSampler",
"pos": [
1097,
420
],
"size": {
"0": 316.94384765625,
"1": 486.80694580078125
},
"flags": {},
"order": 36,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1483
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1475
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1476
},
{
"name": "latent_image",
"type": "LATENT",
"link": 1420
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1340
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
421094154862615,
"randomize",
30,
3,
"euler",
"karras",
0.7000000000000001
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 252,
"type": "CLIPTextEncode",
"pos": [
330,
785
],
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1324
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1471
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 287,
"type": "CLIPTextEncode",
"pos": [
328,
930
],
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1488
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1472
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 319,
"type": "ImageBlur",
"pos": [
1100,
-10
],
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": false
},
"order": 32,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 558
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
563,
590
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageBlur"
},
"widgets_values": [
1,
0.1
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 651,
"type": "InstantIdAdapterApply",
"pos": [
332,
613
],
"size": {
"0": 315,
"1": 98
},
"flags": {},
"order": 25,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1484
},
{
"name": "instantId_adapter",
"type": "INSTANTID_ADAPTER",
"link": 1486
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1485
}
],
"outputs": [
{
"name": "model",
"type": "MODEL",
"links": [
1483
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "InstantIdAdapterApply"
},
"widgets_values": [
0.6000000000000001
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 648,
"type": "ControlNetInstantIdApply",
"pos": [
729,
610
],
"size": {
"0": 330,
"1": 138
},
"flags": {},
"order": 30,
"mode": 0,
"inputs": [
{
"name": "positive",
"type": "CONDITIONING",
"link": 1471
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1472
},
{
"name": "face_conditioning",
"type": "FACE_CONDITIONING",
"link": 1470
},
{
"name": "control_net",
"type": "CONTROL_NET",
"link": 1473
},
{
"name": "image",
"type": "IMAGE",
"link": 1474
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
1475
],
"slot_index": 0,
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
1476
],
"slot_index": 1,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ControlNetInstantIdApply"
},
"widgets_values": [
0.8
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 471,
"type": "Reroute",
"pos": [
229,
784
],
"size": [
75,
26
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1487
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1324,
1488
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 241,
"type": "CheckpointLoaderSimple",
"pos": [
-155,
614
],
"size": {
"0": 311.5732421875,
"1": 98
},
"flags": {},
"order": 3,
"mode": 0,
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
1484
],
"slot_index": 0,
"shape": 3
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
1487
],
"slot_index": 1,
"shape": 3
},
{
"name": "VAE",
"type": "VAE",
"links": [
1026
],
"slot_index": 2,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"custom_3.9.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 562,
"type": "LoadImage",
"pos": [
-120,
-400
],
"size": [
270,
314
],
"flags": {},
"order": 4,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1235
],
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"title": "Load face Referecnce",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"han3.jpg",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 253,
"type": "LoadImage",
"pos": [
-134,
42
],
"size": {
"0": 290.3117370605469,
"1": 314
},
"flags": {},
"order": 5,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1260,
1415,
1439
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": [
1440
],
"slot_index": 1,
"shape": 3
}
],
"title": "Load Pose Image",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"z19900074AMP,Luke-Skywalker-i-Yoda---Gwiezdne-wojny--Imperium-k.jpg",
"image"
],
"color": "#223",
"bgcolor": "#335"
}
],
"links": [
[
408,
262,
0,
264,
0,
"IMAGE"
],
[
558,
262,
0,
319,
0,
"IMAGE"
],
[
563,
319,
0,
323,
0,
"IMAGE"
],
[
590,
319,
0,
326,
0,
"IMAGE"
],
[
768,
392,
0,
248,
1,
"VAE"
],
[
781,
394,
0,
396,
1,
"IMAGE"
],
[
797,
248,
0,
394,
0,
"IMAGE"
],
[
828,
408,
0,
262,
0,
"MASK"
],
[
836,
410,
0,
396,
3,
"INT"
],
[
838,
411,
0,
396,
4,
"INT"
],
[
840,
412,
0,
394,
1,
"INT"
],
[
841,
413,
0,
394,
2,
"INT"
],
[
923,
407,
0,
354,
0,
"IMAGE"
],
[
926,
407,
0,
268,
0,
"IMAGE"
],
[
947,
269,
0,
438,
0,
"INSIGHTFACE_APP"
],
[
1024,
474,
0,
354,
1,
"VAE"
],
[
1026,
241,
2,
474,
0,
"*"
],
[
1027,
474,
0,
392,
0,
"*"
],
[
1032,
389,
0,
396,
0,
"IMAGE"
],
[
1052,
481,
0,
369,
0,
"IMAGE"
],
[
1235,
562,
0,
438,
1,
"IMAGE"
],
[
1260,
253,
0,
579,
0,
"*"
],
[
1281,
579,
0,
258,
0,
"IMAGE"
],
[
1314,
569,
0,
389,
0,
"*"
],
[
1324,
471,
0,
252,
0,
"CLIP"
],
[
1340,
359,
0,
248,
0,
"LATENT"
],
[
1415,
253,
0,
569,
0,
"*"
],
[
1418,
396,
0,
395,
0,
"IMAGE"
],
[
1419,
354,
0,
630,
0,
"LATENT"
],
[
1420,
630,
0,
359,
3,
"LATENT"
],
[
1421,
323,
0,
630,
1,
"MASK"
],
[
1431,
269,
0,
632,
2,
"INSIGHTFACE_APP"
],
[
1432,
632,
0,
407,
0,
"*"
],
[
1433,
632,
1,
408,
0,
"*"
],
[
1434,
632,
2,
481,
0,
"*"
],
[
1435,
632,
3,
410,
0,
"*"
],
[
1436,
632,
4,
411,
0,
"*"
],
[
1437,
632,
5,
412,
0,
"*"
],
[
1438,
632,
6,
413,
0,
"*"
],
[
1439,
253,
0,
632,
0,
"IMAGE"
],
[
1440,
253,
1,
632,
1,
"MASK"
],
[
1464,
438,
0,
644,
1,
"FACE_EMBED"
],
[
1468,
646,
1,
644,
0,
"RESAMPLER"
],
[
1470,
644,
0,
648,
2,
"FACE_CONDITIONING"
],
[
1471,
252,
0,
648,
0,
"CONDITIONING"
],
[
1472,
287,
0,
648,
1,
"CONDITIONING"
],
[
1473,
636,
0,
648,
3,
"CONTROL_NET"
],
[
1474,
481,
0,
648,
4,
"IMAGE"
],
[
1475,
648,
0,
359,
1,
"CONDITIONING"
],
[
1476,
648,
1,
359,
2,
"CONDITIONING"
],
[
1483,
651,
0,
359,
0,
"MODEL"
],
[
1484,
241,
0,
651,
0,
"MODEL"
],
[
1485,
644,
0,
651,
2,
"FACE_CONDITIONING"
],
[
1486,
646,
0,
651,
1,
"INSTANTID_ADAPTER"
],
[
1487,
241,
1,
471,
0,
"*"
],
[
1488,
471,
0,
287,
0,
"CLIP"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 1.1167815779425292,
"offset": [
-309.17294941711623,
-292.55354556608387
]
},
"groupNodes": {}
},
"version": 0.4
}
================================================
FILE: workflows/very_simple.json
================================================
{
"last_node_id": 634,
"last_link_id": 1450,
"nodes": [
{
"id": 369,
"type": "PreviewImage",
"pos": [
670,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 26,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1052
}
],
"title": "InstantId Control Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 268,
"type": "PreviewImage",
"pos": [
910,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 24,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 926
}
],
"title": "Image for inpaint",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 412,
"type": "Reroute",
"pos": [
1201,
144
],
"size": [
75,
26
],
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1437,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
840
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 413,
"type": "Reroute",
"pos": [
1201,
164
],
"size": [
75,
26
],
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1438,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
841
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 395,
"type": "PreviewImage",
"pos": [
1440,
430
],
"size": {
"0": 612.2093505859375,
"1": 842.1597900390625
},
"flags": {},
"order": 37,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1418
}
],
"title": "Output Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 258,
"type": "PreviewImage",
"pos": [
2100,
430
],
"size": {
"0": 612.114013671875,
"1": 845.9668579101562
},
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1281
}
],
"title": "Input Image",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 630,
"type": "SetLatentNoiseMask",
"pos": [
894,
510
],
"size": {
"0": 210,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 32,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1419
},
{
"name": "mask",
"type": "MASK",
"link": 1421
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1420
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "SetLatentNoiseMask"
}
},
{
"id": 354,
"type": "VAEEncode",
"pos": [
751,
510
],
"size": {
"0": 309.7555847167969,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 923
},
{
"name": "vae",
"type": "VAE",
"link": 1024
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1419
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEEncode"
}
},
{
"id": 569,
"type": "Reroute",
"pos": [
206,
313
],
"size": [
75,
26
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1415
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1314
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 474,
"type": "Reroute",
"pos": [
416,
478
],
"size": [
75,
26
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1026
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
1024,
1027
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 248,
"type": "VAEDecode",
"pos": [
1438,
323
],
"size": {
"0": 140,
"1": 46
},
"flags": {
"collapsed": true
},
"order": 34,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 1340
},
{
"name": "vae",
"type": "VAE",
"link": 768
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
797
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "VAEDecode"
}
},
{
"id": 394,
"type": "ImageScale",
"pos": [
1603,
186
],
"size": {
"0": 315,
"1": 130
},
"flags": {
"collapsed": true
},
"order": 35,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 797
},
{
"name": "width",
"type": "INT",
"link": 840,
"widget": {
"name": "width"
}
},
{
"name": "height",
"type": "INT",
"link": 841,
"widget": {
"name": "height"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
781
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"bilinear",
512,
512,
"disabled"
]
},
{
"id": 396,
"type": "ImageCompositeMasked",
"pos": [
1840,
149
],
"size": {
"0": 327.45550537109375,
"1": 140.86239624023438
},
"flags": {
"collapsed": true
},
"order": 36,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 1032
},
{
"name": "source",
"type": "IMAGE",
"link": 781
},
{
"name": "mask",
"type": "MASK",
"link": null
},
{
"name": "x",
"type": "INT",
"link": 836,
"widget": {
"name": "x"
}
},
{
"name": "y",
"type": "INT",
"link": 838,
"widget": {
"name": "y"
}
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1418
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
false
]
},
{
"id": 326,
"type": "PreviewImage",
"pos": [
1390,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 31,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 590
}
],
"title": "Blurred Mask",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 269,
"type": "LoadInsightface",
"pos": [
-457,
80
],
"size": {
"0": 279.5220031738281,
"1": 41.10993957519531
},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"links": [
947,
1431
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "LoadInsightface"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 389,
"type": "Reroute",
"pos": [
1708,
311
],
"size": [
75,
26
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1314
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1032
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 392,
"type": "Reroute",
"pos": [
756,
293
],
"size": [
75,
26
],
"flags": {},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1027
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
768
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 253,
"type": "LoadImage",
"pos": [
-134,
42
],
"size": {
"0": 290.3117370605469,
"1": 314
},
"flags": {},
"order": 1,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1260,
1415,
1439
],
"slot_index": 0,
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": [
1440
],
"slot_index": 1,
"shape": 3
}
],
"title": "Load Pose Image",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"clipspace/clipspace-mask-529397.5.png [input]",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 262,
"type": "MaskToImage",
"pos": [
890,
20
],
"size": {
"0": 210,
"1": 26
},
"flags": {
"collapsed": true
},
"order": 25,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 828,
"slot_index": 0
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
408,
558
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "MaskToImage"
}
},
{
"id": 323,
"type": "ImageToMask",
"pos": [
1440,
20
],
"size": {
"0": 315,
"1": 58
},
"flags": {
"collapsed": true
},
"order": 30,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 563
}
],
"outputs": [
{
"name": "MASK",
"type": "MASK",
"links": [
1421
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageToMask"
},
"widgets_values": [
"red"
]
},
{
"id": 264,
"type": "PreviewImage",
"pos": [
1150,
-340
],
"size": {
"0": 210,
"1": 246
},
"flags": {},
"order": 28,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 408
}
],
"title": "Mask",
"properties": {
"Node name for S&R": "PreviewImage"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 407,
"type": "Reroute",
"pos": [
802,
43
],
"size": [
75,
26
],
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1432
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
923,
926
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 408,
"type": "Reroute",
"pos": [
802,
62
],
"size": [
75,
26
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1433
}
],
"outputs": [
{
"name": "",
"type": "MASK",
"links": [
828
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 579,
"type": "Reroute",
"pos": [
1967,
51
],
"size": [
75,
26
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1260
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1281
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 410,
"type": "Reroute",
"pos": [
1118,
104
],
"size": [
75,
26
],
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1435,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
836
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 411,
"type": "Reroute",
"pos": [
1118,
124
],
"size": [
75,
26
],
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1436,
"widget": {
"name": "value"
}
}
],
"outputs": [
{
"name": "",
"type": "INT",
"links": [
838
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 632,
"type": "PreprocessImage",
"pos": [
335,
43
],
"size": {
"0": 325.7662353515625,
"1": 290
},
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 1439
},
{
"name": "mask",
"type": "MASK",
"link": 1440
},
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 1431
}
],
"outputs": [
{
"name": "resized_image",
"type": "IMAGE",
"links": [
1432
],
"shape": 3
},
{
"name": "mask",
"type": "MASK",
"links": [
1433
],
"shape": 3
},
{
"name": "control_image",
"type": "IMAGE",
"links": [
1434
],
"shape": 3
},
{
"name": "x",
"type": "INT",
"links": [
1435
],
"shape": 3
},
{
"name": "y",
"type": "INT",
"links": [
1436
],
"shape": 3
},
{
"name": "original_width",
"type": "INT",
"links": [
1437
],
"shape": 3
},
{
"name": "original_height",
"type": "INT",
"links": [
1438
],
"shape": 3
},
{
"name": "new_width",
"type": "INT",
"links": null,
"shape": 3
},
{
"name": "new_height",
"type": "INT",
"links": null,
"shape": 3
}
],
"properties": {
"Node name for S&R": "PreprocessImage"
},
"widgets_values": [
1024,
1024,
"auto",
150
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 481,
"type": "Reroute",
"pos": [
802,
82
],
"size": [
75,
26
],
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1434
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
1052,
1443
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 473,
"type": "Reroute",
"pos": [
231,
721
],
"size": [
75,
26
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1315
}
],
"outputs": [
{
"name": "",
"type": "MODEL",
"links": [
1441
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 252,
"type": "CLIPTextEncode",
"pos": [
330,
785
],
"size": {
"0": 321.2493896484375,
"1": 112.86385345458984
},
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1324
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1444
],
"slot_index": 0,
"shape": 3
}
],
"title": "Positive Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 287,
"type": "CLIPTextEncode",
"pos": [
330,
930
],
"size": {
"0": 323.7601013183594,
"1": 111.55984497070312
},
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 1450
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
1445
],
"slot_index": 0,
"shape": 3
}
],
"title": "Negative Prompt",
"properties": {
"Node name for S&R": "CLIPTextEncode"
},
"widgets_values": [
""
],
"color": "#322",
"bgcolor": "#533"
},
{
"id": 438,
"type": "FaceEmbed",
"pos": [
-87,
-24
],
"size": {
"0": 292.20001220703125,
"1": 66
},
"flags": {
"collapsed": true
},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "insightface",
"type": "INSIGHTFACE_APP",
"link": 947
},
{
"name": "face_image",
"type": "IMAGE",
"link": 1235
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": null
}
],
"outputs": [
{
"name": "face embeds",
"type": "FACE_EMBED",
"links": [
1442
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "FaceEmbed"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 562,
"type": "LoadImage",
"pos": [
-126,
-385
],
"size": [
265.1659851074219,
314
],
"flags": {},
"order": 2,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1235
],
"shape": 3
},
{
"name": "MASK",
"type": "MASK",
"links": null,
"shape": 3
}
],
"title": "Load face Referecnce",
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"han3.jpg",
"image"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 319,
"type": "ImageBlur",
"pos": [
1100,
-10
],
"size": {
"0": 315,
"1": 82
},
"flags": {
"collapsed": false
},
"order": 29,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 558
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
563,
590
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "ImageBlur"
},
"widgets_values": [
1,
0.1
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 241,
"type": "CheckpointLoaderSimple",
"pos": [
-149,
437
],
"size": {
"0": 295.705078125,
"1": 310
},
"flags": {},
"order": 3,
"mode": 0,
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
1315
],
"slot_index": 0,
"shape": 3
},
{
"name": "CLIP",
"type": "CLIP",
"links": [
1449
],
"slot_index": 1,
"shape": 3
},
{
"name": "VAE",
"type": "VAE",
"links": [
1026
],
"slot_index": 2,
"shape": 3
}
],
"properties": {
"Node name for S&R": "CheckpointLoaderSimple"
},
"widgets_values": [
"custom_3.9.safetensors"
],
"color": "#223",
"bgcolor": "#335"
},
{
"id": 471,
"type": "Reroute",
"pos": [
229,
784
],
"size": [
75,
26
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 1449
}
],
"outputs": [
{
"name": "",
"type": "CLIP",
"links": [
1324,
1450
],
"slot_index": 0
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 634,
"type": "InstantIdAndControlnetApply",
"pos": [
712,
727
],
"size": {
"0": 315,
"1": 210
},
"flags": {},
"order": 27,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1441
},
{
"name": "face_embeds",
"type": "FACE_EMBED",
"link": 1442
},
{
"name": "control_image",
"type": "IMAGE",
"link": 1443
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1444
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1445
}
],
"outputs": [
{
"name": "model",
"type": "MODEL",
"links": [
1446
],
"slot_index": 0,
"shape": 3
},
{
"name": "positive",
"type": "CONDITIONING",
"links": [
1447
],
"slot_index": 1,
"shape": 3
},
{
"name": "negative",
"type": "CONDITIONING",
"links": [
1448
],
"slot_index": 2,
"shape": 3
}
],
"properties": {
"Node name for S&R": "InstantIdAndControlnetApply"
},
"widgets_values": [
"ip-adapter.bin",
"ControlNetModel\\diffusion_pytorch_model.safetensors",
0.5,
0.7
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 359,
"type": "KSampler",
"pos": [
1097,
420
],
"size": {
"0": 316.94384765625,
"1": 486.80694580078125
},
"flags": {},
"order": 33,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1446
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 1447
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 1448
},
{
"name": "latent_image",
"type": "LATENT",
"link": 1420
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
1340
],
"slot_index": 0,
"shape": 3
}
],
"properties": {
"Node name for S&R": "KSampler"
},
"widgets_values": [
930143501615199,
"randomize",
30,
3,
"dpm_adaptive",
"karras",
0.7000000000000001
],
"color": "#323",
"bgcolor": "#535"
}
],
"links": [
[
408,
262,
0,
264,
0,
"IMAGE"
],
[
558,
262,
0,
319,
0,
"IMAGE"
],
[
563,
319,
0,
323,
0,
"IMAGE"
],
[
590,
319,
0,
326,
0,
"IMAGE"
],
[
768,
392,
0,
248,
1,
"VAE"
],
[
781,
394,
0,
396,
1,
"IMAGE"
],
[
797,
248,
0,
394,
0,
"IMAGE"
],
[
828,
408,
0,
262,
0,
"MASK"
],
[
836,
410,
0,
396,
3,
"INT"
],
[
838,
411,
0,
396,
4,
"INT"
],
[
840,
412,
0,
394,
1,
"INT"
],
[
841,
413,
0,
394,
2,
"INT"
],
[
923,
407,
0,
354,
0,
"IMAGE"
],
[
926,
407,
0,
268,
0,
"IMAGE"
],
[
947,
269,
0,
438,
0,
"INSIGHTFACE_APP"
],
[
1024,
474,
0,
354,
1,
"VAE"
],
[
1026,
241,
2,
474,
0,
"*"
],
[
1027,
474,
0,
392,
0,
"*"
],
[
1032,
389,
0,
396,
0,
"IMAGE"
],
[
1052,
481,
0,
369,
0,
"IMAGE"
],
[
1235,
562,
0,
438,
1,
"IMAGE"
],
[
1260,
253,
0,
579,
0,
"*"
],
[
1281,
579,
0,
258,
0,
"IMAGE"
],
[
1314,
569,
0,
389,
0,
"*"
],
[
1315,
241,
0,
473,
0,
"*"
],
[
1324,
471,
0,
252,
0,
"CLIP"
],
[
1340,
359,
0,
248,
0,
"LATENT"
],
[
1415,
253,
0,
569,
0,
"*"
],
[
1418,
396,
0,
395,
0,
"IMAGE"
],
[
1419,
354,
0,
630,
0,
"LATENT"
],
[
1420,
630,
0,
359,
3,
"LATENT"
],
[
1421,
323,
0,
630,
1,
"MASK"
],
[
1431,
269,
0,
632,
2,
"INSIGHTFACE_APP"
],
[
1432,
632,
0,
407,
0,
"*"
],
[
1433,
632,
1,
408,
0,
"*"
],
[
1434,
632,
2,
481,
0,
"*"
],
[
1435,
632,
3,
410,
0,
"*"
],
[
1436,
632,
4,
411,
0,
"*"
],
[
1437,
632,
5,
412,
0,
"*"
],
[
1438,
632,
6,
413,
0,
"*"
],
[
1439,
253,
0,
632,
0,
"IMAGE"
],
[
1440,
253,
1,
632,
1,
"MASK"
],
[
1441,
473,
0,
634,
0,
"MODEL"
],
[
1442,
438,
0,
634,
1,
"FACE_EMBED"
],
[
1443,
481,
0,
634,
2,
"IMAGE"
],
[
1444,
252,
0,
634,
3,
"CONDITIONING"
],
[
1445,
287,
0,
634,
4,
"CONDITIONING"
],
[
1446,
634,
0,
359,
0,
"MODEL"
],
[
1447,
634,
1,
359,
1,
"CONDITIONING"
],
[
1448,
634,
2,
359,
2,
"CONDITIONING"
],
[
1449,
241,
1,
471,
0,
"*"
],
[
1450,
471,
0,
287,
0,
"CLIP"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.839054528882501,
"offset": [
218.60363014413264,
35.417663081193595
]
},
"groupNodes": {}
},
"version": 0.4
}