move BenUltra and LoadBenModel to LayerStyleAdvance

This commit is contained in:
chflame163
2024-12-07 13:34:05 +08:00
parent 25bf27978a
commit eacb7ed3b6
5 changed files with 9 additions and 1135 deletions
+4 -33
View File
@@ -4,7 +4,7 @@
Split some nodes of the dependencies that are prone to problems into [ComfyUI_LayerStyle_Advance](https://github.com/chflame163/ComfyUI_LayerStyle_Advance) repository. Including:
LayerMask: BiRefNetUltra, LayerMask: BiRefNetUltraV2, LayerMask: LoadBiRefNetModel, LayerMask: LoadBiRefNetModelV2,
LayerMask: EVFSAMUltra, LayerMask: Florence2Ultra, LayerMask: LoadFlorence2Model, LayerUtility: Florence2Image2Prompt,
LayerUtility: GetColorTone, LayerUtility: GetColorToneV2, LayerMask: HumanPartsUltra,
LayerUtility: GetColorTone, LayerUtility: GetColorToneV2, LayerMask: HumanPartsUltra, LayerMask: BenUltra, LayerMask: LoadBenModel,
LayerUtility: ImageAutoCrop, LayerUtility: ImageAutoCropV2, LayerUtility: ImageAutoCropV3,
LayerUtility: ImageRewardFilter, LayerUtility: LoadJoyCaption2Model, LayerUtility: JoyCaption2Split,
LayerUtility: JoyCaption2, LayerUtility: JoyCaption2ExtraOptions, LayerUtility: LaMa,
@@ -56,14 +56,14 @@ Some JSON workflow files in the ```workflow``` directory, That's examples of
git clone https://github.com/chflame163/ComfyUI_LayerStyle.git
```
* Or download the zip file and extracted, copy the resulting folder to ```ComfyUI\custom_nodes```
* Or download the zip file and extracted, copy the resulting folder to ```ComfyUI\custom_ Nodes```
### Install dependency packages
* for ComfyUI official portable package, double-click the ```install_requirements.bat``` in the plugin directory, for Aki ComfyUI package double-click on the ```install_requirements_aki.bat``` in the plugin directory, and wait for the installation to complete.
* Or install dependency packages, open the cmd window in the ComfyUI_LayerStyle plugin directory like
```ComfyUI\custom_nodes\ComfyUI_LayerStyle``` and enter the following command,
```ComfyUI\custom_ Nodes\ComfyUI_LayerStyle``` and enter the following command,
  for ComfyUI official portable package, type:
@@ -76,7 +76,7 @@ Some JSON workflow files in the ```workflow``` directory, That's examples of
```
..\..\python\python.exe -s -m pip install -r requirements.txt
.\repair_dependency_aki.bat
.\repair_dependency.bat
```
* Restart ComfyUI.
@@ -1702,35 +1702,6 @@ On the basis of RemBgUltra, the following changes have been made:
### <a id="table1">BenUltra</a>
It is the implementation of [PramaLLC/BEN](https://huggingface.co/PramaLLC/BEN) project in ComfyUI. Thank you to the original author.
Download the ```BEN_Base.pth``` and ```config.json``` from [huggingface](https://huggingface.co/PramaLLC/BEN/tree/main) or [BaiduNetdisk](https://pan.baidu.com/s/17mdBxfBl_R97mtNHuiHsxQ?pwd=2jn3) and copy to ```ComfyUI/models/BEN``` folder.
![image](image/ben_ultra_example.jpg)
Node Options:
![image](image/ben_ultra_node.jpg)
* ben_model: Ben model input.
* image: Image input.
* detail_method: Edge processing methods. provides VITMatte, VITMatte(local), PyMatting, GuidedFilter. If the model has been downloaded after the first use of VITMatte, you can use VITMatte (local) afterwards.
* detail_erode: Mask the erosion range inward from the edge. the larger the value, the larger the range of inward repair.
* detail_dilate: The edge of the mask expands outward. the larger the value, the wider the range of outward repair.
* black_point: Edge black sampling threshold.
* white_point: Edge white sampling threshold.
* process_detail: Set to false here will skip edge processing to save runtime.
* max_megapixels: Set the maximum size for VitMate operations.
### <a id="table1">LoadBenModel</a>
Load the BEN model.
Node Options:
![image](image/load_ben_model_node.jpg)
* model: Select the model. Currently, only the Ben_Sase model is available for selection.
### <a id="table1">SegformerB2ClothesUltra</a>
![image](image/segformer_ultra_example.jpg)
+3 -31
View File
@@ -4,7 +4,7 @@
分拆部分依赖易出问题的节点至[ComfyUI_LayerStyle_Advance](https://github.com/chflame163/ComfyUI_LayerStyle_Advance)仓库。包括下列节点:
LayerMask: BiRefNetUltra, LayerMask: BiRefNetUltraV2, LayerMask: LoadBiRefNetModel, LayerMask: LoadBiRefNetModelV2,
LayerMask: EVFSAMUltra, LayerMask: Florence2Ultra, LayerMask: LoadFlorence2Model, LayerUtility: Florence2Image2Prompt,
LayerUtility: GetColorTone, LayerUtility: GetColorToneV2, LayerMask: HumanPartsUltra,
LayerUtility: GetColorTone, LayerUtility: GetColorToneV2, LayerMask: HumanPartsUltra, LayerMask: BenUltra, LayerMask: LoadBenModel,
LayerUtility: ImageAutoCrop, LayerUtility: ImageAutoCropV2, LayerUtility: ImageAutoCropV3,
LayerUtility: ImageRewardFilter, LayerUtility: LoadJoyCaption2Model, LayerUtility: JoyCaption2Split,
LayerUtility: JoyCaption2, LayerUtility: JoyCaption2ExtraOptions, LayerUtility: LaMa,
@@ -19,7 +19,7 @@ LayerUtility: AddBlindWaterMark, LayerUtility: ShowBlindWaterMark, LayerMask: Yo
如果最近更新了插件,请安装[ComfyUI_LayerStyle_Advance](https://github.com/chflame163/ComfyUI_LayerStyle_Advance)保证之前的工作流不会缺失节点。
如果因为拆分仓库导致问题,请回滚插件版本到```3d4a3526a9d1a19671a133e9215077bda520ee5d```
在插件目录打开终端,使用下列命令回滚版本:
在插件目录打开终端,使用下列命令回滚版本:****
```
git reset --hard 3d4a3526a9d1a19671a133e9215077bda520ee5d
```
@@ -66,7 +66,7 @@ git clone https://github.com/chflame163/ComfyUI_LayerStyle.git
```
..\..\python\python.exe -s -m pip install -r requirements.txt
.\repair_dependency_aki.bat
.\repair_dependency.bat
```
* 重新打开ComfyUI。
@@ -1504,34 +1504,6 @@ RemBgUltra的V2升级版,增加了VITMatte边缘处理方法。
* device: 设置是否使用cuda。
* max_megapixels: 设置vitmatte运算的最大尺寸。
### <a id="table1">BenUltra</a>
是[PramaLLC/BEN](https://huggingface.co/PramaLLC/BEN) 项目在ComfyUI中的实现。感谢原作者。
从 [huggingface](https://huggingface.co/PramaLLC/BEN/tree/main) 或 [百度网盘](https://pan.baidu.com/s/17mdBxfBl_R97mtNHuiHsxQ?pwd=2jn3)下载```BEN_Base.pth``` 和 ```config.json``` 两个文件并复制到 ```ComfyUI/models/BEN```文件夹。
![image](image/ben_ultra_example.jpg)
节点选项说明:
![image](image/ben_ultra_node.jpg)
* ben_model: Ben模型输入。
* image: 图片输入。
* detail_method: 边缘处理方法。提供了VITMatte, VITMatte(local), PyMatting, GuidedFilter。如果首次使用VITMatte后模型已经下载,之后可以使用VITMatte(local)。
* detail_erode: 遮罩边缘向内侵蚀范围。数值越大,向内修复的范围越大。
* detail_dilate: 遮罩边缘向外扩张范围。数值越大,向外修复的范围越大。
* black_point: 边缘黑色采样阈值。
* white_point: 边缘白色采样阈值。
* process_detail: 此处设为False将跳过边缘处理以节省运行时间。
* max_megapixels: 设置vitmatte运算的最大尺寸。
### <a id="table1">LoadBenModel</a>
加载BEN模型。
节点选项说明:
![image](image/load_ben_model_node.jpg)
* model: 选择模型。目前仅有Ben_Base 模型可选。
### <a id="table1">SegformerB2ClothesUltra</a>
![image](image/segformer_ultra_example.jpg)
为人物生成脸、头发、手臂、腿以及服饰的遮罩,主要用于分割服装。模型分割代码来自[StartHua](https://github.com/StartHua/Comfyui_segformer_b2_clothes),感谢原作者。
-1068
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,9 +1,9 @@
[project]
name = "comfyui_layerstyle"
description = "A set of nodes for ComfyUI it generate image like Adobe Photoshop's Layer Style. the Drop Shadow is first completed node, and follow-up work is in progress."
version = "2.0.3"
version = "2.0.4"
license = "MIT"
dependencies = ["numpy", "pillow", "torch", "matplotlib", "Scipy", "scikit_image", "scikit_learn", "opencv-contrib-python", "pymatting", "timm", "colour-science", "transformers", "blend_modes", "huggingface_hub", "diffusers", "loguru", "wandb"]
dependencies = ["numpy", "pillow", "torch", "matplotlib", "Scipy", "scikit_image", "scikit_learn", "opencv-contrib-python", "pymatting", "timm", "colour-science", "transformers", "blend_modes", "huggingface_hub", "diffusers", "loguru"]
[project.urls]
Repository = "https://github.com/chflame163/ComfyUI_LayerStyle"
-1
View File
@@ -14,4 +14,3 @@ blend_modes
huggingface_hub>=0.23.4
diffusers
loguru
wandb