commit CropByMaskV2 node

This commit is contained in:
chflame
2024-03-07 19:36:39 +08:00
parent 356fe57983
commit f8c64c56ae
3 changed files with 19 additions and 2 deletions
+9 -1
View File
@@ -36,7 +36,7 @@ git clone https://github.com/chflame163/ComfyUI_LayerStyle.git
## Update
<font size="4">**If the dependency package error after updating, please reinstall the relevant dependency packages. for details, please refer to [here](https://github.com/chflame163/ComfyUI_LayerStyle/issues/5). </font><br />
* Commit [CropByMaskV2](#CropByMaskV2) node, On the basis of the original node, it supports ```crop_box``` input, making it convenient to cut layers of the same size.
* Commit [SimpleTextImage](#SimpleTextImage) node, it generate simple typesetting images and masks from text. This node references some of the functionalities and code of [ZHO-ZHO-ZHO/ComfyUI-Text_Image-Composite](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Text_Image-Composite).
* Commit [PromptTagger](#PromptTagger) node,Inference the prompts based on the image. and it can replace key word for the prompt(need apply for Google Studio API key). Upgrade [ColorImageV2](#ColorImageV2) and [GradientImageV2](#GradientImageV2),support user customize preset sizes and size_as input.
* Commit [LaMa](#LaMa) node, it can erase objects from the image based on the mask. this node is repackage of [IOPaint](https://www.iopaint.com).
@@ -385,6 +385,14 @@ Output:
* crop_box: The trimmed box data is used when restoring the RestoreCropBox node.
* box_preview: Preview image of cutting position, red represents the detected range, and green represents the cutting range after adding the reserved border.
### <a id="table1">CropByMaskV2</a>
The V2 upgraded version of CropByMask. Supports crop_box input, making it easy to cut layers of the same size.
The following changes have been made based on CropByMask:
![image](image/corp_by_mask_v2_node.png)
* The input ```mask_for_crop``` reanme to ```mask```。
* Add optional inputs to the ```crop_box```. If there are inputs here, mask detection will be ignored and this data will be directly used for cropping.
### <a id="table1">RestoreCropBox</a>
Restore the cropped image to the original image by [CropByMask](#CropByMask).
+10 -1
View File
@@ -37,7 +37,7 @@ git clone https://github.com/chflame163/ComfyUI_LayerStyle.git
## 更新说明
<font size="4">**如果本插件更新后出现依赖包错误,请重新安装相关依赖包。详情见[这里](https://github.com/chflame163/ComfyUI_LayerStyle/issues/5)。 </font><br />
* 添加 [CropByMaskV2](#CropByMaskV2) 节点,在原节点基础上支持```crop_box```输入,方便裁切相同尺寸的图层。
* 添加 [SimpleTextImage](#SimpleTextImage) 节点。从文字生成简单排版的图片以及遮罩。这个节点参考了[ZHO-ZHO-ZHO/ComfyUI-Text_Image-Composite](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Text_Image-Composite)的部分功能和代码。
* 添加 [PromptTagger](#PromptTagger) 节点,根据图片反推提示词,可以替换关键词。需要申请Google Studio API使用。升级节点[ColorImageV2](#ColorImageV2)和[GradientImageV2](#GradientImageV2),支持用户自定义预设尺寸和size_as输入。
* 添加 [Lama](#Lama) 节点,根据图像遮罩擦除物体。本节点是对[IOPaint](https://www.iopaint.com)的封装。
@@ -378,6 +378,15 @@ git clone https://github.com/chflame163/ComfyUI_LayerStyle.git
* crop_box: 裁切box数据,在RestoreCropBox节点恢复时使用。
* box_preview: 裁切位置预览图,红色是探测到的范围,绿色是加上保留边框后裁切的范围。
### <a id="table1">CropByMaskV2</a>
CropByMask的V2升级版。支持crop_box输入,方便裁切相同尺寸的图层。
在CropByMask基础上做了如下改变:
![image](image/corp_by_mask_v2_node.png)
* ```mask_for_crop```更名为```mask```。
* 增加```crop_box```可选输入,如果这里有输入将忽略遮罩探测,直接使用此数据裁切。
### <a id="table1">RestoreCropBox</a>
将被[CropByMask](#CropByMask)裁切后的图片恢复到原图。
Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB