diff --git a/.DS_Store b/.DS_Store index abb38bb..1a38b14 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.gitignore b/.gitignore index 083d732..16058d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ __pycache__ .idea +.DS_Store \ No newline at end of file diff --git a/README.md b/README.md index 85ed69c..9d72ee4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,122 @@ -# ComfyUI-FaceChain -continue coding.... -Expected to be released on January 20 -预计1月20日左右发布,不会鸽 +# [ComfyUI-FaceChain](https://github.com/THtianhao/ComfyUI-FaceChain) + +This project is adapted from [facechain](https://github.com/modelscope/facechain) and involves the breakdown and improvement of the processes of [facechain](https://github.com/modelscope/facechain). + +![workflow_inpaiting_inference.png](workflows%2Fworkflow_inpaiting_inference.png) + +English | [简体中文](./README_zh-CN.md) + +## Contact + +If you have any questions or suggestions, you can reach us through the following channels: + +- Email: tototianhao@gmail.com +- Telegram: https://t.me/+JoFE2vqHU4phZjg1 +- WeChat Group: + +### Steps +1. Install ComfyUI first. + +2. After a successful installation of ComfyUI, navigate to the `custom_nodes` directory at `ComfyUI/custom_nodes/`. + +``` +cd custom_nodes +``` + +3. Clone this project into the `custom_nodes` directory. + +``` +git clone https://github.com/THtianhao/ComfyUI-Portrait-Maker.git +``` + +4. Restart ComfyUI. + +## ComfyUI Workflow + +Facechain Workflow Location: [workflow_inpaiting_inference.png](workflows%2Fworkflow_inpaiting_inference.png) +Drag the workflow directly into ComfyUI. + +## Node Introduction +### FC StyleLoraLoad + > The workflow can load the checkpoints and style Lora used by facechain, download them first, and then merge them, providing relevant prompts. + > Workflow: [./workflow/workflow_inference.json](./workflows/workflow_inference.json) +### FC FaceDetectCrop + > Detects faces and crops them. + + ![workflow_face_detect_crop.png](workflows%2Fworkflow_face_detect_crop.png) + Parameter Description: + + 1. mode: Cropping mode, normal mode crops according to the face, square 512 width height will scale the face to 512. + 2. face_index: Index of the face, if there are multiple faces, retrieve them based on the index. + 3. crop_ratio: Only effective in normal mode, crops the face proportionally, 1.0 is 1x the face. + +### FC FaceFusion + > Fusion using model scope model. + + ![workflow_face_fusion.png](workflows%2Fworkflow_face_fusion.png) + + +### FC FaceSegment + > Segmentation using model scope model to obtain masks for the face and body. + +![workflow_face_segment.png](workflows%2Fworkflow_face_segment.png) + +Parameter Description: +1. ksize: Expansion parameter for segmenting the edges of the face. +2. ksize1: Expansion parameter for segmenting the edges of the face. +3. include_neck: Whether the segmented image includes the neck. + +### FC FaceSegAndReplace + > Performs face fusion and replaces the original image, similar to facefusion but mainly used for multiple people. + +![workflow_face_seg_and_replace.png](workflows%2Fworkflow_face_seg_and_replace.png) + + +### FC RemoveCannyFace + > Removes the Canny-detected parts of the face. + +![workflow_remove_canny_face.png](workflows%2Fworkflow_remove_canny_face.png) +### FC ReplaceByMask + > Replaces the image based on the mask. + +![workflow_replace_by_mask.png](workflows%2Fworkflow_replace_by_mask.png) + +* FC MaskOP + > Operations on the mask. + +Parameter Description: +1. mode: Provides three operations, blur, erosion, dilation. +2. kernel: The kernel used for the operation, the larger the kernel, the stronger the operation. + +![workflow_mask_op.png](workflows%2Fworkflow_mask_op.png) + +* FC FCCropToOrigin + > Currently, it can only be used in conjunction with `FC FaceDetectCrop` in `square 512 width height` mode. Pastes the cropped image onto the target image based on the mask. + +![workflow_face_detect_crop.png](workflows%2Fworkflow_face_detect_crop.png) + +Parameter Description: +1. origin_image: Original image. +2. origin_box: Bounding box of the original image. +3. origin_mask: Mask cropped from the original image. +4. paste_image: Pasting image, must be consistent with the origin_mask, hence the need for `FC FaceDetectCrop` in `square 512 width height` mode. + + + + +## Contribution + +If you find any issues or have suggestions for improvement, feel free to contribute. Follow these steps: + +1. Branch out a new feature branch: `git checkout -b feature/your-feature-name` +2. Make your changes and commit: `git commit -m "Add new feature"` +3. Push to your remote branch: `git push origin feature/your-feature-name` +4. Create a Pull Request (PR). + +## License + +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. + + + +Join us and contribute to the development of EasyPhoto ComfyUI Plugin! \ No newline at end of file diff --git a/README_zh-CN.md b/README_zh-CN.md new file mode 100644 index 0000000..967526e --- /dev/null +++ b/README_zh-CN.md @@ -0,0 +1,122 @@ +# [ComfyUI-FaceChain](https://github.com/THtianhao/ComfyUI-FaceChain) + +项目改编于[facechain](https://github.com/modelscope/facechain),对于[facechain](https://github.com/modelscope/facechain)进行了流程上的拆解和改进。 + +![workflow_inpaiting_inference.png](workflows%2Fworkflow_inpaiting_inference.png) + +English | [简体中文](./README_zh-CN.md) + +## 联系 + +如果你有任何疑问或建议,可以通过以下方式联系我们: + +- 电子邮件:tototianhao@gmail.com +- telegram: https://t.me/+JoFE2vqHU4phZjg1 +- 微信群: + +### 步骤 +1. 首先安装ComfyUI + +2. ComfyUI运行成功后进入`custom_nodes` 目录 `ComfyUI/custom_nodes/` + +``` +cd custom_nodes +``` + +3. 克隆此项目到custom_nodes目录中 + +``` +git clone https://github.com/THtianhao/ComfyUI-Portrait-Maker.git +``` + +4. 重新启动ComfyUI + +## ComfyUI 工作流 + +Facechain工作位置: [workflow_inpaiting_inference.png](workflows%2Fworkflow_inpaiting_inference.png) +将工作流直接拖进comfyui中 + +## 节点介绍 +### FC StyleLoraLoad + > workflow可以加载facechain 用到的checkpoint和风格lora,首先下载然后进行融合,并且给出相关的prompt + > workflow : [./workflow/workflow_inference.json](./workflows/workflow_inference.json) +### FC FaceDetectCrop + > 识别人脸并且剪裁 + + ![workflow_face_detect_crop.png](workflows%2Fworkflow_face_detect_crop.png) + 参数介绍: + + 1. mode:剪裁模式,normal模式为按照人脸剪裁,square 512 width height会将人脸缩放到512 + 2. face_index:人脸的索引,如果有多个人脸的话按照多个人脸的话按照index进行获取 + 3. crop_ratio:只在normal模式下生效,将人脸按照比例剪裁1.0为1倍人脸 + +### FC FaceFusion + > 使用model scope模型进行融合 + + ![workflow_face_fusion.png](workflows%2Fworkflow_face_fusion.png) + + +### FC FaceSegment + > 使用model scope模型进行分割并且获取脸部和身体的mask + +![workflow_face_segment.png](workflows%2Fworkflow_face_segment.png) + +参数介绍: +1. ksize: 分割人脸边缘的扩展参数 +2. ksize1: 分割人脸边缘的扩展参数 +3. include_neck: 分割的图像是否包含脖子 + +### FC FaceSegAndReplace + > 进行人脸融合并且分割人脸替换原图,差异和facefusion不大,主要用在多人 + +![workflow_face_seg_and_replace.png](workflows%2Fworkflow_face_seg_and_replace.png) + + +### FC RemoveCannyFace + > 删除掉canny的人脸部分 + +![workflow_remove_canny_face.png](workflows%2Fworkflow_remove_canny_face.png) +### FC ReplaceByMask + > 根据mask替换图像 + +![workflow_replace_by_mask.png](workflows%2Fworkflow_replace_by_mask.png) + +* FC MaskOP + > 对mask的操作 + +参数介绍: +1. mode: 提供了三种操作,模糊处理,腐蚀,膨胀 +2. kernel: 用于操作的核,越大操作力度越强 + +![workflow_mask_op.png](workflows%2Fworkflow_mask_op.png) + +* FC FCCropToOrigin + > 目前只能配合 `FC FaceDetectCrop` 的`square 512 width height`模式一起使用,将截取的图像根据mask粘贴到目标图像上 + +![workflow_face_detect_crop.png](workflows%2Fworkflow_face_detect_crop.png) + +参数介绍: +1. origin_image: 原始图像 +2. origin_box:原始图像的bbox +3. origin_mask:原始图像截取的mask +4. paste_image:粘贴图像 必须和origin_mask保持一致,因此需要`FC FaceDetectCrop` 的`square 512 width height`模式 + + + + +## 贡献 + +如果你发现任何问题或有改进建议,欢迎贡献。请遵循以下步骤: + +1. 分支出一个新的特性分支:`git checkout -b feature/your-feature-name` +2. 进行修改并提交:`git commit -m "Add new feature"` +3. 推送到你的远程分支:`git push origin feature/your-feature-name` +4. 创建一个 Pull 请求(PR)。 + +## 许可证 + +该项目采用 MIT 许可证。查看 [LICENSE](LICENSE) 文件以获取详细信息。 + + + +欢迎加入我们,为 EasyPhoto ConfyUI Plugin 的发展做出贡献! diff --git a/facechain/common/model_processor.py b/facechain/common/model_processor.py index 43e029b..9a69f6f 100644 --- a/facechain/common/model_processor.py +++ b/facechain/common/model_processor.py @@ -48,7 +48,7 @@ def facechain_detect_crop(source_image_pil, face_index=0, crop_ratio=1, mode='no debug('mask', mask.shape) corp_img_pil = source_image_pil.crop(bbox) return corp_img_pil, mask, bbox, points_array - elif mode == "square 512 width heigh": + elif mode == "square 512 width height": np_image = image_to_np(source_image_pil) face_ratio = 0.45 crop_l = int(max(face_h, face_w) / face_ratio / 2) @@ -69,6 +69,7 @@ def facechain_detect_crop(source_image_pil, face_index=0, crop_ratio=1, mode='no raise RuntimeError('模式错误') def segment(img, ksize=0, eyeh=0, ksize1=0, include_neck=False, warp_mask=None, return_human=True): + print('ksize', ksize, "ksize1", ksize1, 'warp_mask', warp_mask) seg_image = get_segmentation()(img) masks = seg_image['masks'] scores = seg_image['scores'] diff --git a/facechain/nodes.py b/facechain/nodes.py index 34ebe35..755f479 100644 --- a/facechain/nodes.py +++ b/facechain/nodes.py @@ -32,7 +32,7 @@ class FaceDetectCrop: "source_image": ("IMAGE",), "face_index": ("INT", {"default": 0, "min": 0, "max": 10, "step": 1}), "crop_ratio": ("FLOAT", {"default": 1.0, "min": 0, "max": 10, "step": 0.1}), - "mode": (["normal", "square 512 width heigh"],), + "mode": (["normal", "square 512 width height"],), } } @@ -54,8 +54,8 @@ class FCFaceSegment: }, "optional": { - "ksize": ("FLOAT", {"default": 0, "min": 0, "max": 10, "step": 0.1}), - "ksize1": ("FLOAT", {"default": 0, "min": 0, "max": 10, "step": 0.1}), + "ksize": ("FLOAT", {"default": 0, "min": 0, "max": 1, "step": 0.01}), + "ksize1": ("FLOAT", {"default": 0, "min": 0, "max": 1, "step": 0.01}), "include_neck": ("BOOLEAN", {"default": False, "label_on": "enabled", "label_off": "disabled"}), "warp_mask": ("MASK",), }, @@ -66,9 +66,9 @@ class FCFaceSegment: FUNCTION = "fc_segment" CATEGORY = "facechain/model" - def fc_segment(self, source_image, ksize=0, ksize1=0, include_neck=False, warp_mask=None, ): + def fc_segment(self, source_image, ksize, ksize1, include_neck=False, warp_mask=None, ): pil_source_image = tensor_to_img(source_image) - seg_image, mask, human_mask = segment(pil_source_image, ksize, ksize1, include_neck, warp_mask, True) + seg_image, mask, human_mask = segment(pil_source_image, ksize=ksize, ksize1=ksize1, include_neck=include_neck, warp_mask=warp_mask, return_human=True) return image_to_tensor(seg_image), mask_np2_to_mask_tensor(mask), mask_np2_to_mask_tensor(human_mask) class FCFaceFusionAndSegReplace: @@ -177,7 +177,7 @@ class FCReplaceByMask: np_source_image = tensor_to_np(source_image) np_replace_image = tensor_to_np(replace_image) np_mask = mask_tensor_to_mask_np3(mask) - result_np = np_source_image * np_mask + np_replace_image(1 - np_mask) + result_np = np_source_image * np_mask + np_replace_image * (1 - np_mask) return (image_np_to_image_tensor(result_np),) class FCCropAndPaste: @@ -213,8 +213,8 @@ class FCMaskOP: return { "required": { "mask": ("MASK",), - "ksize": ("INT", {"default": 8, "min": 0, "max": 100, "step": 1}), - "method": (["expand_dims", "concatenate", "burl", "erode"],), + "method": (["burl", "erode", "dilate"],), + "kernel": ("INT", {"default": 16, "min": 0, "max": 100, "step": 1}), } } @@ -222,19 +222,19 @@ class FCMaskOP: FUNCTION = "mask_op" CATEGORY = "facechain/mask" - def mask_op(self, mask, ksize, method): + def mask_op(self, mask, method, kernel): mask_np = mask_tensor_to_mask_np3(mask) result = None - if method == "concatenate": - result = np.concatenate([mask_np, mask_np, mask_np], axis=2) - elif method == "expand_dims": - result = np.expand_dims(mask_np, axis=2) - elif method == "burl": - result = cv2.GaussianBlur(mask_np, (int(ksize * 1.8) * 2 + 1, int(ksize * 1.8) * 2 + 1), 0) + kernel_real = np.ones((kernel, kernel), np.uint8) + if method == "burl": + result = cv2.GaussianBlur(mask_np, (int(kernel * 1.8) * 2 + 1, int(kernel * 1.8) * 2 + 1), 0) result = np.expand_dims(result, axis=2) elif method == 'erode': - kernel = np.ones((ksize * 2, ksize * 2)) - result = cv2.erode(mask_np, kernel, iterations=1) + result = cv2.erode(mask_np, kernel_real, iterations=1) + result = np.expand_dims(result, axis=2) + elif method == 'dilate': + result = cv2.dilate(mask_np, kernel_real, iterations=1) + result = np.expand_dims(result, axis=2) return (mask_np3_to_mask_tensor(result),) class FCCropToOrigin: diff --git a/facechain/style_loader_node.py b/facechain/style_loader_node.py index 5960bdf..2b8eb5c 100644 --- a/facechain/style_loader_node.py +++ b/facechain/style_loader_node.py @@ -54,7 +54,7 @@ class FCStyleLoraLoad: } } - RETURN_TYPES = ("MODEL", "CLIP", "VAE", "CONDITION",) + RETURN_TYPES = ("MODEL", "CLIP", "VAE", "STRING",) RETURN_NAMES = ("MODEL", "CLIP", "VAE", "style_prompt",) FUNCTION = "style_lora_load" CATEGORY = "facechain/lora" diff --git a/images/wechat.jpg b/images/wechat.jpg new file mode 100755 index 0000000..bbc1071 Binary files /dev/null and b/images/wechat.jpg differ diff --git a/workflow/dev_workflow.json b/workflow/dev_workflow.json deleted file mode 100644 index 016cc3f..0000000 --- a/workflow/dev_workflow.json +++ /dev/null @@ -1,3462 +0,0 @@ -{ - "last_node_id": 176, - "last_link_id": 338, - "nodes": [ - { - "id": 14, - "type": "PreviewImage", - "pos": [ - -186.13410383620948, - 158.17123318320623 - ], - "size": { - "0": 210, - "1": 246 - }, - "flags": {}, - "order": 16, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 86 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 8, - "type": "ControlNetLoader", - "pos": [ - -218.25574372807307, - -310.48028184473714 - ], - "size": { - "0": 315, - "1": 58 - }, - "flags": {}, - "order": 0, - "mode": 0, - "outputs": [ - { - "name": "CONTROL_NET", - "type": "CONTROL_NET", - "links": [ - 19 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "ControlNetLoader" - }, - "widgets_values": [ - "control_v11p_sd15_openpose.pth" - ] - }, - { - "id": 15, - "type": "Control Net Stacker", - "pos": [ - -219.25574372807307, - -193.480281844737 - ], - "size": { - "0": 315, - "1": 146 - }, - "flags": {}, - "order": 15, - "mode": 0, - "inputs": [ - { - "name": "control_net", - "type": "CONTROL_NET", - "link": 19 - }, - { - "name": "image", - "type": "IMAGE", - "link": 42 - }, - { - "name": "cnet_stack", - "type": "CONTROL_NET_STACK", - "link": null - } - ], - "outputs": [ - { - "name": "CNET_STACK", - "type": "CONTROL_NET_STACK", - "links": [ - 20 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "Control Net Stacker" - }, - "widgets_values": [ - 1, - 0, - 1 - ], - "color": "#223322", - "bgcolor": "#335533", - "shape": 1 - }, - { - "id": 5, - "type": "OpenposePreprocessor", - "pos": [ - -224.25574372807307, - -8.480281844736915 - ], - "size": { - "0": 315, - "1": 150 - }, - "flags": {}, - "order": 12, - "mode": 0, - "inputs": [ - { - "name": "image", - "type": "IMAGE", - "link": 80 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 42, - 86 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "POSE_KEYPOINT", - "type": "POSE_KEYPOINT", - "links": null, - "shape": 3 - } - ], - "properties": { - "Node name for S&R": "OpenposePreprocessor" - }, - "widgets_values": [ - "enable", - "enable", - "enable", - 512 - ] - }, - { - "id": 51, - "type": "ControlNetLoader", - "pos": [ - -176.89920713704907, - 570.4991481768883 - ], - "size": { - "0": 315, - "1": 58 - }, - "flags": {}, - "order": 1, - "mode": 0, - "outputs": [ - { - "name": "CONTROL_NET", - "type": "CONTROL_NET", - "links": [ - 88 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "ControlNetLoader" - }, - "widgets_values": [ - "control_v11p_sd15_canny.pth" - ] - }, - { - "id": 53, - "type": "Control Net Stacker", - "pos": [ - -186.89920713704907, - 700.4991481768885 - ], - "size": { - "0": 315, - "1": 146 - }, - "flags": {}, - "order": 25, - "mode": 0, - "inputs": [ - { - "name": "control_net", - "type": "CONTROL_NET", - "link": 88 - }, - { - "name": "image", - "type": "IMAGE", - "link": 92 - }, - { - "name": "cnet_stack", - "type": "CONTROL_NET_STACK", - "link": null - } - ], - "outputs": [ - { - "name": "CNET_STACK", - "type": "CONTROL_NET_STACK", - "links": [ - 103 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "Control Net Stacker" - }, - "widgets_values": [ - 0.2, - 0, - 1 - ], - "color": "#223322", - "bgcolor": "#335533", - "shape": 1 - }, - { - "id": 115, - "type": "FC FaceSegment", - "pos": [ - -1060, - 1390 - ], - "size": { - "0": 315, - "1": 146 - }, - "flags": {}, - "order": 10, - "mode": 0, - "inputs": [ - { - "name": "source_image", - "type": "IMAGE", - "link": 241 - }, - { - "name": "warp_mask", - "type": "MASK", - "link": null - } - ], - "outputs": [ - { - "name": "seg_image", - "type": "IMAGE", - "links": [ - 242, - 243 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "soft_mask", - "type": "MASK", - "links": [], - "shape": 3, - "slot_index": 1 - }, - { - "name": "human_mask", - "type": "MASK", - "links": [], - "shape": 3, - "slot_index": 2 - } - ], - "properties": { - "Node name for S&R": "FC FaceSegment" - }, - "widgets_values": [ - 0, - 0, - false - ] - }, - { - "id": 42, - "type": "PreviewImage", - "pos": [ - -1020, - 1590 - ], - "size": { - "0": 210, - "1": 246 - }, - "flags": {}, - "order": 14, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 243 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 47, - "type": "FC FaceDetectCrop", - "pos": [ - -950, - 60 - ], - "size": { - "0": 315, - "1": 166 - }, - "flags": {}, - "order": 9, - "mode": 0, - "inputs": [ - { - "name": "source_image", - "type": "IMAGE", - "link": 76 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 77, - 80, - 260 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "MASK", - "type": "MASK", - "links": [], - "shape": 3, - "slot_index": 1 - }, - { - "name": "BOX", - "type": "BOX", - "links": [], - "shape": 3, - "slot_index": 2 - }, - { - "name": "KEY_POINT", - "type": "KEY_POINT", - "links": [], - "shape": 3, - "slot_index": 3 - } - ], - "properties": { - "Node name for S&R": "FC FaceDetectCrop" - }, - "widgets_values": [ - 0, - 1, - "square 512 width heigh" - ] - }, - { - "id": 18, - "type": "PreviewImage", - "pos": [ - -920, - 290 - ], - "size": { - "0": 219.1254425048828, - "1": 254.0725555419922 - }, - "flags": {}, - "order": 11, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 77 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 30, - "type": "PreviewImage", - "pos": [ - 1387, - -288 - ], - "size": { - "0": 210, - "1": 246 - }, - "flags": {}, - "order": 27, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 44 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 9, - "type": "LoadImage", - "pos": [ - -940, - -340 - ], - "size": { - "0": 315, - "1": 314 - }, - "flags": {}, - "order": 2, - "mode": 0, - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 76 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "MASK", - "type": "MASK", - "links": null, - "shape": 3 - } - ], - "properties": { - "Node name for S&R": "LoadImage" - }, - "widgets_values": [ - "fc_temp.jpeg", - "image" - ] - }, - { - "id": 124, - "type": "ControlNetLoader", - "pos": [ - -246.12107155273435, - 1476.8662658789065 - ], - "size": { - "0": 315, - "1": 58 - }, - "flags": {}, - "order": 3, - "mode": 0, - "outputs": [ - { - "name": "CONTROL_NET", - "type": "CONTROL_NET", - "links": [ - 262 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "ControlNetLoader" - }, - "widgets_values": [ - "control_v11p_sd15_canny.pth" - ] - }, - { - "id": 129, - "type": "CannyEdgePreprocessor", - "pos": [ - -243.12107155273435, - 1771.8662658789065 - ], - "size": { - "0": 315, - "1": 106 - }, - "flags": { - "collapsed": false - }, - "order": 42, - "mode": 0, - "inputs": [ - { - "name": "image", - "type": "IMAGE", - "link": 294 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 261, - 293 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "CannyEdgePreprocessor" - }, - "widgets_values": [ - 100, - 200, - 512 - ] - }, - { - "id": 126, - "type": "Control Net Stacker", - "pos": [ - -243.12107155273435, - 1578.8662658789065 - ], - "size": { - "0": 315, - "1": 146 - }, - "flags": {}, - "order": 46, - "mode": 0, - "inputs": [ - { - "name": "control_net", - "type": "CONTROL_NET", - "link": 262 - }, - { - "name": "image", - "type": "IMAGE", - "link": 293 - }, - { - "name": "cnet_stack", - "type": "CONTROL_NET_STACK", - "link": null - } - ], - "outputs": [ - { - "name": "CNET_STACK", - "type": "CONTROL_NET_STACK", - "links": [ - 272 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "Control Net Stacker" - }, - "widgets_values": [ - 0.8, - 0, - 1 - ], - "color": "#223322", - "bgcolor": "#335533", - "shape": 1 - }, - { - "id": 125, - "type": "PreviewImage", - "pos": [ - -237.12107155273435, - 1922.8662658789065 - ], - "size": { - "0": 210, - "1": 246 - }, - "flags": {}, - "order": 45, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 261 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 131, - "type": "ControlNetLoader", - "pos": [ - 87.87892844726565, - 1475.8662658789065 - ], - "size": { - "0": 315, - "1": 58 - }, - "flags": {}, - "order": 4, - "mode": 0, - "outputs": [ - { - "name": "CONTROL_NET", - "type": "CONTROL_NET", - "links": [ - 270 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "ControlNetLoader" - }, - "widgets_values": [ - "control_v11p_sd15_openpose.pth" - ] - }, - { - "id": 133, - "type": "Control Net Stacker", - "pos": [ - 97.87892844726565, - 1579.8662658789065 - ], - "size": { - "0": 315, - "1": 146 - }, - "flags": {}, - "order": 49, - "mode": 0, - "inputs": [ - { - "name": "control_net", - "type": "CONTROL_NET", - "link": 270 - }, - { - "name": "image", - "type": "IMAGE", - "link": 301 - }, - { - "name": "cnet_stack", - "type": "CONTROL_NET_STACK", - "link": 272 - } - ], - "outputs": [ - { - "name": "CNET_STACK", - "type": "CONTROL_NET_STACK", - "links": [ - 273 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "Control Net Stacker" - }, - "widgets_values": [ - 0.8, - 0, - 1 - ], - "color": "#223322", - "bgcolor": "#335533", - "shape": 1 - }, - { - "id": 130, - "type": "OpenposePreprocessor", - "pos": [ - 92.87892844726565, - 1766.8662658789065 - ], - "size": { - "0": 315, - "1": 150 - }, - "flags": {}, - "order": 44, - "mode": 0, - "inputs": [ - { - "name": "image", - "type": "IMAGE", - "link": 300 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 269, - 301 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "POSE_KEYPOINT", - "type": "POSE_KEYPOINT", - "links": null, - "shape": 3 - } - ], - "properties": { - "Node name for S&R": "OpenposePreprocessor" - }, - "widgets_values": [ - "enable", - "enable", - "enable", - 512 - ] - }, - { - "id": 132, - "type": "PreviewImage", - "pos": [ - 139.87892844726565, - 1961.866265878907 - ], - "size": { - "0": 210, - "1": 246 - }, - "flags": {}, - "order": 48, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 269 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 142, - "type": "MaskToImage", - "pos": [ - 889, - 1656 - ], - "size": { - "0": 210, - "1": 26 - }, - "flags": {}, - "order": 47, - "mode": 0, - "inputs": [ - { - "name": "mask", - "type": "MASK", - "link": 285 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 299 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "MaskToImage" - } - }, - { - "id": 143, - "type": "PreviewImage", - "pos": [ - 886, - 1731 - ], - "size": { - "0": 210, - "1": 246 - }, - "flags": {}, - "order": 50, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 299 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 31, - "type": "LoRA Stacker", - "pos": [ - -968, - 697 - ], - "size": { - "0": 315, - "1": 178 - }, - "flags": { - "collapsed": false - }, - "order": 5, - "mode": 0, - "inputs": [ - { - "name": "lora_stack", - "type": "LORA_STACK", - "link": null - } - ], - "outputs": [ - { - "name": "LORA_STACK", - "type": "LORA_STACK", - "links": [ - 45, - 236, - 302 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "LoRA Stacker" - }, - "widgets_values": [ - "simple", - 2, - "FilmVelvia3.safetensors", - 0.2, - 1, - 1, - "dahuang_ep.safetensors", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1, - "None", - 1, - 1, - 1 - ], - "color": "#222233", - "bgcolor": "#333355", - "shape": 1 - }, - { - "id": 146, - "type": "Reroute", - "pos": [ - -161.13497539916992, - 1410.5010029956056 - ], - "size": [ - 75, - 26 - ], - "flags": {}, - "order": 40, - "mode": 0, - "inputs": [ - { - "name": "", - "type": "*", - "link": 291 - } - ], - "outputs": [ - { - "name": "", - "type": "IMAGE", - "links": [ - 294, - 295, - 300, - 303 - ], - "slot_index": 0 - } - ], - "properties": { - "showOutputText": false, - "horizontal": false - } - }, - { - "id": 59, - "type": "PreviewImage", - "pos": [ - 980, - 1060 - ], - "size": { - "0": 210, - "1": 246 - }, - "flags": {}, - "order": 35, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 99 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 32, - "type": "LoadImage", - "pos": [ - -1070, - 980 - ], - "size": { - "0": 315, - "1": 314 - }, - "flags": {}, - "order": 6, - "mode": 0, - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 241 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "MASK", - "type": "MASK", - "links": null, - "shape": 3 - } - ], - "properties": { - "Node name for S&R": "LoadImage" - }, - "widgets_values": [ - "dahuang11.png", - "image" - ] - }, - { - "id": 1, - "type": "Efficient Loader", - "pos": [ - 478, - -283 - ], - "size": { - "0": 400, - "1": 462 - }, - "flags": {}, - "order": 19, - "mode": 0, - "inputs": [ - { - "name": "lora_stack", - "type": "LORA_STACK", - "link": 45 - }, - { - "name": "cnet_stack", - "type": "CONTROL_NET_STACK", - "link": 20 - } - ], - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": [ - 47 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "CONDITIONING+", - "type": "CONDITIONING", - "links": [ - 48 - ], - "shape": 3, - "slot_index": 1 - }, - { - "name": "CONDITIONING-", - "type": "CONDITIONING", - "links": [ - 50 - ], - "shape": 3, - "slot_index": 2 - }, - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 24 - ], - "shape": 3, - "slot_index": 3 - }, - { - "name": "VAE", - "type": "VAE", - "links": [ - 51 - ], - "shape": 3, - "slot_index": 4 - }, - { - "name": "CLIP", - "type": "CLIP", - "links": [], - "shape": 3, - "slot_index": 5 - }, - { - "name": "DEPENDENCIES", - "type": "DEPENDENCIES", - "links": null, - "shape": 3 - } - ], - "properties": { - "Node name for S&R": "Efficient Loader" - }, - "widgets_values": [ - "majicmixRealistic_v7.safetensors", - "Baked VAE", - -2, - "None", - 1, - 1, - " raw photo, masterpiece, chinese, simple background, high-class pure color background, solo, medium shot, high detail face, photorealistic, best quality, wearing T-shi", - "nsfw, paintings, sketches, (worst quality:2), (low quality:2) lowers, normal quality, ((monochrome)), ((grayscale)), logo, word, character, childre", - "none", - "A1111", - 512, - 512, - 1 - ], - "color": "#223322", - "bgcolor": "#335533", - "shape": 1 - }, - { - "id": 134, - "type": "Efficient Loader", - "pos": [ - 445.8789284472656, - 1487.8662658789065 - ], - "size": { - "0": 400, - "1": 462.0000305175781 - }, - "flags": {}, - "order": 51, - "mode": 0, - "inputs": [ - { - "name": "lora_stack", - "type": "LORA_STACK", - "link": 302 - }, - { - "name": "cnet_stack", - "type": "CONTROL_NET_STACK", - "link": 273 - } - ], - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": [ - 275 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "CONDITIONING+", - "type": "CONDITIONING", - "links": [ - 276 - ], - "shape": 3, - "slot_index": 1 - }, - { - "name": "CONDITIONING-", - "type": "CONDITIONING", - "links": [ - 277 - ], - "shape": 3, - "slot_index": 2 - }, - { - "name": "LATENT", - "type": "LATENT", - "links": [], - "shape": 3, - "slot_index": 3 - }, - { - "name": "VAE", - "type": "VAE", - "links": [ - 279, - 288 - ], - "shape": 3, - "slot_index": 4 - }, - { - "name": "CLIP", - "type": "CLIP", - "links": [], - "shape": 3, - "slot_index": 5 - }, - { - "name": "DEPENDENCIES", - "type": "DEPENDENCIES", - "links": null, - "shape": 3 - } - ], - "properties": { - "Node name for S&R": "Efficient Loader" - }, - "widgets_values": [ - "majicmixRealistic_v7.safetensors", - "Baked VAE", - -1, - "None", - 1, - 1, - " raw photo, masterpiece, chinese, simple background, high-class pure color background, solo, medium shot, high detail face, photorealistic, best quality, wearing T-shi", - "nsfw, paintings, sketches, (worst quality:2), (low quality:2) lowers, normal quality, ((monochrome)), ((grayscale)), logo, word, character, childre", - "none", - "A1111", - 512, - 512, - 1 - ], - "color": "#223322", - "bgcolor": "#335533", - "shape": 1 - }, - { - "id": 137, - "type": "KSampler Adv. (Efficient)", - "pos": [ - 1553, - 1481 - ], - "size": { - "0": 325, - "1": 634 - }, - "flags": {}, - "order": 53, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 275 - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": 276 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 277 - }, - { - "name": "latent_image", - "type": "LATENT", - "link": 278 - }, - { - "name": "optional_vae", - "type": "VAE", - "link": 279 - }, - { - "name": "script", - "type": "SCRIPT", - "link": null - } - ], - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": null, - "shape": 3 - }, - { - "name": "CONDITIONING+", - "type": "CONDITIONING", - "links": null, - "shape": 3 - }, - { - "name": "CONDITIONING-", - "type": "CONDITIONING", - "links": null, - "shape": 3 - }, - { - "name": "LATENT", - "type": "LATENT", - "links": null, - "shape": 3 - }, - { - "name": "VAE", - "type": "VAE", - "links": null, - "shape": 3 - }, - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 324 - ], - "shape": 3, - "slot_index": 5 - } - ], - "properties": { - "Node name for S&R": "KSampler Adv. (Efficient)" - }, - "widgets_values": [ - "enable", - 126651525190260, - null, - 40, - 7, - "euler", - "normal", - 14, - 10000, - "disable", - "auto", - "true" - ], - "color": "#332222", - "bgcolor": "#553333", - "shape": 1 - }, - { - "id": 161, - "type": "PreviewImage", - "pos": [ - 2104.831728027344, - 1504.7643877563478 - ], - "size": [ - 210, - 246 - ], - "flags": {}, - "order": 54, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 324 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 57, - "type": "OpenposePreprocessor", - "pos": [ - 920, - 870 - ], - "size": { - "0": 315, - "1": 150 - }, - "flags": {}, - "order": 34, - "mode": 0, - "inputs": [ - { - "name": "image", - "type": "IMAGE", - "link": 336 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 99, - 101 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "POSE_KEYPOINT", - "type": "POSE_KEYPOINT", - "links": null, - "shape": 3 - } - ], - "properties": { - "Node name for S&R": "OpenposePreprocessor" - }, - "widgets_values": [ - "enable", - "disable", - "enable", - 512 - ] - }, - { - "id": 123, - "type": "Reroute", - "pos": [ - -254.56745147583013, - 518.4284906738284 - ], - "size": [ - 75, - 26 - ], - "flags": {}, - "order": 13, - "mode": 0, - "inputs": [ - { - "name": "", - "type": "*", - "link": 260 - } - ], - "outputs": [ - { - "name": "", - "type": "IMAGE", - "links": [ - 256, - 257, - 258, - 259, - 326 - ], - "slot_index": 0 - } - ], - "properties": { - "showOutputText": false, - "horizontal": false - } - }, - { - "id": 63, - "type": "PreviewImage", - "pos": [ - 288, - 995 - ], - "size": { - "0": 210, - "1": 246 - }, - "flags": {}, - "order": 29, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 112 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 58, - "type": "ControlNetLoader", - "pos": [ - 448, - 587 - ], - "size": { - "0": 315, - "1": 58 - }, - "flags": {}, - "order": 7, - "mode": 0, - "outputs": [ - { - "name": "CONTROL_NET", - "type": "CONTROL_NET", - "links": [ - 100 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "ControlNetLoader" - }, - "widgets_values": [ - "control_v11p_sd15_openpose.pth" - ] - }, - { - "id": 60, - "type": "Control Net Stacker", - "pos": [ - 933, - 674 - ], - "size": { - "0": 315, - "1": 146 - }, - "flags": {}, - "order": 36, - "mode": 0, - "inputs": [ - { - "name": "control_net", - "type": "CONTROL_NET", - "link": 100 - }, - { - "name": "image", - "type": "IMAGE", - "link": 101 - }, - { - "name": "cnet_stack", - "type": "CONTROL_NET_STACK", - "link": 103 - } - ], - "outputs": [ - { - "name": "CNET_STACK", - "type": "CONTROL_NET_STACK", - "links": [ - 104 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "Control Net Stacker" - }, - "widgets_values": [ - 1, - 0, - 1 - ], - "color": "#223322", - "bgcolor": "#335533", - "shape": 1 - }, - { - "id": 4, - "type": "KSampler Adv. (Efficient)", - "pos": [ - 891.7442562719289, - -295.48028184473714 - ], - "size": { - "0": 325, - "1": 634 - }, - "flags": {}, - "order": 23, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 47 - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": 48 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 50 - }, - { - "name": "latent_image", - "type": "LATENT", - "link": 24 - }, - { - "name": "optional_vae", - "type": "VAE", - "link": 51 - }, - { - "name": "script", - "type": "SCRIPT", - "link": null - } - ], - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": null, - "shape": 3 - }, - { - "name": "CONDITIONING+", - "type": "CONDITIONING", - "links": null, - "shape": 3 - }, - { - "name": "CONDITIONING-", - "type": "CONDITIONING", - "links": null, - "shape": 3 - }, - { - "name": "LATENT", - "type": "LATENT", - "links": null, - "shape": 3 - }, - { - "name": "VAE", - "type": "VAE", - "links": null, - "shape": 3 - }, - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 44, - 125 - ], - "shape": 3, - "slot_index": 5 - } - ], - "properties": { - "Node name for S&R": "KSampler Adv. (Efficient)" - }, - "widgets_values": [ - "enable", - 314690775968582, - null, - 20, - 7, - "euler", - "normal", - 0, - 10000, - "disable", - "auto", - "true" - ], - "color": "#332222", - "bgcolor": "#553333", - "shape": 1 - }, - { - "id": 64, - "type": "FC FaceFusion", - "pos": [ - 286, - 818 - ], - "size": { - "0": 229.20001220703125, - "1": 46 - }, - "flags": { - "collapsed": false - }, - "order": 28, - "mode": 0, - "inputs": [ - { - "name": "source_image", - "type": "IMAGE", - "link": 125 - }, - { - "name": "fusion_image", - "type": "IMAGE", - "link": 242 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 112, - 211, - 328 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "FC FaceFusion" - } - }, - { - "id": 56, - "type": "CannyEdgePreprocessor", - "pos": [ - -193, - 920 - ], - "size": { - "0": 315, - "1": 106 - }, - "flags": { - "collapsed": true - }, - "order": 18, - "mode": 0, - "inputs": [ - { - "name": "image", - "type": "IMAGE", - "link": 258 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 98, - 331 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "CannyEdgePreprocessor" - }, - "widgets_values": [ - 100, - 200, - 512 - ] - }, - { - "id": 166, - "type": "PreviewImage", - "pos": [ - -228, - 976 - ], - "size": [ - 210, - 246 - ], - "flags": {}, - "order": 22, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 331 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 54, - "type": "FC RemoveCannyFace", - "pos": [ - 12, - 917 - ], - "size": { - "0": 229.20001220703125, - "1": 46 - }, - "flags": { - "collapsed": true - }, - "order": 21, - "mode": 0, - "inputs": [ - { - "name": "source_image", - "type": "IMAGE", - "link": 259 - }, - { - "name": "canny_image", - "type": "IMAGE", - "link": 98 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 92, - 332 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "FC RemoveCannyFace" - } - }, - { - "id": 167, - "type": "PreviewImage", - "pos": [ - 13, - 979 - ], - "size": [ - 210, - 246 - ], - "flags": {}, - "order": 26, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 332 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 122, - "type": "VAEEncodeForInpaint", - "pos": [ - 2123, - 472 - ], - "size": { - "0": 315, - "1": 98 - }, - "flags": {}, - "order": 38, - "mode": 0, - "inputs": [ - { - "name": "pixels", - "type": "IMAGE", - "link": 326 - }, - { - "name": "vae", - "type": "VAE", - "link": 250 - }, - { - "name": "mask", - "type": "MASK", - "link": 321 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 253 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "VAEEncodeForInpaint" - }, - "widgets_values": [ - 6 - ] - }, - { - "id": 75, - "type": "KSampler Adv. (Efficient)", - "pos": [ - 2465.713836463533, - 587.1222536877893 - ], - "size": { - "0": 325, - "1": 634 - }, - "flags": {}, - "order": 39, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 129 - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": 130 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 131 - }, - { - "name": "latent_image", - "type": "LATENT", - "link": 253 - }, - { - "name": "optional_vae", - "type": "VAE", - "link": 133 - }, - { - "name": "script", - "type": "SCRIPT", - "link": null - } - ], - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": [], - "shape": 3, - "slot_index": 0 - }, - { - "name": "CONDITIONING+", - "type": "CONDITIONING", - "links": [], - "shape": 3, - "slot_index": 1 - }, - { - "name": "CONDITIONING-", - "type": "CONDITIONING", - "links": [], - "shape": 3, - "slot_index": 2 - }, - { - "name": "LATENT", - "type": "LATENT", - "links": null, - "shape": 3 - }, - { - "name": "VAE", - "type": "VAE", - "links": [], - "shape": 3, - "slot_index": 4 - }, - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 291, - 325 - ], - "shape": 3, - "slot_index": 5 - } - ], - "properties": { - "Node name for S&R": "KSampler Adv. (Efficient)" - }, - "widgets_values": [ - "enable", - 1062338096661881, - null, - 40, - 7, - "euler", - "normal", - 14, - 10000, - "disable", - "auto", - "true" - ], - "color": "#332222", - "bgcolor": "#553333", - "shape": 1 - }, - { - "id": 98, - "type": "FC CropAndPaste", - "pos": [ - 540, - 787 - ], - "size": { - "0": 356.1970520019531, - "1": 66 - }, - "flags": {}, - "order": 30, - "mode": 0, - "inputs": [ - { - "name": "template_image", - "type": "IMAGE", - "link": 256 - }, - { - "name": "human_image", - "type": "IMAGE", - "link": 211 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 327 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "MASK", - "type": "MASK", - "links": [], - "shape": 3, - "slot_index": 1 - }, - { - "name": "invert_mask", - "type": "MASK", - "links": null, - "shape": 3, - "slot_index": 2 - } - ], - "properties": { - "Node name for S&R": "FC CropAndPaste" - } - }, - { - "id": 163, - "type": "PreviewImage", - "pos": [ - 511, - 1065 - ], - "size": [ - 210, - 246 - ], - "flags": {}, - "order": 32, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 327 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 165, - "type": "PreviewImage", - "pos": [ - 743, - 1072 - ], - "size": [ - 210, - 246 - ], - "flags": {}, - "order": 33, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 329 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 173, - "type": "KSamplerAdvancedProgress //Inspire", - "pos": [ - 3225, - 782 - ], - "size": { - "0": 506.4000244140625, - "1": 426 - }, - "flags": {}, - "order": 8, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": null - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": null - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": null - }, - { - "name": "latent_image", - "type": "LATENT", - "link": null - }, - { - "name": "prev_progress_latent_opt", - "type": "LATENT", - "link": null - } - ], - "outputs": [ - { - "name": "latent", - "type": "LATENT", - "links": null, - "shape": 3 - }, - { - "name": "progress_latent", - "type": "LATENT", - "links": null, - "shape": 3 - } - ], - "properties": { - "Node name for S&R": "KSamplerAdvancedProgress //Inspire" - }, - "widgets_values": [ - true, - 110796771235005, - "randomize", - 20, - 8, - "euler", - "normal", - 0, - 10000, - "GPU(=A1111)", - false, - 1, - false - ] - }, - { - "id": 164, - "type": "FC FaceSegment", - "pos": [ - 532, - 932 - ], - "size": { - "0": 315, - "1": 146 - }, - "flags": { - "collapsed": false - }, - "order": 31, - "mode": 0, - "inputs": [ - { - "name": "source_image", - "type": "IMAGE", - "link": 328 - }, - { - "name": "warp_mask", - "type": "MASK", - "link": null - } - ], - "outputs": [ - { - "name": "seg_image", - "type": "IMAGE", - "links": [ - 329, - 336 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "soft_mask", - "type": "MASK", - "links": null, - "shape": 3 - }, - { - "name": "human_mask", - "type": "MASK", - "links": null, - "shape": 3 - } - ], - "properties": { - "Node name for S&R": "FC FaceSegment" - }, - "widgets_values": [ - 0, - 0, - false - ] - }, - { - "id": 162, - "type": "PreviewImage", - "pos": [ - 3510, - 387 - ], - "size": [ - 210, - 246 - ], - "flags": {}, - "order": 41, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 325 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 144, - "type": "VAEEncodeForInpaint", - "pos": [ - 1230, - 1662 - ], - "size": { - "0": 315, - "1": 98 - }, - "flags": {}, - "order": 52, - "mode": 0, - "inputs": [ - { - "name": "pixels", - "type": "IMAGE", - "link": 303 - }, - { - "name": "vae", - "type": "VAE", - "link": 288 - }, - { - "name": "mask", - "type": "MASK", - "link": 338 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 278 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "VAEEncodeForInpaint" - }, - "widgets_values": [ - 6 - ] - }, - { - "id": 109, - "type": "FC FaceSegment", - "pos": [ - 1718, - 621 - ], - "size": { - "0": 315, - "1": 146 - }, - "flags": {}, - "order": 17, - "mode": 0, - "inputs": [ - { - "name": "source_image", - "type": "IMAGE", - "link": 257 - }, - { - "name": "warp_mask", - "type": "MASK", - "link": null - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": null, - "shape": 3, - "slot_index": 0 - }, - { - "name": "MASK", - "type": "MASK", - "links": [ - 226, - 321 - ], - "shape": 3, - "slot_index": 1 - }, - { - "name": "human_mask", - "type": "MASK", - "links": [], - "shape": 3, - "slot_index": 2 - } - ], - "properties": { - "Node name for S&R": "FC FaceSegment" - }, - "widgets_values": [ - 0, - 0, - false - ] - }, - { - "id": 141, - "type": "FC FaceSegment", - "pos": [ - 866, - 1466 - ], - "size": { - "0": 315, - "1": 146 - }, - "flags": {}, - "order": 43, - "mode": 0, - "inputs": [ - { - "name": "source_image", - "type": "IMAGE", - "link": 295 - }, - { - "name": "warp_mask", - "type": "MASK", - "link": null - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [], - "shape": 3, - "slot_index": 0 - }, - { - "name": "MASK", - "type": "MASK", - "links": [ - 285, - 338 - ], - "shape": 3, - "slot_index": 1 - }, - { - "name": "human_mask", - "type": "MASK", - "links": [], - "shape": 3, - "slot_index": 2 - } - ], - "properties": { - "Node name for S&R": "FC FaceSegment" - }, - "widgets_values": [ - 0, - 0, - false - ] - }, - { - "id": 110, - "type": "MaskToImage", - "pos": [ - 1745, - 820 - ], - "size": { - "0": 210, - "1": 26 - }, - "flags": {}, - "order": 20, - "mode": 0, - "inputs": [ - { - "name": "mask", - "type": "MASK", - "link": 226 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 227 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "MaskToImage" - } - }, - { - "id": 111, - "type": "PreviewImage", - "pos": [ - 1736, - 895 - ], - "size": { - "0": 210, - "1": 246 - }, - "flags": {}, - "order": 24, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 227 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 61, - "type": "Efficient Loader", - "pos": [ - 1300, - 600 - ], - "size": { - "0": 400, - "1": 462 - }, - "flags": {}, - "order": 37, - "mode": 0, - "inputs": [ - { - "name": "lora_stack", - "type": "LORA_STACK", - "link": 236 - }, - { - "name": "cnet_stack", - "type": "CONTROL_NET_STACK", - "link": 104 - } - ], - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": [ - 129 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "CONDITIONING+", - "type": "CONDITIONING", - "links": [ - 130 - ], - "shape": 3, - "slot_index": 1 - }, - { - "name": "CONDITIONING-", - "type": "CONDITIONING", - "links": [ - 131 - ], - "shape": 3, - "slot_index": 2 - }, - { - "name": "LATENT", - "type": "LATENT", - "links": [], - "shape": 3, - "slot_index": 3 - }, - { - "name": "VAE", - "type": "VAE", - "links": [ - 133, - 250 - ], - "shape": 3, - "slot_index": 4 - }, - { - "name": "CLIP", - "type": "CLIP", - "links": [], - "shape": 3, - "slot_index": 5 - }, - { - "name": "DEPENDENCIES", - "type": "DEPENDENCIES", - "links": null, - "shape": 3 - } - ], - "properties": { - "Node name for S&R": "Efficient Loader" - }, - "widgets_values": [ - "majicmixRealistic_v7.safetensors", - "Baked VAE", - -1, - "None", - 1, - 1, - " raw photo, masterpiece, chinese, simple background, high-class pure color background, solo, medium shot, high detail face, photorealistic, best quality, wearing T-shi", - "nsfw, paintings, sketches, (worst quality:2), (low quality:2) lowers, normal quality, ((monochrome)), ((grayscale)), logo, word, character, childre", - "none", - "A1111", - 512, - 512, - 1 - ], - "color": "#223322", - "bgcolor": "#335533", - "shape": 1 - } - ], - "links": [ - [ - 19, - 8, - 0, - 15, - 0, - "CONTROL_NET" - ], - [ - 20, - 15, - 0, - 1, - 1, - "CONTROL_NET_STACK" - ], - [ - 24, - 1, - 3, - 4, - 3, - "LATENT" - ], - [ - 42, - 5, - 0, - 15, - 1, - "IMAGE" - ], - [ - 44, - 4, - 5, - 30, - 0, - "IMAGE" - ], - [ - 45, - 31, - 0, - 1, - 0, - "LORA_STACK" - ], - [ - 47, - 1, - 0, - 4, - 0, - "MODEL" - ], - [ - 48, - 1, - 1, - 4, - 1, - "CONDITIONING" - ], - [ - 50, - 1, - 2, - 4, - 2, - "CONDITIONING" - ], - [ - 51, - 1, - 4, - 4, - 4, - "VAE" - ], - [ - 76, - 9, - 0, - 47, - 0, - "IMAGE" - ], - [ - 77, - 47, - 0, - 18, - 0, - "IMAGE" - ], - [ - 80, - 47, - 0, - 5, - 0, - "IMAGE" - ], - [ - 86, - 5, - 0, - 14, - 0, - "IMAGE" - ], - [ - 88, - 51, - 0, - 53, - 0, - "CONTROL_NET" - ], - [ - 92, - 54, - 0, - 53, - 1, - "IMAGE" - ], - [ - 98, - 56, - 0, - 54, - 1, - "IMAGE" - ], - [ - 99, - 57, - 0, - 59, - 0, - "IMAGE" - ], - [ - 100, - 58, - 0, - 60, - 0, - "CONTROL_NET" - ], - [ - 101, - 57, - 0, - 60, - 1, - "IMAGE" - ], - [ - 103, - 53, - 0, - 60, - 2, - "CONTROL_NET_STACK" - ], - [ - 104, - 60, - 0, - 61, - 1, - "CONTROL_NET_STACK" - ], - [ - 112, - 64, - 0, - 63, - 0, - "IMAGE" - ], - [ - 125, - 4, - 5, - 64, - 0, - "IMAGE" - ], - [ - 129, - 61, - 0, - 75, - 0, - "MODEL" - ], - [ - 130, - 61, - 1, - 75, - 1, - "CONDITIONING" - ], - [ - 131, - 61, - 2, - 75, - 2, - "CONDITIONING" - ], - [ - 133, - 61, - 4, - 75, - 4, - "VAE" - ], - [ - 211, - 64, - 0, - 98, - 1, - "IMAGE" - ], - [ - 226, - 109, - 1, - 110, - 0, - "MASK" - ], - [ - 227, - 110, - 0, - 111, - 0, - "IMAGE" - ], - [ - 236, - 31, - 0, - 61, - 0, - "LORA_STACK" - ], - [ - 241, - 32, - 0, - 115, - 0, - "IMAGE" - ], - [ - 242, - 115, - 0, - 64, - 1, - "IMAGE" - ], - [ - 243, - 115, - 0, - 42, - 0, - "IMAGE" - ], - [ - 250, - 61, - 4, - 122, - 1, - "VAE" - ], - [ - 253, - 122, - 0, - 75, - 3, - "LATENT" - ], - [ - 256, - 123, - 0, - 98, - 0, - "IMAGE" - ], - [ - 257, - 123, - 0, - 109, - 0, - "IMAGE" - ], - [ - 258, - 123, - 0, - 56, - 0, - "IMAGE" - ], - [ - 259, - 123, - 0, - 54, - 0, - "IMAGE" - ], - [ - 260, - 47, - 0, - 123, - 0, - "*" - ], - [ - 261, - 129, - 0, - 125, - 0, - "IMAGE" - ], - [ - 262, - 124, - 0, - 126, - 0, - "CONTROL_NET" - ], - [ - 269, - 130, - 0, - 132, - 0, - "IMAGE" - ], - [ - 270, - 131, - 0, - 133, - 0, - "CONTROL_NET" - ], - [ - 272, - 126, - 0, - 133, - 2, - "CONTROL_NET_STACK" - ], - [ - 273, - 133, - 0, - 134, - 1, - "CONTROL_NET_STACK" - ], - [ - 275, - 134, - 0, - 137, - 0, - "MODEL" - ], - [ - 276, - 134, - 1, - 137, - 1, - "CONDITIONING" - ], - [ - 277, - 134, - 2, - 137, - 2, - "CONDITIONING" - ], - [ - 278, - 144, - 0, - 137, - 3, - "LATENT" - ], - [ - 279, - 134, - 4, - 137, - 4, - "VAE" - ], - [ - 285, - 141, - 1, - 142, - 0, - "MASK" - ], - [ - 288, - 134, - 4, - 144, - 1, - "VAE" - ], - [ - 291, - 75, - 5, - 146, - 0, - "*" - ], - [ - 293, - 129, - 0, - 126, - 1, - "IMAGE" - ], - [ - 294, - 146, - 0, - 129, - 0, - "IMAGE" - ], - [ - 295, - 146, - 0, - 141, - 0, - "IMAGE" - ], - [ - 299, - 142, - 0, - 143, - 0, - "IMAGE" - ], - [ - 300, - 146, - 0, - 130, - 0, - "IMAGE" - ], - [ - 301, - 130, - 0, - 133, - 1, - "IMAGE" - ], - [ - 302, - 31, - 0, - 134, - 0, - "LORA_STACK" - ], - [ - 303, - 146, - 0, - 144, - 0, - "IMAGE" - ], - [ - 321, - 109, - 1, - 122, - 2, - "MASK" - ], - [ - 324, - 137, - 5, - 161, - 0, - "IMAGE" - ], - [ - 325, - 75, - 5, - 162, - 0, - "IMAGE" - ], - [ - 326, - 123, - 0, - 122, - 0, - "IMAGE" - ], - [ - 327, - 98, - 0, - 163, - 0, - "IMAGE" - ], - [ - 328, - 64, - 0, - 164, - 0, - "IMAGE" - ], - [ - 329, - 164, - 0, - 165, - 0, - "IMAGE" - ], - [ - 331, - 56, - 0, - 166, - 0, - "IMAGE" - ], - [ - 332, - 54, - 0, - 167, - 0, - "IMAGE" - ], - [ - 336, - 164, - 0, - 57, - 0, - "IMAGE" - ], - [ - 338, - 141, - 1, - 144, - 2, - "MASK" - ] - ], - "groups": [ - { - "title": "Group", - "bounding": [ - -255, - -387, - 1965, - 815 - ], - "color": "#3f789e", - "font_size": 24, - "locked": false - }, - { - "title": "Group", - "bounding": [ - -264, - 471, - 3436, - 874 - ], - "color": "#3f789e", - "font_size": 24, - "locked": false - }, - { - "title": "Group", - "bounding": [ - -265, - 1401, - 3332, - 902 - ], - "color": "#3f789e", - "font_size": 24, - "locked": false - } - ], - "config": {}, - "extra": {}, - "version": 0.4 -} \ No newline at end of file diff --git a/workflows/workflow_crop_to_origin.png b/workflows/workflow_crop_to_origin.png new file mode 100644 index 0000000..e3f9b66 Binary files /dev/null and b/workflows/workflow_crop_to_origin.png differ diff --git a/workflows/workflow_face_detect_crop.png b/workflows/workflow_face_detect_crop.png new file mode 100644 index 0000000..d151004 Binary files /dev/null and b/workflows/workflow_face_detect_crop.png differ diff --git a/workflows/workflow_face_fusion.png b/workflows/workflow_face_fusion.png new file mode 100644 index 0000000..023f058 Binary files /dev/null and b/workflows/workflow_face_fusion.png differ diff --git a/workflows/workflow_face_seg_and_replace.png b/workflows/workflow_face_seg_and_replace.png new file mode 100644 index 0000000..eebdd6e Binary files /dev/null and b/workflows/workflow_face_seg_and_replace.png differ diff --git a/workflows/workflow_face_segment.png b/workflows/workflow_face_segment.png new file mode 100644 index 0000000..91c1230 Binary files /dev/null and b/workflows/workflow_face_segment.png differ diff --git a/workflows/workflow_inpaiting_inference.png b/workflows/workflow_inpaiting_inference.png new file mode 100644 index 0000000..66e50c5 Binary files /dev/null and b/workflows/workflow_inpaiting_inference.png differ diff --git a/workflows/workflow_mask_op.png b/workflows/workflow_mask_op.png new file mode 100644 index 0000000..f56cd17 Binary files /dev/null and b/workflows/workflow_mask_op.png differ diff --git a/workflows/workflow_remove_canny_face.png b/workflows/workflow_remove_canny_face.png new file mode 100644 index 0000000..9138975 Binary files /dev/null and b/workflows/workflow_remove_canny_face.png differ diff --git a/workflows/workflow_replace_by_mask.png b/workflows/workflow_replace_by_mask.png new file mode 100644 index 0000000..873186a Binary files /dev/null and b/workflows/workflow_replace_by_mask.png differ