support numpy 2.x

This commit is contained in:
chflame163
2025-03-12 13:51:37 +08:00
parent e7caef7056
commit 725986d718
6 changed files with 6 additions and 8 deletions
+1
View File
@@ -145,6 +145,7 @@ Please try downgrading the ```protobuf``` dependency package to 3.20.3, or set e
**If the dependency package error after updating, please double clicking ```repair_dependency.bat``` (for Official ComfyUI Protable) or ```repair_dependency_aki.bat``` (for ComfyUI-aki-v1.x) in the plugin folder to reinstall the dependency packages.
* Support numpy 2.x dependency package.
* Commit [DeepseekAPI_V2](#DeepseekAPI_V2) noee, supporting AliYun and VolcEngine API.
* Commit [Collage](#Collage) node to collage images into one.
* Commit [DeepSeekAPI](DeepSeekAPI) node, Use DeepSeek API for text inference.
+1
View File
@@ -121,6 +121,7 @@ If this call came from a _pb2.py file, your generated code is out of date and mu
## 更新说明
**如果本插件更新后出现依赖包错误,请双击运行插件目录下的```install_requirements.bat```(官方便携包),或 ```install_requirements_aki.bat```(秋叶整合包) 重新安装依赖包。
* 支持numpy 2.x 依赖包。
* 添加 [DeepseekAPI_V2](#DeepseekAPI_V2) 节点,支持阿里云和火山引擎的deepseek api。
* 添加 [Collage](#Collage) 节点,将多张图片拼合为一张大图。
* 添加 [DeepSeekAPI](DeepSeekAPI) 节点,使用DeepSeek API进行文本推理。
+2 -5
View File
@@ -374,13 +374,10 @@ def chop_image(background_image:Image, layer_image:Image, blend_mode:str, opacit
def chop_image_v2(background_image:Image, layer_image:Image, blend_mode:str, opacity:int) -> Image:
backdrop_prepped = np.asfarray(background_image.convert('RGBA'))
source_prepped = np.asfarray(layer_image.convert('RGBA'))
backdrop_prepped = np.asarray(background_image.convert('RGBA'), dtype=float)
source_prepped = np.asarray(layer_image.convert('RGBA'), dtype=float)
blended_np = BLEND_MODES[blend_mode](backdrop_prepped, source_prepped, opacity / 100)
# final_tensor = (torch.from_numpy(blended_np / 255)).unsqueeze(0)
# return tensor2pil(_tensor)
return Image.fromarray(np.uint8(blended_np)).convert('RGB')
def remove_background(image:Image, mask:Image, color:str) -> Image:
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "comfyui_layerstyle_advance"
description = "The nodes detached from ComfyUI Layer Style are mainly those with complex requirements for dependency packages."
version = "2.0.14"
version = "2.0.15"
license = { text = "MIT License" }
dependencies = ["numpy", "matplotlib", "scikit_image", "scikit_learn", "opencv-contrib-python", "pymatting", "timm", "blend_modes", "transformers", "diffusers", "loguru", "colour-science", "huggingface_hub", "segment_anything", "addict", "omegaconf", "yapf", "wget", "iopath", "mediapipe", "typer_config", "fastapi", "rich", "google-generativeai", "ultralytics", "transparent-background", "accelerate", "onnxruntime", "bitsandbytes", "peft", "protobuf", "hydra-core", "blind-watermark", "qrcode", "pyzbar", "psd-tools", "wandb", "zhipuai", "openai"]
-1
View File
@@ -1,6 +1,5 @@
image-reward
torchscale
numpy<2
onnxruntime
huggingface_hub>=0.23.3
transformers>=4.45.0
+1 -1
View File
@@ -1,4 +1,4 @@
numpy<2.0
numpy
matplotlib
scikit_image
scikit_learn