From 59bf2701f452ac359c09efd7d7d171e2b424c646 Mon Sep 17 00:00:00 2001 From: chflame163 Date: Sun, 13 Oct 2024 10:55:40 +0800 Subject: [PATCH] fix transformers>=4.43.2 in requirements.txt --- README.MD | 3 +++ README_CN.MD | 4 +++- pyproject.toml | 2 +- requirements.txt | 3 ++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.MD b/README.MD index e62d6d8..c20954f 100644 --- a/README.MD +++ b/README.MD @@ -150,6 +150,8 @@ 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.
+* Due to the high version requirements of the [LlamaVision](#LlamaVision) node for ```transformers```, which affects the loading of some older third-party plugins, so the LayerStyle plugin has lowered the default requirement to 4.43.2. If you need to run LlamaVision, please upgrade to 4.45.0 or above on your own. + * Commit [JoyCaption2](#JoyCaption2) and [JoyCaption2ExtraOptions](#JoyCaption2ExtraOptions) nodes. New dependency packages need to be installed. Use the JoyCaption-alpha-two model for local inference. Can be used to generate prompt words. this node is https://huggingface.co/John6666/joy-caption-alpha-two-cli-mod Implementation in ComfyUI, thank you to the original author. Download models form [BaiduNetdisk](https://pan.baidu.com/s/1dOjbUEacUOhzFitAQ3uIeQ?pwd=4ypv) and [BaiduNetdisk](https://pan.baidu.com/s/1mH1SuW45Dy6Wga7aws5siQ?pwd=w6h5) , @@ -903,6 +905,7 @@ Node Options: ### LlamaVision Use the Llama 3.2 vision model for local inference. Can be used to generate prompt words. part of the code for this node comes from [ComfyUI-PixtralLlamaMolmoVision](https://github.com/SeanScripts/ComfyUI-PixtralLlamaMolmoVision), thank you to the original author. +To use this node, the ```transformers``` need upgraded to 4.45.0 or higher. Download models from [BaiduNetdisk](https://pan.baidu.com/s/18oHnTrkNMiwKLMcUVrfFjA?pwd=4g81) or [huggingface/SeanScripts](https://huggingface.co/SeanScripts/Llama-3.2-11B-Vision-Instruct-nf4/tree/main) , and copy to ```ComfyUI/models/LLM```. ![image](image/llama_vision_example.jpg) diff --git a/README_CN.MD b/README_CN.MD index f45fedf..ab2bd2b 100644 --- a/README_CN.MD +++ b/README_CN.MD @@ -127,12 +127,13 @@ 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```(秋叶整合包) 重新安装依赖包。 +* 鉴于[LlamaVision](#LlamaVision)节点对 ```transformers``` 的要求版本较高而影响某些旧版第三方插件的加载,LayerStyle 插件已将默认要求降低到4.43.2, 如有运行LlamaVision的需求请自行升级至4.45.0以上。 * 添加 [JoyCaption2](#JoyCaption2) 和 [JoyCaption2ExtraOptions](#JoyCaption2ExtraOptions) 节点,使用JoyCaption-alpha-two模型生成提示词。 请从 [百度网盘](https://pan.baidu.com/s/1dOjbUEacUOhzFitAQ3uIeQ?pwd=4ypv) 以及 [百度网盘](https://pan.baidu.com/s/1mH1SuW45Dy6Wga7aws5siQ?pwd=w6h5) , 或者 [huggingface/Orenguteng](https://huggingface.co/Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2/tree/main) 以及 [huggingface/unsloth](https://huggingface.co/unsloth/Meta-Llama-3.1-8B-Instruct/tree/main) 下载整个文件夹,并复制到ComfyUI/models/LLM, 从 [百度网盘](https://pan.baidu.com/s/1pkVymOsDcXqL7IdQJ6lMVw?pwd=v8wp) 或者 [huggingface/google](https://huggingface.co/google/siglip-so400m-patch14-384/tree/main) 下载整个文件夹,并复制到ComfyUI/models/clip, 从 [百度网盘](https://pan.baidu.com/s/12TDwZAeI68hWT6MgRrrK7Q?pwd=d7dh) 或者 [huggingface/John6666](https://huggingface.co/John6666/joy-caption-alpha-two-cli-mod/tree/main)下载 ```cgrkzexw-599808``` 文件夹,并复制到ComfyUI/models/Joy_caption。 -* 添加 [LlamaVision](#LlamaVision) 节点,使用Llama 3.2 视觉模型生成提示词。需要安装新的依赖包并且transformers升级到4.45.0以上。 +* 添加 [LlamaVision](#LlamaVision) 节点,使用Llama 3.2 视觉模型生成提示词。运行这个节点需要transformers升级到4.45.0以上。 请从 [百度网盘](https://pan.baidu.com/s/18oHnTrkNMiwKLMcUVrfFjA?pwd=4g81) 或 [huggingface/SeanScripts](https://huggingface.co/SeanScripts/Llama-3.2-11B-Vision-Instruct-nf4/tree/main)下载整个文件夹,并复制到ComfyUI/models/LLM。 * 添加 [RandomGeneratorV2](#RandomGeneratorV2) 节点,增加最小随机范围和种子选项。 * 添加 [TextJoinV2](#TextJoinV2) 节点,在TextJion基础上增加分隔符选项。 @@ -800,6 +801,7 @@ ImageScaleByAspectRatio的V2升级版 ### LlamaVision 使用Llama 3.2 vision 模型进行本地推理。可以用于生成提示词。本节点部分代码来自[ComfyUI-PixtralLlamaMolmoVision](https://github.com/SeanScripts/ComfyUI-PixtralLlamaMolmoVision),感谢原作者。 +运行这个节点需要transformers升级到4.45.0以上。 请从 [百度网盘](https://pan.baidu.com/s/18oHnTrkNMiwKLMcUVrfFjA?pwd=4g81) 或 [huggingface/SeanScripts](https://huggingface.co/SeanScripts/Llama-3.2-11B-Vision-Instruct-nf4/tree/main)下载整个文件夹,并复制到ComfyUI/models/LLM。 ![image](image/llama_vision_example.jpg) diff --git a/pyproject.toml b/pyproject.toml index 140d628..983fae7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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.76" +version = "1.0.77" license = "MIT" dependencies = ["numpy", "pillow", "torch", "matplotlib", "Scipy", "scikit_image", "scikit_learn", "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", "accelerate", "bitsandbytes", "torchscale", "wandb", "hydra-core", "psd-tools", "inference-cli[yolo-world]", "inference-gpu[yolo-world]", "onnxruntime", "peft"] diff --git a/requirements.txt b/requirements.txt index e27668f..a04cf81 100644 --- a/requirements.txt +++ b/requirements.txt @@ -36,8 +36,9 @@ torchscale wandb psd-tools hydra-core +protobuf>=3.20.3 inference-cli>=0.13.0 inference-gpu[yolo-world]>=0.13.0 bitsandbytes>=0.41.1 -transformers>=4.45.0 +transformers>=4.43.2 peft>=0.12.0