NumberCalculatorV2 and NumberCalculator add min and max method.
This commit is contained in:
@@ -102,6 +102,7 @@ When this error has occurred, please check the network environment.
|
||||
## Update
|
||||
<font size="4">**If the dependency package error after updating, please reinstall the relevant dependency packages. </font><br />
|
||||
|
||||
* [NumberCalculatorV2](#NumberCalculatorV2) and [NumberCalculator](#NumberCalculator) add the ```min``` and ```max``` method.
|
||||
* Optimize node loading speed.
|
||||
* [Florence2Image2Prompt](#Florence2Image2Prompt) add support for ```thwri/CogFlorence-2-Large-Freeze``` and ```thwri/CogFlorence-2.1-Large``` models. Please download the model files from [BaiduNetdisk](https://pan.baidu.com/s/1hzw9-QiU1vB8pMbBgofZIA?pwd=mfl3) or [huggingface/CogFlorence-2-Large-Freeze](https://huggingface.co/thwri/CogFlorence-2-Large-Freeze/tree/main) and [huggingface/CogFlorence-2.1-Large](https://huggingface.co/thwri/CogFlorence-2.1-Large/tree/main) , then copy it to ```ComfyUI/models/florence2``` folder.
|
||||
* Merge branch from [ClownsharkBatwing](https://github.com/ClownsharkBatwing) "Use GPU for color blend mode", the speed of some layer blends by more than ten times.
|
||||
|
||||
@@ -103,6 +103,7 @@ git clone https://github.com/chflame163/ComfyUI_LayerStyle.git
|
||||
## 更新说明
|
||||
<font size="4">**如果本插件更新后出现依赖包错误,请重新安装相关依赖包。
|
||||
|
||||
* [NumberCalculatorV2](#NumberCalculatorV2) 和 [NumberCalculator](#NumberCalculator) 节点增加 ```min``` 和 ```max``` 方法。
|
||||
* 优化节点加载速度。
|
||||
* [Florence2Image2Prompt](#Florence2Image2Prompt) 增加thwri/CogFlorence-2-Large-Freeze 和 thwri/CogFlorence-2.1-Large 模型支持。请从[百度网盘](https://pan.baidu.com/s/1hzw9-QiU1vB8pMbBgofZIA?pwd=mfl3) 或 [huggingface/CogFlorence-2-Large-Freeze](https://huggingface.co/thwri/CogFlorence-2-Large-Freeze/tree/main) 和 [huggingface/CogFlorence-2.1-Large](https://huggingface.co/thwri/CogFlorence-2.1-Large/tree/main) 下载模型文件并复制到```ComfyUI/models/florence2```文件夹。
|
||||
* 合并来自[ClownsharkBatwing](https://github.com/ClownsharkBatwing)的分支“使用GPU进行颜色混合模式”,某些图层的混合速度提高了十倍以上。
|
||||
|
||||
+12
-2
@@ -143,7 +143,7 @@ class NumberCalculator:
|
||||
pass
|
||||
@classmethod
|
||||
def INPUT_TYPES(self):
|
||||
operator_list = ["+", "-", "*", "/", "**", "//", "%" ]
|
||||
operator_list = ["+", "-", "*", "/", "**", "//", "%", "nth_root", "min", "max"]
|
||||
return {"required": {
|
||||
"a": (any, {}),
|
||||
"b": (any, {}),
|
||||
@@ -167,6 +167,12 @@ class NumberCalculator:
|
||||
ret_value = a ** b
|
||||
if operator == "%":
|
||||
ret_value = a % b
|
||||
if operator == "nth_root":
|
||||
ret_value = a ** (1/b)
|
||||
if operator == "min":
|
||||
ret_value = min(a, b)
|
||||
if operator == "max":
|
||||
ret_value = max(a, b)
|
||||
if operator == "/":
|
||||
if b != 0:
|
||||
ret_value = a / b
|
||||
@@ -185,7 +191,7 @@ class NumberCalculatorV2:
|
||||
pass
|
||||
@classmethod
|
||||
def INPUT_TYPES(self):
|
||||
operator_list = ["+", "-", "*", "/", "**", "//", "%" , "nth_root"]
|
||||
operator_list = ["+", "-", "*", "/", "**", "//", "%" , "nth_root", "min", "max"]
|
||||
|
||||
return {
|
||||
"required":
|
||||
@@ -239,6 +245,10 @@ class NumberCalculatorV2:
|
||||
ret_value = a % b
|
||||
if operator == "nth_root":
|
||||
ret_value = a ** (1/b)
|
||||
if operator == "min":
|
||||
ret_value = min(a, b)
|
||||
if operator == "max":
|
||||
ret_value = max(a, b)
|
||||
if operator == "/":
|
||||
if b != 0:
|
||||
ret_value = a / b
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[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 = "1.0.26"
|
||||
version = "1.0.27"
|
||||
license = "MIT"
|
||||
dependencies = ["numpy", "pillow", "torch", "matplotlib", "Scipy", "scikit_image", "opencv-contrib-python", "pymatting", "segment_anything", "timm", "addict", "yapf", "colour-science", "wget", "mediapipe", "loguru", "typer_config", "fastapi", "rich", "google-generativeai", "diffusers", "omegaconf", "tqdm", "transformers", "kornia", "image-reward", "ultralytics", "blend_modes", "blind-watermark", "qrcode", "pyzbar", "transparent-background", "huggingface_hub", "psd-tools"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user