[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-chflame163--ComfyUI_LayerStyle_Advance":3,"tool-chflame163--ComfyUI_LayerStyle_Advance":62},[4,18,26,35,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107888,2,"2026-04-06T11:32:50",[14,15,13],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":32,"last_commit_at":41,"category_tags":42,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[43,14],"插件",{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":10,"last_commit_at":50,"category_tags":51,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[52,15,13,14],"语言模型",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":17},4292,"Deep-Live-Cam","hacksider\u002FDeep-Live-Cam","Deep-Live-Cam 是一款专注于实时换脸与视频生成的开源工具，用户仅需一张静态照片，即可通过“一键操作”实现摄像头画面的即时变脸或制作深度伪造视频。它有效解决了传统换脸技术流程繁琐、对硬件配置要求极高以及难以实时预览的痛点，让高质量的数字内容创作变得触手可及。\n\n这款工具不仅适合开发者和技术研究人员探索算法边界，更因其极简的操作逻辑（仅需三步：选脸、选摄像头、启动），广泛适用于普通用户、内容创作者、设计师及直播主播。无论是为了动画角色定制、服装展示模特替换，还是制作趣味短视频和直播互动，Deep-Live-Cam 都能提供流畅的支持。\n\n其核心技术亮点在于强大的实时处理能力，支持口型遮罩（Mouth Mask）以保留使用者原始的嘴部动作，确保表情自然精准；同时具备“人脸映射”功能，可同时对画面中的多个主体应用不同面孔。此外，项目内置了严格的内容安全过滤机制，自动拦截涉及裸露、暴力等不当素材，并倡导用户在获得授权及明确标注的前提下合规使用，体现了技术发展与伦理责任的平衡。",88924,"2026-04-06T03:28:53",[14,15,13,61],"视频",{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":74,"owner_company":74,"owner_location":76,"owner_email":74,"owner_twitter":74,"owner_website":74,"owner_url":77,"languages":78,"stars":105,"forks":106,"last_commit_at":107,"license":108,"difficulty_score":32,"env_os":109,"env_gpu":110,"env_ram":111,"env_deps":112,"category_tags":125,"github_topics":74,"view_count":32,"oss_zip_url":74,"oss_zip_packed_at":74,"status":17,"created_at":126,"updated_at":127,"faqs":128,"releases":159},5091,"chflame163\u002FComfyUI_LayerStyle_Advance","ComfyUI_LayerStyle_Advance","The nodes detached from [ComfyUI Layer Style](https:\u002F\u002Fgithub.com\u002Fchflame163\u002FComfyUI_LayerStyle) are mainly those with complex requirements for dependency packages.","ComfyUI_LayerStyle_Advance 是 ComfyUI Layer Style 插件的进阶扩展包，专门剥离并独立发布了那些对依赖环境要求较为复杂的节点。它主要解决了用户在尝试使用高级图层样式功能时，常因缺少特定第三方库（如 psd_tools、hydra_core 等）或模型文件而导致安装失败、节点无法加载的痛点。\n\n通过提供一键式的依赖安装脚本和清晰的模型下载指引，该工具大幅降低了复杂节点的部署门槛，让用户能更专注于创意工作流本身。其技术亮点在于支持专业的 PSD 文件解析与处理，并集成了如 Ultra 系列节点所需的高精度 vitmatte 抠图模型，实现了更精细的图像合成与控制。\n\n这款工具非常适合已经熟悉 ComfyUI 基础操作，希望在工作流中引入专业级图层混合、蒙版处理及 PSD 交互功能的设计师、数字艺术家及 AI 绘画爱好者。对于需要稳定运行复杂自定义节点的研究人员而言，它也是一个可靠的模块化解决方案。只需按照指引配置好环境与模型，即可轻松解锁更强大的图像编辑能力。","# ComfyUI Layer Style Advance\n\n[中文说明点这里](.\u002FREADME_CN.MD)    \n\n\nThe nodes detached from [ComfyUI Layer Style](https:\u002F\u002Fgithub.com\u002Fchflame163\u002FComfyUI_LayerStyle) are mainly those with complex requirements for dependency packages.\n \n \n\n## Example workflow\n\nSome JSON workflow files in the    ```workflow``` directory, That's examples of how these nodes can be used in ComfyUI.\n\n## How to install\n\n(Taking ComfyUI official portable package and Aki ComfyUI package as examples, please modify the dependency environment directory for other ComfyUI environments)\n\n### Install plugin\n\n* Recommended use ComfyUI Manager for installation.\n\n* Or open the cmd window in the plugin directory of ComfyUI, like ```ComfyUI\\custom_nodes```，type    \n  \n  ```\n  git clone https:\u002F\u002Fgithub.com\u002Fchflame163\u002FComfyUI_LayerStyle_Advance.git\n  ```\n\n* Or download the zip file and extracted, copy the resulting folder to ```ComfyUI\\custom_nodes```    \n\n### Install dependency packages\n\n* 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.\n\n* Or install dependency packages, open the cmd window in the ComfyUI_LayerStyle plugin directory like \n  ```ComfyUI\\custom_nodes\\ComfyUI_LayerStyle_Advance``` and enter the following command,\n\n&emsp;&emsp;for ComfyUI official portable package, type:\n\n```\n..\\..\\..\\python_embeded\\python.exe -s -m pip install .\\whl\\docopt-0.6.2-py2.py3-none-any.whl\n..\\..\\..\\python_embeded\\python.exe -s -m pip install .\\whl\\hydra_core-1.3.2-py3-none-any.whl\n..\\..\\..\\python_embeded\\python.exe -s -m pip install -r requirements.txt\n.\\repair_dependency.bat\n```\n\n&emsp;&emsp;for Aki ComfyUI package, type:\n\n```\n..\\..\\python\\python.exe -s -m pip install .\\whl\\docopt-0.6.2-py2.py3-none-any.whl\n..\\..\\python\\python.exe -s -m pip install .\\whl\\hydra_core-1.3.2-py3-none-any.whl\n..\\..\\python\\python.exe -s -m pip install -r requirements.txt\n.\\repair_dependency.bat\n```\n\n* Restart ComfyUI.\n\n### Download Model Files\n\nChinese domestic users from  [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1T_uXMX3OKIWOJLPuLijrgA?pwd=1yye) or [QuarkNetdisk](https:\u002F\u002Fpan.quark.cn\u002Fs\u002F4802d6bca7cb) , other users from [huggingface.co\u002Fchflame163\u002FComfyUI_LayerStyle](https:\u002F\u002Fhuggingface.co\u002Fchflame163\u002FComfyUI_LayerStyle\u002Ftree\u002Fmain)  \ndownload all files and copy them to ```ComfyUI\\models``` folder. This link provides all the model files required for this plugin.\nOr download the model file according to the instructions of each node.    \nSome nodes named \"Ultra\" will use the vitmatte model, download the [vitmatte model](https:\u002F\u002Fhuggingface.co\u002Fhustvl\u002Fvitmatte-small-composition-1k\u002Ftree\u002Fmain) and copy to ```ComfyUI\u002Fmodels\u002Fvitmatte``` folder, it is also included in the download link above. \n\n## Common Issues\n\nIf the node cannot load properly or there are errors during use, please check the error message in the ComfyUI terminal window. The following are common errors and their solutions.\n\n### Warning: xxxx.ini not found, use default xxxx..\n\nThis warning message indicates that the ini file cannot be found and does not affect usage. If you do not want to see these warnings, please modify all ```*.ini.example``` files in the plugin directory to ```*.ini```.\n\n### ModuleNotFoundError: No module named 'psd_tools'\n\nThis error is that the ```psd_tools``` were not installed correctly.   \n\nSolution:\n\n* Close ComfyUI and open the terminal window in the plugin directory and execute the following command:\n  ```..\u002F..\u002F..\u002Fpython_embeded\u002Fpython.exe -s -m pip install psd_tools```\n  If error occurs during the installation of psd_tool, such as ```ModuleNotFoundError: No module named 'docopt'``` , please download [docopt's whl](https:\u002F\u002Fwww.piwheels.org\u002Fproject\u002Fdocopt\u002F) and manual install it. \n  execute the following command in terminal window:\n  ```..\u002F..\u002F..\u002Fpython_embeded\u002Fpython.exe -s -m pip install path\u002Fdocopt-0.6.2-py2.py3-none-any.whl``` the ```path``` is path name of whl file.\n\n### Cannot import name 'guidedFilter' from 'cv2.ximgproc'\n\nThis error is caused by incorrect version of the ```opencv-contrib-python``` package，or this package is overwriteen by other opencv packages. \n\n### NameError: name 'guidedFilter' is not defined\n\nThe reason for the problem is the same as above.\n\n### Cannot import name 'VitMatteImageProcessor' from 'transformers'\n\nThis error is caused by the low version of ```transformers``` package. \n\n### insightface Loading very slow\n\nThis error is caused by the low version of ```protobuf``` package. \n\n#### For the issues with the above three dependency packages, please double click ```repair_dependency.bat``` (for Official ComfyUI Protable) or  ```repair_dependency_aki.bat``` (for ComfyUI-aki-v1.x) in the plugin folder to automatically fix them.\n\n### onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasn't able to be loaded. Please install the correct version of CUDA and cuDNN as mentioned in the GPU requirements page\n\nSolution:\nReinstall the  ```onnxruntime``` dependency package.\n\n### Error loading model xxx: We couldn't connect to huggingface.co ...\n\nCheck the network environment. If you cannot access huggingface.co normally in China, try modifying the huggingface_hub package to force the use hf_mirror.\n\n* Find ```constants.py``` in the directory of ```huggingface_hub``` package (usually ```Lib\u002Fsite packages\u002Fhuggingface_hub``` in the virtual environment path),\n  Add a line after ```import os```\n  \n  ```\n  os.environ['HF_ENDPOINT'] = 'https:\u002F\u002Fhf-mirror.com'\n  ```\n\n### ValueError: Trimap did not contain foreground values (xxxx...)\n\nThis error is caused by the mask area being too large or too small when using the ```PyMatting``` method to handle the mask edges.    \n\nSolution:\n\n* Please adjust the parameters to change the effective area of the mask. Or use other methods to handle the edges.\n\n### Requests.exceptions.ProxyError: HTTPSConnectionPool(xxxx...)\n\nWhen this error has occurred, please check the network environment.\n\n### UnboundLocalError: local variable 'clip_processor' referenced before assignment\n### UnboundLocalError: local variable 'text_model' referenced before assignment\nIf this error occurs when executing ```JoyCaption2``` node and it has been confirmed that the model file has been placed in the correct directory, \nplease check the ```transformers``` dependency package version is at least 4.43.2 or higher.\nIf ```transformers``` version is higher than or equal to 4.45.0, and also have error message:\n```\nError loading models: De️️scriptors cannot be created directly.                                                                                           \nIf this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.                                \n......\n```\nPlease try downgrading the ```protobuf``` dependency package to 3.20.3, or set environment variables: ```PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python```.\n\n\n## Update\n\n**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.    \n\n* Fix the issue where Florence2 run with higher versions of Transformers, this solution comes from [kijai](https:\u002F\u002Fgithub.com\u002Fkijai\u002FComfyUI-Florence2), Thanks to @flybirdxx for feedback.         \n  After updating plugin, find ```modeling_florence2.py``` and ```configuration_florence2.py``` from the ```florence2_models``` folder, copy and overwrite them to the model folder in ```ComfyUI\u002Fmodels\u002Fflorence2```.\n* Commit [JimengImageToImageAPI](#JimengImageToImageAPI) node, edit images using the Instant Dreaming Image 3.0 API. Create an account on [Volcano Engine](#https:\u002F\u002Fconsole.volcengine.com\u002Fiam\u002Fkeymanage) and apply for API AccessKeyID and SecretAccessKey. Fill them into the ```api_key.ini``` directory in the plugin directory.\n* Commit [SAM2UltraV2](SAM2UltraV2) and [LoadSAM2Model](LoadSAM2Model) nodes, Change the SAM model to an external input to save resources when using multiple nodes.\n* Commit [JoyCaptionBetaOne](JoyCaptionBetaOne), [LoadJoyCaptionBeta1Model](LoadJoyCaptionBeta1Model), [JoyCaptionBeta1ExtraOptions](JoyCaptionBeta1ExtraOptions) nodes, Generate prompt words using the JoyCaption Beta One model.    \n* Commit [SaveImagePLusV2](SaveImagePlusV2) node, add custom file names and setting up the dpi of image.\n* Commit [GeminiImageEdit](#GeminiImageEdit) node, support using gemini-2.0-flash-exp-image-generation API for image editing.\n* Commit [GeminiV2](#GeminiV2) and [ObjectDetectorGeminiV2](#ObjectDetectorGeminiV2) nodes, used google-genai dependency package that supports the gemini-2.0-flash-exp and gemini-2.5-pro-exp-03-25 models.\n* Add QuarkNetdisk model download link.\n* Support numpy 2.x dependency package.\n* Commit [DeepseekAPI_V2](#DeepseekAPI_V2) noee, supporting AliYun and VolcEngine API.\n* Commit [Collage](#Collage) node to collage images into one.\n* Commit [DeepSeekAPI](DeepSeekAPI) node, Use DeepSeek API for text inference.\n* Commit [SegmentAnythingUltraV3](#SegmentAnythingUltraV3) and [LoadSegmentAnythingModels](#LoadSegmentAnythingModels) nodes, Avoid duplicating model loading when using multiple SAM nodes.\n* Commit [ZhipuGLM4](#ZhipuGLM4) and [ZhipuGLM4V](#ZhipuGLM4V) nodes, Use the Zhipu API for textual and visual inference. Among the current Zhipu models, GLM-4-Flash and glm-4v-flash models are free.\nApply for an API key for free at [https:\u002F\u002Fbigmodel.cn\u002Fusercenter\u002Fproj-mgmt\u002Fapikeys](https:\u002F\u002Fbigmodel.cn\u002Fusercenter\u002Fproj-mgmt\u002Fapikeys), fill your API key in ```zhipu_api_key=```.\n* Commit [Gemini](#Gemini) node, Use Gemini API for text or visual inference.\n* Commit [ObjectDetectorGemini](#ObjectDetectorGemini) node, Use Gemini API for object detection.\n* Commit [DrawBBOXMaskV2](#DrawBBOXMaskV2) node, can draw rounded rectangle masks.\n* Commit [SmolLM2](#SmolLM2), [SmolVLM](#SmolVLM), [LoadSmolLM2Model](#LoadSmolLM2Model) and [LoadSmolVLMModel](#LoadSmolVLMModel) nodes, use SMOL model for text inference and image recognition.\ndownload the model file from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1_jeNosYdDqqHkzpnSNGfDQ?pwd=to5b) or [huggingface](https:\u002F\u002Fhuggingface.co\u002Fchflame163\u002FComfyUI_LayerStyle\u002Ftree\u002Fmain\u002FComfyUI\u002Fmodels\u002Fsmol) and copy to ```ComfyUI\u002Fmodels\u002Fsmol``` folder.\n* Florence2 add support [gokaygokay\u002FFlorence-2-Flux-Large](https:\u002F\u002Fhuggingface.co\u002Fgokaygokay\u002FFlorence-2-Flux-Large) and [gokaygokay\u002FFlorence-2-Flux](https:\u002F\u002Fhuggingface.co\u002Fgokaygokay\u002FFlorence-2-Flux) models, \ndownload Florence-2-Flux-Large and Florence-2-Flux folder from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1wBwJZjgMUKt0zluLAetMOQ?pwd=d6fb) or [huggingface](https:\u002F\u002Fhuggingface.co\u002Fchflame163\u002FComfyUI_LayerStyle\u002Ftree\u002Fmain\u002FComfyUI\u002Fmodels\u002Fflorence2) and copy to ```ComfyUI\\models\\florence2`` folder.\n* Discard the dependencies required for the [ObjectDetector YOLOWorld](#ObjectDetectorYOLOWorld) node from the requirements. txt file. To use this node, please manually install the dependency package.\n* Strip some nodes from [ComfyUI Layer Style](https:\u002F\u002Fgithub.com\u002Fchflame163\u002FComfyUI_LayerStyle) to this repository.\n\n\n## Description\n\n### \u003Ca id=\"table1\">Collage\u003C\u002Fa>\nRandomly collage the input images into one large image.\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_af645642ddc2.jpg)    \n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_81e256eac369.jpg)    \n\n* Add multiple languages and increase support for 5 languages: Chinese, French, Japanese, Korean and Russian. This feature producted by [ComfyUI-Globalization-Node-Translation](https:\u002F\u002Fgithub.com\u002Fyamanacn\u002FComfyUI-Globalization-Node-Translation), thank you to the original author.\n* images: The input images.\n* florence2_model: Optional input for object recognition and cropping.\n* canvas_width: Output the width of the image.\n* canvas_height: Output the height of the image.\n* border_width: The border width.\n* rounded_rect_radius: The border fillet radius.\n* uniformity: The randomness of image stitching size. The value range is 0-1, and the larger the value, the greater the randomness of the size.\n* background_color: The background color.\n* seed: The seed of random number.\n* control_after_generate: Seed change options. If this option is fixed, the generated random number will always be the same.\n* object_prompt: When connecting to florence2_model, fill in the prompt words for object recognition here.\n\n\n### \u003Ca id=\"table1\">QWenImage2Prompt\u003C\u002Fa>\n\nInference the prompts based on the image. this node is repackage of the [ComfyUI_VLM_nodes](https:\u002F\u002Fgithub.com\u002Fgokayfem\u002FComfyUI_VLM_nodes)'s ```UForm-Gen2 Qwen Node```,  thanks to the original author.\nDownload model files from [huggingface](https:\u002F\u002Fhuggingface.co\u002Funum-cloud\u002Fuform-gen2-qwen-500m) or [Baidu Netdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1oRkUoOKWaxGod_XTJ8NiTA?pwd=d5d2) to ```ComfyUI\u002Fmodels\u002FLLavacheckpoints\u002Ffiles_for_uform_gen2_qwen``` folder.\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_ef5122ddb1db.jpg)    \n\nNode Options:   \n\n* question: Prompt of UForm-Gen-QWen model.\n\n\n### \u003Ca id=\"table1\">LlamaVision\u003C\u002Fa>\nUse 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:\u002F\u002Fgithub.com\u002FSeanScripts\u002FComfyUI-PixtralLlamaMolmoVision), thank you to the original author.\nTo use this node, the ```transformers``` need upgraded to 4.45.0 or higher.\nDownload models from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F18oHnTrkNMiwKLMcUVrfFjA?pwd=4g81) or [huggingface\u002FSeanScripts](https:\u002F\u002Fhuggingface.co\u002FSeanScripts\u002FLlama-3.2-11B-Vision-Instruct-nf4\u002Ftree\u002Fmain) , and copy to ```ComfyUI\u002Fmodels\u002FLLM```.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_8609d8f539c7.jpg)    \n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_daa651905eb3.jpg)    \n\n* image: Image input.\n* model: Currently, only the \"Llama-3.2-11B-Vision-Instruct-nf4\" is available.\n* system_prompt: System prompt words for LLM model.\n* user_prompt: User prompt words for LLM model.\n* max_new_tokens: max_new_tokens for LLM model.\n* do_sample: do_sample for LLM model.\n* top-p: top_p for LLM model. \n* top_k: top_k for LLM model.\n* stop_strings: The stop strings.\n* seed: The seed of random number.\n* control_after_generate: Seed change options. If this option is fixed, the generated random number will always be the same.\n* include_prompt_in_output: Does the output contain prompt words.\n* cache_model: Whether to cache the model.\n\n### \u003Ca id=\"table1\">JoyCaption2\u003C\u002Fa>\nUse the JoyCaption-alpha-two model for local inference. Can be used to generate prompt words. this node is https:\u002F\u002Fhuggingface.co\u002FJohn6666\u002Fjoy-caption-alpha-two-cli-mod Implementation in ComfyUI, thank you to the original author.\nDownload models form [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1dOjbUEacUOhzFitAQ3uIeQ?pwd=4ypv) and [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1mH1SuW45Dy6Wga7aws5siQ?pwd=w6h5) , \nor [huggingface\u002FOrenguteng](https:\u002F\u002Fhuggingface.co\u002FOrenguteng\u002FLlama-3.1-8B-Lexi-Uncensored-V2\u002Ftree\u002Fmain) and [huggingface\u002Funsloth](https:\u002F\u002Fhuggingface.co\u002Funsloth\u002FMeta-Llama-3.1-8B-Instruct\u002Ftree\u002Fmain) , then copy to ```ComfyUI\u002Fmodels\u002FLLM```,\nDownload models from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1pkVymOsDcXqL7IdQJ6lMVw?pwd=v8wp) or [huggingface\u002Fgoogle](https:\u002F\u002Fhuggingface.co\u002Fgoogle\u002Fsiglip-so400m-patch14-384\u002Ftree\u002Fmain) , and copy to ```ComfyUI\u002Fmodels\u002Fclip```,\nDonwload the ```cgrkzexw-599808``` folder from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F12TDwZAeI68hWT6MgRrrK7Q?pwd=d7dh) or [huggingface\u002FJohn6666](https:\u002F\u002Fhuggingface.co\u002FJohn6666\u002Fjoy-caption-alpha-two-cli-mod\u002Ftree\u002Fmain) , and copy to ```ComfyUI\u002Fmodels\u002FJoy_caption```。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_39bb8846d322.jpg)    \n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_897774d9a1f5.jpg)    \n\n* image: Image input.\n* extra_options: Input the extra_options.\n* llm_model: There are two LLM models to choose, Orenguteng\u002FLlama-3.1-8B-Lexi-Uncensored-V2 and unsloth\u002FMeta-Llama-3.1-8B-Instruct.\n* device: Model loading device. Currently, only CUDA is supported.\n* dtype: Model precision, nf4 and bf16.\n* vlm_lora: Whether to load text_madel.\n* caption_type: Caption type options, including: \"Descriptive\", \"Descriptive (Informal)\", \"Training Prompt\", \"MidJourney\", \"Booru tag list\", \"Booru-like tag list\", \"Art Critic\", \"Product Listing\", \"Social Media Post\".\n* caption_length: The length of caption.\n* user_prompt: User prompt words for LLM model. If there is content here, it will overwrite all the settings for caption_type and extra_options.\n* max_new_tokens: The max_new_token parameter of LLM.\n* do_sample: The do_sample parameter of LLM.\n* top-p: The top_p parameter of LLM.\n* temperature: The temperature parameter of LLM.\n* cache_model: Whether to cache the model.\n\n### \u003Ca id=\"table1\">JoyCaption2Split\u003C\u002Fa>\nThe node of JoyCaption2 separate model loading and inference, and when multiple JoyCaption2 nodes are used, the model can be shared to improve efficiency.\n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_de4235c4eedd.jpg)    \n\n* image: Image input.\n* joy2_model: The JoyCaption model input.\n* extra_options: Input the extra_options.\n* caption_type: Caption type options, including: \"Descriptive\", \"Descriptive (Informal)\", \"Training Prompt\", \"MidJourney\", \"Booru tag list\", \"Booru-like tag list\", \"Art Critic\", \"Product Listing\", \"Social Media Post\".\n* caption_length: The length of caption.\n* user_prompt: User prompt words for model. If there is content here, it will overwrite all the settings for caption_type and extra_options.\n* max_new_tokens: The max_new_token parameter of model.\n* do_sample: The do_sample parameter of model.\n* top-p: The top_p parameter of model.\n* temperature: The temperature parameter of model.\n\n### \u003Ca id=\"table1\">LoadJoyCaption2Model\u003C\u002Fa>\nJoyCaption2's model loading node, used in conjunction with JoyCaption2Split.\n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d47183d75cf5.jpg)    \n\n* llm_model: There are two LLM models to choose, Orenguteng\u002FLlama-3.1-8B-Lexi-Uncensored-V2 and unsloth\u002FMeta-Llama-3.1-8B-Instruct.\n* device: Model loading device. Currently, only CUDA is supported.\n* dtype: Model precision, nf4 and bf16.\n* vlm_lora: Whether to load text_madel.\n\n### \u003Ca id=\"table1\">JoyCaption2ExtraOptions\u003C\u002Fa>\nThe extra_options parameter node of JoyCaption2.\n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_c35d63e2d04c.jpg)    \n\n* refer_character_name: If there is a person\u002Fcharacter in the image you must refer to them as {name}.\n* exclude_people_info: Do NOT include information about people\u002Fcharacters that cannot be changed (like ethnicity, gender, etc), but do still include changeable attributes (like hair style).\n* include_lighting: Include information about lighting.\n* include_camera_angle: Include information about camera angle.\n* include_watermark: Include information about whether there is a watermark or not.\n* include_JPEG_artifacts: Include information about whether there are JPEG artifacts or not.\n* include_exif: If it is a photo you MUST include information about what camera was likely used and details such as aperture, shutter speed, ISO, etc.\n* exclude_sexual: Do NOT include anything sexual; keep it PG.\n* exclude_image_resolution: Do NOT mention the image's resolution.\n* include_aesthetic_quality: You MUST include information about the subjective aesthetic quality of the image from low to very high.\n* include_composition_style: Include information on the image's composition style, such as leading lines, rule of thirds, or symmetry.\n* exclude_text: Do NOT mention any text that is in the image.\n* specify_depth_field: Specify the depth of field and whether the background is in focus or blurred.\n* specify_lighting_sources: If applicable, mention the likely use of artificial or natural lighting sources.\n* do_not_use_ambiguous_language: Do NOT use any ambiguous language.\n* include_nsfw: Include whether the image is sfw, suggestive, or nsfw.\n* only_describe_most_important_elements: ONLY describe the most important elements of the image.\n* character_name: Person\u002FCharacter Name, if choice ```refer_character_name```.\n\n### \u003Ca id=\"table1\">JoyCaptionBetaOne\u003C\u002Fa>   \nGenerate prompt words using the JoyCaption Beta One model. This node is https:\u002F\u002Fhuggingface.co\u002Ffancyfeast\u002Fllama-joycaption-beta-one-hf-llava Implementation in ComfyUI.    \n\nThe first time using the node, the model will be automatically downloaded to the ComfyUI\u002Fmodels\u002FLLavacheckpoints\u002Fllama-joycaption-beta-one-hf-llava folder.    \n\nYou can also download ```llama-joycaption-beta-one-hf-llava``` folder from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1AAh8KXtBK6hIeSLgP-hjuA?pwd=avcc) or [Quark](https:\u002F\u002Fpan.quark.cn\u002Fs\u002Fa69a5d6c9b99) or [huggingface\u002Ffancyfeast\u002Fllama-joycaption-beta-one-hf-llava](https:\u002F\u002Fhuggingface.co\u002Ffancyfeast\u002Fllama-joycaption-beta-one-hf-llava\u002Ftree\u002Fmain) and copy to ```ComfyUI\u002Fmodels\u002FLLavacheckpoints```\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d97e4207f466.jpg)    \n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_c3c4575f16f2.jpg)    \n\n* image: Image input.\n* joycaption_beta1_model: JoyCaption Beta One model input. The model is loaded from the ```Load JoyCaption Beta One Model``` node.\n* extra_options: Input the extra_options.\n* caption_type: Caption type options, including: \"Descriptive\", \"Descriptive (Casual)\", \"Straightforward\", \"Stable Diffusion Prompt\", \"MidJourney\", \"Danbooru tag list\", \"e621 tag list\", \"Rule34 tag list\", \"Booru-like tag list\", \"Art Critic\", \"Product Listing\" and \"Social Media Post\".\n* caption_length: The length of caption.\n* max_new_tokens: The max_new_token parameter of model.\n* top-p: The top-p parameter of model.\n* top-k: The top-k parameter of model.\n* temperature: The temperature parameter of model.\n* user_prompt: User prompt words for model. If there is content here, it will overwrite all the settings for caption_type and extra_options.\n\n### \u003Ca id=\"table1\">LoadJoyCaptionBeta1Model\u003C\u002Fa>\nThe model loading node of JoyCaption Beta One, used in conjunction with JoyCaption Beta One.\n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_a5de5a52fbc3.jpg)    \n\n* model: Only the ```fancyfeast\u002Fllama-joycaption-beta-one-hf-llava``` model is available for selection currently.\n* quantization_mode: The model quantization mode has three options: nf4, int8, and bf16.\n* device: The model loading device.\n\n### \u003Ca id=\"table1\">JoyCaptionBeta1ExtraOptions\u003C\u002Fa>\nThe extra_options parameter node of JoyCaption Beta One. \n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_a9f2ae5decdf.jpg)   \n\n* refer_character_name: If there is a person\u002Fcharacter in the image you must refer to them as {name}.\n* exclude_people_info: Do NOT include information about people\u002Fcharacters that cannot be changed (like ethnicity, gender, etc), but do still include changeable attributes (like hair style).\n* include_lighting: Include information about lighting.\n* include_camera_angle: Include information about camera angle.\n* include_watermark: Include information about whether there is a watermark or not.\n* include_JPEG_artifacts: Include information about whether there are JPEG artifacts or not.\n* include_exif: If it is a photo you MUST include information about what camera was likely used and details such as aperture, shutter speed, ISO, etc.\n* exclude_sexual: Do NOT include anything sexual; keep it PG.\n* exclude_image_resolution: Do NOT mention the image's resolution.\n* include_aesthetic_quality: You MUST include information about the subjective aesthetic quality of the image from low to very high.\n* include_composition_style: Include information on the image's composition style, such as leading lines, rule of thirds, or symmetry.\n* exclude_text: Do NOT mention any text that is in the image.\n* specify_depth_field: Specify the depth of field and whether the background is in focus or blurred.\n* specify_lighting_sources: If applicable, mention the likely use of artificial or natural lighting sources.\n* do_not_use_ambiguous_language: Do NOT use any ambiguous language.\n* include_nsfw: Include whether the image is sfw, suggestive, or nsfw.\n* only_describe_most_important_elements: ONLY describe the most important elements of the image.\n* do_not_include_artist_name_or_title: If it is a work of art, do not include the artist's name or the title of the work.\n* identify_image_orientation: Identify the image orientation (portrait, landscape, or square) and aspect ratio if obvious.\n* use_vulgar_slang_and_profanity: Use vulgar slang and profanity.\n* do_not_use_polite_euphemisms: Do NOT use polite euphemisms—lean into blunt, casual phrasing.\n* include_character_age: Include information about the ages of any people\u002Fcharacters when applicable.\n* include_camera_shot_type: Mention whether the image depicts an extreme close-up, close-up, medium close-up, medium shot, cowboy shot, medium wide shot, wide shot, or extreme wide shot.\n* exclude_mood_feeling: Do not mention the mood\u002Ffeeling\u002Fetc of the image.\n* include_camera_vantage_height: Explicitly specify the vantage height (eye-level, low-angle worm’s-eye, bird’s-eye, drone, rooftop, etc.).\n* mention_watermark: If there is a watermark, you must mention it.\n* avoid_meta_descriptive_phrases: Your response will be used by a text-to-image model, so avoid useless meta phrases like “This image shows…”, \"You are looking at...\", etc.\n* character_name: Person\u002FCharacter Name, if choice ```refer_character_name```.\n\n\n### \u003Ca id=\"table1\">PhiPrompt\u003C\u002Fa>\n\nUse Microsoft Phi 3.5 text and visual models for local inference. Can be used to generate prompt words, process prompt words, or infer prompt words from images. Running this model requires at least 16GB of video memory.\nDownload model files from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1BdTLdaeGC3trh1U3V-6XTA?pwd=29dh) or [huggingface.co\u002Fmicrosoft\u002FPhi-3.5-vision-instruct](https:\u002F\u002Fhuggingface.co\u002Fmicrosoft\u002FPhi-3.5-vision-instruct\u002Ftree\u002Fmain) and [huggingface.co\u002Fmicrosoft\u002FPhi-3.5-mini-instruct](https:\u002F\u002Fhuggingface.co\u002Fmicrosoft\u002FPhi-3.5-mini-instruct\u002Ftree\u002Fmain) and copy to ```ComfyUI\\models\\LLM``` folder.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_e9e7f4c9640e.jpg)    \n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_39b6c49938ef.jpg)    \n\n* image: Optional input. The input image will serve as the input for Phi-3.5-vision-instruct.\n* model: Selectable to load Phi-3.5-vision-instruct or Phi-3.5-mini-instruct model. The default value of auto will automatically load the corresponding model based on whether there is image input.\n* device: Model loading device. Supports CPU and CUDA.\n* dtype: The model loading accuracy has three options: fp16, bf16, and fp32.\n* cache_model: Whether to cache the model.\n* system_prompt: The system prompt of Phi-3.5-mini-instruct.\n* user_prompt: User prompt words for LLM model.\n* do_sample: The do_Sample parameter of LLM defaults to True.\n* temperature: The temperature parameter of LLM defaults to 0.5.\n* max_new_tokens: The max_new_token parameter of LLM defaults to 512.\n\n### \u003Ca id=\"table1\">Gemini\u003C\u002Fa>\nUse Google Gemini API for text and visual models for local inference. Can be used to generate prompt words, process prompt words, or infer prompt words from images.\nApply for your API key on [Google AI Studio](https:\u002F\u002Fmakersuite.google.com\u002Fapp\u002Fapikey),  And fill it in ```api_key.ini```, this file is located in the root directory of the plug-in, and the default name is ```api_key.ini.example```. to use this file for the first time, you need to change the file suffix to ```.ini```. Open it using text editing software, fill in your API key after ```google_api_key=``` and save it.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_4c5bf5b58444.jpg)    \n\nNode options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_b914af66f705.jpg)    \n\n* image_1: Optional input. If there is an image input here, please explain the purpose of 'image_1' in user_dempt.\n* image_2: Optional input. If there is an image input here, please explain the purpose of 'image_2' in user_dempt.\n* model: Choose the Gemini model.\n* max_output_tokens: The max_output_token parameter of Gemini defaults to 4096.\n* temperature: The temperature parameter of Gemini defaults to 0.5.\n* words_limit: The default word limit for replies is 200.\n* response_language: The language of the reply.\n* system_prompt: The system prompt.\n* user_prompt: The user prompt.\n\n### \u003Ca id=\"table1\">GeminiV2\u003C\u002Fa>\nOn the basis of Gemini nodes, switch to using the new google-genai dependency package, which supports the latest gemini-2.0-flash, gemini-2.0-flash-lite, and gemini-2.5-pro-exp-03-25 models.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_ed4a1a3c4381.jpg)       \n\nAdd on the original node:    \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_56bf416d01df.jpg)     \n* seed: Seed value used when requesting Google API.    \n\n\n### \u003Ca id=\"table1\">GeminiImageEdit\u003C\u002Fa>\nImplement multimodal image editing using the gemini-2.0-flash-exp-image-generation model.    \nApply for your API key on [Google AI Studio](https:\u002F\u002Fmakersuite.google.com\u002Fapp\u002Fapikey),  And fill it in ```api_key.ini```, this file is located in the root directory of the plug-in, and the default name is ```api_key.ini.example```. to use this file for the first time, you need to change the file suffix to ```.ini```. Open it using text editing software, fill in your API key after ```google_api_key=``` and save it.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_ace6ddb7639c.jpg)    \n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_5c3a49336145.jpg)    \n\n* image: The input image.\n* image_2: Optional second image input.\n* image_3: Optional third image input.\n* model: Choose the Gemini model. Currently, only the gemini-2.0-flash-exp-image-generation model is supported.\n* temperature: The temperature parameter of Gemini defaults to 0.5.\n* seed: Seed value used when requesting Google API.\n* control_after_generate: Set whether to change the seed every time.\n* user_prompt: The user prompt.\n\n### \u003Ca id=\"table1\">DeepSeekAPI\u003C\u002Fa>\nUse the DeepSeek API for text inference, supporting multi node context concatenation.         \nApply for an API key for free at [https:\u002F\u002Fplatform.deepseek.com\u002Fapi_keys](https:\u002F\u002Fplatform.deepseek.com\u002Fapi_keys), And fill it in ```api_key.ini```, this file is located in the root directory of the plug-in, and the default name is ```api_key.ini.example```. to use this file for the first time, you need to change the file suffix to ```.ini```. Open it using text editing software, fill in your API key after ```deepseek_api_key=``` and save it.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_5ed0687dd6dd.jpg)    \n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_147c6e9e552a.jpg)    \n\n* history: History of DeepSeekAPI node, optional input. If there is input here, historical records will be used as context.\n* model: Choose the DeepSeek model, currently there is only one option: \"deepseek-chat\", which is the DeepSeek-V3 model.\n* max_tokens: The max_token parameter of DeepSeek defaults to 4096.\n* temperature: The temperature parameter of DeepSeek defaults to 1. \n* top_p: The top_p parameter of DeepSeek defaults to 1.\n* presence_penalty: The presence_penalty parameter of DeepSeek defaults to 0.\n* frequency_penalty: The frequency_penalty parameter of DeepSeek defaults to 0.\n* history_length: History record length. Records exceeding this length will be discarded.\n* system_prompt: The system prompt.\n* user_prompt: The user prompt.\n\nOutputs:\n* text: Output text of DeepSeek.\n* history: History of DeepSeek conversations.\n\n### \u003Ca id=\"table1\">DeepSeekAPI_V2\u003C\u002Fa>    \nOn the basis of the [DeepSeekAPI](#DeepSeekAPI) node, DeepSeek API supporting AliYun and VolcEngine will be added, and these two Chinese cloud service providers will provide more stable API services.\n     \n* On [VolcEngine](https:\u002F\u002Fconsole.volcengine.com\u002Fai\u002Fapi\u002Fkey\u002F) Applying for the VolcEngine API key, there is a free quota of 500 thousand tokens. If you fill in my invitation code ```27RVS1QN``` when applying, you will receive an additional 3.75 million R1 model free tokens.\n\n* On [AliYun](https:\u002F\u002Fbailian.console.aliyun.com\u002F?apiKey=1#\u002Fapi-key) Apply for AliYun API key.\n\n* Fill in the obtained API key into the fields ```volcengine_api_key``` and ```aliyun_api_key``` of ```api_key.ini```. This file is located in the root directory of the plugin, with a default name of ```api_key.ini.example```. Edit it and change the file extension to '.ini'.\n    \nAdd Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_6c783f7c72a3.jpg)\n\n* time_out: The timeout period is set to 300 seconds by default.\n\n\n### \u003Ca id=\"table1\">ZhipuGLM4\u003C\u002Fa>\nUse the Zhipu API for text inference, supporting multi node context concatenation.   \nApply for an API key for free at [https:\u002F\u002Fbigmodel.cn\u002Fusercenter\u002Fproj-mgmt\u002Fapikeys](https:\u002F\u002Fbigmodel.cn\u002Fusercenter\u002Fproj-mgmt\u002Fapikeys), And fill it in ```api_key.ini```, this file is located in the root directory of the plug-in, and the default name is ```api_key.ini.example```. to use this file for the first time, you need to change the file suffix to ```.ini```. Open it using text editing software, fill in your API key after ```zhipu_api_key=``` and save it.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d6dee46fff61.jpg)    \n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_0b1e103e1120.jpg)    \n\n* history: History of GLM4 node, optional input. If there is input here, historical records will be used as context.\n* model: Select GLM4 model. GLM-4-Flash is a free model.\n* user_prompt: The user prompt.\n* history_length: History record length. Records exceeding this length will be discarded.\n\nOutputs:\n* text: Output text of GLM4.\n* history: History of GLM4 conversations.\n\n### \u003Ca id=\"table1\">ZhipuGLM4V\u003C\u002Fa>\nUse the Zhipu API for visual inference.\nApply for an API key for free at [https:\u002F\u002Fbigmodel.cn\u002Fusercenter\u002Fproj-mgmt\u002Fapikeys](https:\u002F\u002Fbigmodel.cn\u002Fusercenter\u002Fproj-mgmt\u002Fapikeys), And fill it in ```api_key.ini```, this file is located in the root directory of the plug-in, and the default name is ```api_key.ini.example```. to use this file for the first time, you need to change the file suffix to ```.ini```. Open it using text editing software, fill in your API key after ```zhipu_api_key=``` and save it.\n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_a40942b82e21.jpg)    \n\n* image: The input image.\n* model: Select the GLM4V model. glm-4v-flash is a free model.\n* user_prompt: The user prompt.\n\nOutput:\n* text: Output text of GLM4V.\n\n\n### \u003Ca id=\"table1\">SmolLM2\u003C\u002Fa>\nUse the  [SmolLM2](https:\u002F\u002Fhuggingface.co\u002FHuggingFaceTB\u002FSmolLM2-135M-Instruct) model for local inference.\n\nDownload model files from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1_jeNosYdDqqHkzpnSNGfDQ?pwd=to5b) or [huggingface](https:\u002F\u002Fhuggingface.co\u002Fchflame163\u002FComfyUI_LayerStyle\u002Ftree\u002Fmain\u002FComfyUI\u002Fmodels\u002Fsmol),\nfind the SmolLM2-135M-Instruct, SmolLM2-360M-Instruct, SmolLM2-1.7B-Instruct folders, download at least one of them, copy to ```ComfyUI\u002Fmodels\u002Fsmol``` folder.\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_e322df187647.jpg)    \n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_c4b2f66c208f.jpg)    \n\n* smolLM2_model: The input of SmolLM2 model is loaded from the [LoadSmolLM2Model](#LoadSmolLM2Model) node.\n* max_new_tokens: The maximum number of tokens is 512 by default.\n* do_sample: The do_Sample parameter defaults to True.\n* temperature: The temperature parameter defaults to 0.5.\n* top-p: The top_p parameter defaults to 0.9.\n* system_prompt: System prompt words.\n* user_prompt: User prompt words.\n\n### \u003Ca id=\"table1\">LoadSmolLM2Model\u003C\u002Fa>\nLoad SmolLM2 model.\n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_adff78ac7331.jpg)    \n\n* model: There are three options for selecting the SmolLM2 model: SmolLM2-135M-Instruct, SmolLM2-360M-Instruct and SmolLM2-1.7B-Instruct.\n* dtype: The model accuracy has two options: bf16 and fp32.\n* device: The model loading device has two options: cuda or cpu.\n\n### \u003Ca id=\"table1\">SmolVLM\u003C\u002Fa>\nUsing [SmolVLM](https:\u002F\u002Fhuggingface.co\u002FHuggingFaceTB\u002FSmolVLM-Instruct) lightweight visual models for local inference.\n\nDonwload the ```SmolVLM-Instruct``` folder from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1_jeNosYdDqqHkzpnSNGfDQ?pwd=to5b) or [huggingface](https:\u002F\u002Fhuggingface.co\u002Fchflame163\u002FComfyUI_LayerStyle\u002Ftree\u002Fmain\u002FComfyUI\u002Fmodels\u002Fsmol) and copy to ```ComfyUI\u002Fmodels\u002Fsmol``` folder.\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_af892b2ae005.jpg)    \n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_69aea52cb421.jpg)    \n\n* image: Image input, supports batch images.\n* smolVLM_model: The input of the SmolVLM model is loaded from the [LoadSmolVLMModel](#LoadSmolVLMModel) node.\n* max_new_tokens: The maximum number of tokens is 512 by default.\n* user_prompt: User prompt words.\n\n### \u003Ca id=\"table1\">LoadSmolVLMModel\u003C\u002Fa>\nLoad SmolVLM model.\n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_1a445a64ad61.jpg)    \n\n* model: The SmolVLM model selection currently only has the option of SmolVLM-Instruct.\n* dtype: The model accuracy has two options: bf16 and fp32.\n* device: The model loading device has two options: cuda or cpu.\n\n### \u003Ca id=\"table1\">JimengImageToImageAPI\u003C\u002Fa>\nEdit images using the Jimeng API.\nPlease create an account on [Volcano Engine](#https:\u002F\u002Fconsole.volcengine.com\u002Fiam\u002Fkeymanage), apply for API AccessKeyID and SecretAccessKey, and fill them in ```api_key. ini```. This file is located in the root directory of the plugin and its default name is ```api_key.ini.example```. When using this file for the first time, you need to change the file extension to '.ini'. Open with text editing software and fill in the corresponding values after ```volcengine_SecretAccessKey=``` and ```volcengine_SecretAccessKey=```.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_3fbd51abd42c.jpg)    \n\nNode Options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_bea9a661f925.jpg)    \n\n* image: The input image.\n* model: Choose the DreamMap and Life Map model. Currently, only the Jimeng_i2i-v30 model is supported.\n* time_out: The maximum time limit for waiting for API return, in seconds. If this time is exceeded, the node will end running.\n* scale: The scale parameter of jimeng_i2iuv30 is set to 0.5 by default.\n* seed: The seed value.\n* prompt: The prompt.\n\n### \u003Ca id=\"table1\">UserPromptGeneratorTxtImg\u003C\u002Fa>\n\nUserPrompt preset for generating SD text to image prompt words.\n\nNode options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_3ec7e233e7ed.jpg)\n\n* template: Prompt word template. Currently, only the 'SD txt2img prompt' is available.\n* describe: Prompt word description. Enter a simple description here.\n* limit_word: Maximum length limit for output prompt words. For example, 200 means that the output text will be limited to 200 words.\n\n### \u003Ca id=\"table1\">UserPromptGeneratorTxtImgWithReference\u003C\u002Fa>\n\nUserCompt preset for generating SD text to image prompt words based on input content.\n\nNode options:     \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_66383f019e71.jpg)\n\n* reference_text: Reference text input. Usually it is a style description of the image.\n* template: Prompt word template. Currently, only the 'SD txt2img prompt' is available.\n* describe: Prompt word description. Enter a simple description here.\n* limit_word: Maximum length limit for output prompt words. For example, 200 means that the output text will be limited to 200 words.\n\n### \u003Ca id=\"table1\">UserPromptGeneratorReplaceWord\u003C\u002Fa>\n\nUserPrompt preset used to replace a keyword in text with different content. This is not only a simple replacement, but also a logical sorting of the text based on the context of the prompt words to achieve the rationality of the output content.\n\nNode options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_6d1422aebbf8.jpg)\n\n* orig_prompt: Original prompt word input.\n* template: Prompt word template. Currently, only 'prompt replace word' is available.\n* exclude_word: Keywords that need to be excluded.\n* replace_with_word: That word will replace the exclude_word.\n\n### \u003Ca id=\"table1\">PromptTagger\u003C\u002Fa>\n\nInference the prompts based on the image. it can replace key word for the prompt. This node currently uses Google Gemini API as the backend service. Please ensure that the network environment can use Gemini normally.\nApply for your API key on [Google AI Studio](https:\u002F\u002Fmakersuite.google.com\u002Fapp\u002Fapikey),  And fill it in ```api_key.ini```, this file is located in the root directory of the plug-in, and the default name is ```api_key.ini.example```. to use this file for the first time, you need to change the file suffix to ```.ini```. Open it using text editing software, fill in your API key after ```google_api_key=``` and save it.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_90f729525601.jpg)    \n\nNode options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_1b946e9d1d39.jpg)    \n\n* api: The Api used. At present, there are two options \"gemini-1. 5-flash\" and \"google-gemini\".\n* token_limit: The maximum token limit for generating prompt words.\n* exclude_word: Keywords that need to be excluded.\n* replace_with_word: That word will replace the exclude_word.\n\n### \u003Ca id=\"table1\">PromptEmbellish\u003C\u002Fa>\n\nEnter simple prompt words, output polished prompt words, and support inputting images as references, and support Chinese input. This node currently uses Google Gemini API as the backend service. Please ensure that the network environment can use Gemini normally.\nApply for your API key on [Google AI Studio](https:\u002F\u002Fmakersuite.google.com\u002Fapp\u002Fapikey),  And fill it in ```api_key.ini```, this file is located in the root directory of the plug-in, and the default name is ```api_key.ini.example```. to use this file for the first time, you need to change the file suffix to ```.ini```. Open it using text editing software, fill in your API key after ```google_api_key=``` and save it.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_245c22420872.jpg)    \n\nNode options:   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d2b5542a6c55.jpg)    \n\n* image: Optional, input image as a reference for prompt words.\n* api: The Api used. At present, there are two options \"gemini-1. 5-flash\" and \"google-gemini\".\n* token_limit: The maximum token limit for generating prompt words.\n* discribe: Enter a simple description here. supports Chinese text input.\n\n### \u003Ca id=\"table1\">Florence2Image2Prompt\u003C\u002Fa>\n\nUse the Florence 2 model to infer prompt words. The code for this node section is from[yiwangsimple\u002Fflorence_dw](https:\u002F\u002Fgithub.com\u002Fyiwangsimple\u002Fflorence_dw), thanks to the original author.\n*When using it for the first time, the model will be automatically downloaded. You can also download the model file from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1hzw9-QiU1vB8pMbBgofZIA?pwd=mfl3) to ```ComfyUI\u002Fmodels\u002Fflorence2``` folder.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_85a50923b85f.jpg) \n\nNode Options:\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_ea5bdb43deea.jpg)\n\n* florence2_model: Florence2 model input.\n* image: Image input.\n* task: Select the task for florence2.\n* text_input: Text input for florence2.\n* max_new_tokens: The maximum number of tokens for generating text.\n* num_beams: The number of beam searches that generate text.\n* do_sample: Whether to use text generated sampling.\n* fill_mask: Whether to use text marker mask filling.\n\n\n\n### \u003Ca id=\"table1\">GetColorTone\u003C\u002Fa>\n\nObtain the main color or average color from the image and output RGB values.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_ede127689747.jpg)    \n\nNode options:\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_41bd7ad97f49.jpg)    \n\n* mode： There are two modes to choose from, with the main color and average color.\n\nOutput type:\n\n* RGB color in HEX: The RGB color described by hexadecimal RGB format, like '#FA3D86'.\n* HSV color in list: The HSV color described by python's list data format.\n\n### \u003Ca id=\"table1\">GetColorToneV2\u003C\u002Fa>\n\nV2 upgrade of GetColorTone. You can specify the dominant or average color to get the body or background.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_2faaad726ba0.jpg)    \n\nThe following changes have been made on the basis of GetColorTong:\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_b19c282cc0e9.jpg)    \n\n* color_of: Provides 4 options, mask, entire, background, and subject, to select the color of the mask area, entire picture, background, or subject, respectively.\n* remove_background_method: There are two methods of background recognition: BiRefNet and RMBG V1.4.\n* invert_mask: Whether to reverse the mask.\n* mask_grow: Mask expansion. For subject, a larger value brings the obtained color closer to the color at the center of the body.\n\nOutput:\n\n* image: Solid color picture output, the size is the same as the input picture.\n* mask: Mask output.\n\n\n### \u003Ca id=\"table1\">ImageRewardFilter\u003C\u002Fa>\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d44d6002e431.jpg)    \nRating bulk pictures and outputting top-ranked pictures. it used [ImageReward] (https:\u002F\u002Fgithub.com\u002FTHUDM\u002FImageReward) for image scoring, thanks to the original authors.\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_98e60c2efbd8.jpg)    \nNode options:\n\n* prompt: Optional input. Entering prompt here will be used as a basis to determine how well it matches the picture.\n* output_nun: Number of pictures outputted. This value should be less than the picture batch.\n\nOutputs：\n\n* images: Bulk pictures output from high to low in order of rating.\n* obsolete_images: Knockout pictures. Also output in order of rating from high to low.\n\n\n### \u003Ca id=\"table1\">LaMa\u003C\u002Fa>\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_90325ee88455.jpg)    \nErase objects from the image based on the mask. this node is repackage of [IOPaint](https:\u002F\u002Fwww.iopaint.com), powered by state-of-the-art AI models, thanks to the original author.    \nIt is have [LaMa](https:\u002F\u002Fgithub.com\u002Fadvimman\u002Flama), [LDM](https:\u002F\u002Fgithub.com\u002FCompVis\u002Flatent-diffusion), [ZITS](https:\u002F\u002Fgithub.com\u002FDQiaole\u002FZITS_inpainting),[MAT](https:\u002F\u002Fgithub.com\u002Ffenglinglwb\u002FMAT),  [FcF](https:\u002F\u002Fgithub.com\u002FSHI-Labs\u002FFcF-Inpainting), [Manga](https:\u002F\u002Fgithub.com\u002Fmsxie92\u002FMangaInpainting) models and the SPREAD method to erase. Please refer to the original link for the introduction of each model.    \nPlease download the model files from [lama models(BaiduNetdisk)](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1m7La2ELsSKaIFhQ57qg1XQ?pwd=jn10) or [lama models(Google Drive)](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1Aq0a4sybb3SRxi7j1e1_ZbBRjaWDdP9e?usp=sharing) to ```ComfyUI\u002Fmodels\u002Flama``` folder.    \n\nNode optons:\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_c0a7bb6fc22f.jpg)    \n\n* lama_model: Choose a model or method.\n* device: After correctly installing Torch and Nvidia CUDA drivers, using cuda will significantly improve running speed.\n* invert_mask: Whether to reverse the mask.\n* grow: Positive values expand outward, while negative values contract inward.\n* blur: Blur the edge.\n\n\n\n### \u003Ca id=\"table1\">ImageAutoCrop\u003C\u002Fa>\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_e121c7e6d839.jpg)    \nAutomatically cutout and crop the image according to the mask. it can specify the background color, aspect ratio, and size for output image. this node is designed to generate the image materials for training models.   \n*Please refer to the model installation methods for [SegmentAnythingUltra](#SegmentAnythingUltra) and [RemBgUltra](#RemBgUltra).  \n\nNode options:\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_832354867954.jpg)    \n\n* background_color\u003Csup>4\u003C\u002Fsup>: The background color.\n* aspect_ratio: Here are several common frame ratios provided. alternatively, you can choose \"original\" to keep original ratio or customize the ratio using \"custom\".\n* proportional_width: Proportional width. if the aspect ratio option is not \"custom\", this setting will be ignored.\n* proportional_height: Proportional height. if the aspect ratio option is not \"custom\", this setting will be ignored.\n* scale_by_longest_side: Allow scaling by long edge size.\n* longest_side: When the scale_by_longest_side is set to True, this will be used this value to the long edge of the image. when the original_size have input, this setting will be ignored.\n* detect: Detection method, min_bounding_rect is the minimum bounding rectangle, max_inscribed_rect is the maximum inscribed rectangle.\n* border_reserve: Keep the border. expand the cutting range beyond the detected mask body area.\n* ultra_detail_range: Mask edge ultra fine processing range, 0 is not processed, which can save generation time.\n* matting_method: The method of generate masks. There are two methods available: Segment Anything and RMBG 1.4. RMBG 1.4 runs faster.\n* sam_model: Select the SAM model used by Segment Anything here.\n* grounding_dino_model: Select the Grounding_Dino model used by Segment Anything here.\n* sam_threshold: The threshold for Segment Anything.\n* sam_prompt: The prompt for Segment Anything.\n\nOutput:\ncropped_image: Crop and replace the background image.\nbox_preview: Crop position preview.\ncropped_mask: Cropped mask.\n\n### \u003Ca id=\"table1\">ImageAutoCropV2\u003C\u002Fa>\n\nThe V2 upgrad version of ```ImageAutoCrop```, it has made the following changes based on the previous version:\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_a07181263f25.jpg)    \n\n* Add optional input for mask. when there is a mask input, use that input directly to skip the built-in mask generation.\n* Add ```fill_background```. When set to False, the background will not be processed and any parts beyond the frame will not be included in the output range.\n* ```aspect_ratio``` adds the ```original``` option.\n* scale_by: Allow scaling by specified dimensions for longest, shortest, width, or height.\n* scale_by_length: The value here is used as ```scale_by``` to specify the length of the edge.\n\n### \u003Ca id=\"table1\">ImageAutoCropV3\u003C\u002Fa>\n\nAutomatically crop the image to the specified size. You can input a mask to preserve the specified area of the mask. This node is designed to generate image materials for training the model.  \n\nNode Options:\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_65cdf58d121c.jpg)   \n\n* image: The input image.\n* mask: Optional input mask. The masking part will be preserved within the range of the cutting aspect ratio.\n* aspect_ratio: The aspect ratio of the output. Here are common frame ratios provided, with \"custom\" being the custom ratio and \"original\" being the original frame ratio.\n* proportional_width: Proportionally wide. If the aspect_ratio option is not 'custom', this setting will be ignored.\n* proportional_height: High proportion. If the aspect_ratio option is not 'custom', this setting will be ignored.\n* method: Scaling sampling methods include Lanczos, Bicubic, Hamming, Bilinear, Box, and Nearest.\n* scale_to_side: Allow scaling to be specified by long side, short side, width, height, or total pixels.\n* scale_to_length: The value here is used as the scale_to-side to specify the length of the edge or the total number of pixels (kilo pixels).\n* round_to_multiple: Multiply to the nearest whole. For example, if set to 8, the width and height will be forcibly set to multiples of 8.\n\nOutputs:\ncropped_image: The cropped image.\nbox_preview: Preview of cutting position.\n\n\n\n### \u003Ca id=\"table1\">SaveImagePlus\u003C\u002Fa>\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_ee1734cf3bd4.jpg)  \nEnhanced save image node. You can customize the directory where the picture is saved, add a timestamp to the file name, select the save format, set the image compression rate, set whether to save the workflow, and optionally add invisible watermarks to the picture. (Add information in a way that is invisible to the naked eye, and use the ```ShowBlindWaterMark``` node to decode the watermark). Optionally output the json file of the workflow.\n\nNode Options:\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_dbabba33170d.jpg)    \n\n* image: The input image.\n* custom_path\u003Csup>*\u003C\u002Fsup>: User-defined directory, enter the directory name in the correct format. If empty, it is saved in the default output directory of ComfyUI.\n* filename_prefix\u003Csup>*\u003C\u002Fsup>: The prefix of file name.\n* timestamp: Timestamp the file name, opting for date, time to seconds, and time to milliseconds.\n* format: The format of image save. Currently available in ```png``` and ```jpg```. Note that only png format is supported for RGBA mode pictures.\n* quality: Image quality, the value range 10-100, the higher the value, the better the picture quality, the volume of the file also correspondingly increases.\n* meta_data: Whether to save metadata to png file, that is workflow information. Set this to false if you do not want the workflow to be leaked.\n* blind_watermark: The text entered here (does not support multilingualism) will be converted into a QR code and saved as an invisible watermark. Use ```ShowBlindWaterMark``` node can decode watermarks. Note that pictures with watermarks are recommended to be saved in png format, and lower-quality jpg format will cause watermark information to be lost.\n* save_workflow_as_json: Whether the output workflow is a json file at the same time (the output json is in the same directory as the picture).\n* preview: Preview switch.\n\n\u003Csup>*\u003C\u002Fsup> Enter```%date``` for the current date (YY-mm-dd) and ```%time``` for the current time (HH-MM-SS). You can enter ```\u002F``` for subdirectories. For example, ```%date\u002Fname_%tiem``` will output the image to the ```YY-mm-dd``` folder, with ```name_HH-MM-SS``` as the file name prefix.\n\n### \u003Ca id=\"table1\">SaveImagePlusV2\u003C\u002Fa> \nAdded custom file name and dpi options on the SaveImagePlus node.\n\nNodeOptions:\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_29d304616653.jpg)    \n\n* custom_filename\u003Csup>*\u003C\u002Fsup>: User defined file name, if entered here, will be used as the file name. Please note that duplicate files will be overwritten. If this is empty, use the file name prefix and timestamp as the file name.\n* dpi: Set the DPI value of the image file.\n\n\u003Csup>*\u003C\u002Fsup> Enter```%date``` for the current date (YY-mm-dd) and ```%time``` for the current time (HH-MM-SS). You can enter ```\u002F``` for subdirectories. For example, ```%date\u002Fname_%tiem``` will output the image to the ```YY-mm-dd``` folder, with ```name_HH-MM-SS``` as the file name prefix.\n\n\n\n### \u003Ca id=\"table1\">AddBlindWaterMark\u003C\u002Fa>\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_f06a43fb7f3e.jpg)    \nAdd an invisible watermark to a picture. Add the watermark image in a way that is invisible to the naked eye, and use the ```ShowBlindWaterMark``` node to decode the watermark.\n\nNode Options:\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_5590357ae800.jpg)    \n\n* iamge: The input image.\n* watermark_image: Watermark image. The image entered here will automatically be converted to a square black and white image as a watermark. It is recommended to use a QR code as a watermark.\n\n### \u003Ca id=\"table1\">ShowBlindWaterMark\u003C\u002Fa>\n\nDecoding the invisible watermark added to the ```AddBlindWaterMark``` and ```SaveImagePlus``` nodes.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_4f66ade8bb9b.jpg)    \n\n### \u003Ca id=\"table1\">CreateQRCode\u003C\u002Fa>\n\nGenerate a square QR code picture.\n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_5a32f5e2464d.jpg)    \n\n* size: The side length of image.\n* border: The size of the border around the QR code, the larger the value, the wider the border.\n* text: Enter the text content of the QR code here, and multi-language is not supported.\n\n### \u003Ca id=\"table1\">DecodeQRCode\u003C\u002Fa>\n\nDecoding the QR code.\n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_04ff336c7162.jpg)    \n\n* image: The input QR code image.\n* pre_blur: Pre-blurring, you can try to adjust this value for QR codes that are difficult to identify. \n\n### \u003Ca id=\"table1\">LoadPSD\u003C\u002Fa>\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_45621612a35e.jpg)    \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_444ada7dcd79.jpg)    \nLoad the PSD format file and export the layers.\nNote that this node requires the installation of the ```psd_tools``` dependency package, If error occurs during the installation of psd_tool, such as ```ModuleNotFoundError: No module named 'docopt'``` , please download [docopt's whl](https:\u002F\u002Fwww.piwheels.org\u002Fproject\u002Fdocopt\u002F) and manual install it. \n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_5671e50ddf57.jpg)    \n\n* image: Here is a list of *.psd files under ```ComfyUI\u002Finput```, where previously loaded psd images can be selected.\n* file_path: The complete path and file name of the psd file.\n* include_hidden_layer: whether include hidden layers.\n* find_layer_by: The method for finding layers can be selected by layer key number or layer name. Layer groups are treated as one layer.\n* layer_index: The layer key number, where 0 is the bottom layer, is incremented sequentially. If include_hiddenlayer is set to false, hidden layers are not counted. Set to -1 to output the top layer.\n* layer_name: Layer name. Note that capitalization and punctuation must match exactly.\n\nOutputs:\nflat_image: PSD preview image.\nlayer_iamge: Find the layer output.\nall_layers: Batch images containing all layers.\n\n### \u003Ca id=\"table1\">SD3NegativeConditioning\u003C\u002Fa>\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_f145e17b154d.jpg)  \nEncapsulate the four nodes of Negative Condition in SD3 into a separate node.\n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_9bf532a07cf8.jpg)    \n\n* zero_out_start: Set the ConditioningSetTimestepRange start value for Negative ConditioningZeroOut, which is the same as the ConditioningSetTimestepRange end value for Negative.\n\n\n### \u003Ca id=\"table1\">BenUltra\u003C\u002Fa>\nIt is the implementation of [PramaLLC\u002FBEN](https:\u002F\u002Fhuggingface.co\u002FPramaLLC\u002FBEN)  project in ComfyUI. Thank you to the original author. \nDownload all files from [huggingface](https:\u002F\u002Fhuggingface.co\u002Fchflame163\u002FComfyUI_LayerStyle\u002Ftree\u002Fmain\u002FComfyUI\u002Fmodels\u002FBEN) or [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F17mdBxfBl_R97mtNHuiHsxQ?pwd=2jn3) and copy to ```ComfyUI\u002Fmodels\u002FBEN``` folder.\n\n![image](image\u002Fben_ultra_example.jpg)\n\nNode Options：\n![image](image\u002Fben_ultra_node.jpg)\n* ben_model: Ben model input. There are two models to choose: BEN_Base and BEN2_base.\n* image: Image input.\n* 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.\n* detail_erode: Mask the erosion range inward from the edge. the larger the value, the larger the range of inward repair.\n* detail_dilate: The edge of the mask expands outward. the larger the value, the wider the range of outward repair.\n* black_point: Edge black sampling threshold.\n* white_point: Edge white sampling threshold.\n* process_detail: Set to false here will skip edge processing to save runtime.\n* max_megapixels: Set the maximum size for VitMate operations.\n\n### \u003Ca id=\"table1\">LoadBenModel\u003C\u002Fa>\nLoad the BEN model. \n\n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_e1986a47d767.jpg)  \n\n* model: Select the model. Currently, only the Ben_Sase model is available for selection.\n\n\n\n### \u003Ca id=\"table1\">SegmentAnythingUltra\u003C\u002Fa>\n\nImprovements to [ComfyUI Segment Anything](https:\u002F\u002Fgithub.com\u002Fstoryicon\u002Fcomfyui_segment_anything),  thanks to the original author.\n\n*Please refer to the installation of ComfyUI Segment Anything to install the model. If ComfyUI Segment Anything has been correctly installed, you can skip this step.\n\n* From [here](https:\u002F\u002Fhuggingface.co\u002Fbert-base-uncased\u002Ftree\u002Fmain) download the config.json，model.safetensors，tokenizer_config.json，tokenizer.json and vocab.txt 5 files to ```ComfyUI\u002Fmodels\u002Fbert-base-uncased``` folder.\n* Download [GroundingDINO_SwinT_OGC config file](https:\u002F\u002Fhuggingface.co\u002FShilongLiu\u002FGroundingDINO\u002Fresolve\u002Fmain\u002FGroundingDINO_SwinT_OGC.cfg.py), [GroundingDINO_SwinT_OGC model](https:\u002F\u002Fhuggingface.co\u002FShilongLiu\u002FGroundingDINO\u002Fresolve\u002Fmain\u002Fgroundingdino_swint_ogc.pth), \n  [GroundingDINO_SwinB config file](https:\u002F\u002Fhuggingface.co\u002FShilongLiu\u002FGroundingDINO\u002Fresolve\u002Fmain\u002FGroundingDINO_SwinB.cfg.py), [GroundingDINO_SwinB model](https:\u002F\u002Fhuggingface.co\u002FShilongLiu\u002FGroundingDINO\u002Fresolve\u002Fmain\u002Fgroundingdino_swinb_cogcoor.pth) to ```ComfyUI\u002Fmodels\u002Fgrounding-dino``` folder.\n* Download [sam_vit_h](https:\u002F\u002Fdl.fbaipublicfiles.com\u002Fsegment_anything\u002Fsam_vit_h_4b8939.pth)，[sam_vit_l](https:\u002F\u002Fdl.fbaipublicfiles.com\u002Fsegment_anything\u002Fsam_vit_l_0b3195.pth), \n  [sam_vit_b](https:\u002F\u002Fdl.fbaipublicfiles.com\u002Fsegment_anything\u002Fsam_vit_b_01ec64.pth), [sam_hq_vit_h](https:\u002F\u002Fhuggingface.co\u002Flkeab\u002Fhq-sam\u002Fresolve\u002Fmain\u002Fsam_hq_vit_h.pth),\n  [sam_hq_vit_l](https:\u002F\u002Fhuggingface.co\u002Flkeab\u002Fhq-sam\u002Fresolve\u002Fmain\u002Fsam_hq_vit_l.pth), [sam_hq_vit_b](https:\u002F\u002Fhuggingface.co\u002Flkeab\u002Fhq-sam\u002Fresolve\u002Fmain\u002Fsam_hq_vit_b.pth), \n  [mobile_sam](https:\u002F\u002Fgithub.com\u002FChaoningZhang\u002FMobileSAM\u002Fblob\u002Fmaster\u002Fweights\u002Fmobile_sam.pt) to ```ComfyUI\u002Fmodels\u002Fsams``` folder.\n  *Or download them from [GroundingDino models on BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1P7WQDuaqSYazlSQX8SJjxw?pwd=24ki) and  [SAM models on BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1n7JrHb2vzV2K2z3ktqpNxg?pwd=yoqh) .\n  ![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_7035a595d501.jpg)    \n  ![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_21bb4860fbf2.jpg)    \n\nNode options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d26ccc3db4d5.jpg)    \n\n* sam_model: Select the SAM model.\n* ground_dino_model: Select the Grounding DINO model.\n* threshold: The threshold of SAM.\n* detail_range: Edge detail range.\n* black_point: Edge black sampling threshold.\n* white_point: Edge white sampling threshold.\n* process_detail: Set to false here will skip edge processing to save runtime.\n* prompt: Input for SAM's prompt.\n* cache_model: Set whether to cache the model.\n\n### \u003Ca id=\"table1\">SegmentAnythingUltraV2\u003C\u002Fa>\n\nThe V2 upgraded version of SegmentAnythingUltra has added the VITMatte edge processing method.(Note: Images larger than 2K in size using this method will consume huge memory) \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_c17464e44c89.jpg)    \n\nOn the basis of SegmentAnythingUltra, the following changes have been made: \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d9e9a16ab4f0.jpg)    \n\n* 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.\n* detail_erode: Mask the erosion range inward from the edge. the larger the value, the larger the range of inward repair.\n* detail_dilate: The edge of the mask expands outward. the larger the value, the wider the range of outward repair.\n* device: Set whether the VitMatte to use cuda.\n* max_megapixels: Set the maximum size for VitMate operations.\n\n\n### \u003Ca id=\"table1\">SegmentAnythingUltraV3\u003C\u002Fa>\nSeparate model loading from inference nodes to avoid duplicate model loading when using multiple SAM nodes.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_05b91c755493.jpg)  \n\nNode Options:\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_aafdee051912.jpg)\nSame as SegmentAnythingUltra, removed ```sam_comodel``` and ```ground-dino_comodel```, changed them to be obtained from node input.\n\n\n### \u003Ca id=\"table1\">LoadSegmentAnythingModels\u003C\u002Fa>\nLoad SegmentAnything models.\n  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_0ec7e980d977.jpg)\n\n\n### \u003Ca id=\"table1\">SAM2Ultra\u003C\u002Fa>\n\nThis node is modified from [kijai\u002FComfyUI-segment-anything-2](https:\u002F\u002Fgithub.com\u002Fkijai\u002FComfyUI-segment-anything-2). Thank to [kijai](https:\u002F\u002Fgithub.com\u002Fkijai) for making significant contributions to the Comfyui community.    \nSAM2 Ultra node only support single image. If you need to process multiple images, please first convert the image batch to image list.    \n*Download models from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1xaQYBA6ktxvAxm310HXweQ?pwd=auki) or [huggingface.co\u002FKijai\u002Fsam2-safetensors](https:\u002F\u002Fhuggingface.co\u002FKijai\u002Fsam2-safetensors\u002Ftree\u002Fmain) and copy to ```ComfyUI\u002Fmodels\u002Fsam2``` folder.\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_4d4f84241f34.jpg)    \n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_257b9f3594bf.jpg)    \n\n* image: The image to segment.\n* bboxes: Input recognition box data.\n* sam2_model: Select the SAM2 model.\n* presicion: Model's persicion. can be selected from fp16, bf16, and fp32.\n* bbox_select: Select the input box data. There are three options: \"all\" to select all, \"first\" to select the box with the highest confidence, and \"by_index\" to specify the index of the box.\n* select_index: This option is valid when bbox_delect is 'by_index'. 0 is the first one. Multiple values can be entered, separated by any non numeric character, including but not limited to commas, periods, semicolons, spaces or letters, and even Chinese.\n* cache_model: Whether to cache the model. After caching the model, it will save time for model loading.\n* 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.\n* detail_erode: Mask the erosion range inward from the edge. the larger the value, the larger the range of inward repair.\n* detail_dilate: The edge of the mask expands outward. the larger the value, the wider the range of outward repair.\n* black_point: Edge black sampling threshold.\n* white_point: Edge white sampling threshold.\n* process_detail: Set to false here will skip edge processing to save runtime.\n* device: Set whether the VitMatte to use cuda.\n* max_megapixels: Set the maximum size for VitMate operations.\n\n### \u003Ca id=\"table1\">SAM2UltraV2\u003C\u002Fa>\nOn the basis of ```SAM2 Ultra``` nodes, changing the SAM2 model to an external input saves resources when using multiple nodes.\n\nModified node options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_86e0836311c8.jpg)    \n\n* sam2_model: SAM2 model input, the model is loaded by the ```Load SAM2 Model``` node.\n\n### \u003Ca id=\"table1\">LoadSAM2Model\u003C\u002Fa>\nLoad SAM2 model.\n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_19753c92182f.jpg)    \n\n* sam2_model: Select the SAM2 model.\n* presicion: Model's persicion. can be selected from fp16, bf16, and fp32.\n* device: Set whether to use cuda.\n\n### \u003Ca id=\"table1\">SAM2VideoUltra\u003C\u002Fa>\n\nSAM2 Video Ultra node support processing multiple frames of images or video sequences. Please define the recognition box data in the first frame of the sequence to ensure correct recognition.\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F4726b8bf-9b98-4630-8f54-cb7ed7a3d2c5\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fb2a45c96-4be1-4470-8ceb-addaf301b0cb\n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_e49a305b0752.jpg)    \n\n* image: The image to segment.\n* bboxes: Optional input of recognition bbox data. ```bboxes``` and ```first_frame_mask``` must have least one input. If first_frame_mask inputed, bbboxes will be ignored.\n* first_frame_mask: Optional input of the first frame mask. The mask will be used as the first frame recognition object. ```bboxes``` and ```first_frame_mask``` must have least one input. If first_frame_mask inputed, bbboxes will be ignored.\n* pre_mask: Optional input mask, which will serve as a propagation focus range limitation and help improve recognition accuracy.\n* sam2_model: Select the SAM2 model.\n* presicion: Model's persicion. can be selected from fp16 and bf16.\n* cache_model: Whether to cache the model. After caching the model, it will save time for model loading.\n* individual_object: When set to True, it will focus on identifying a single object. When set to False, attempts will be made to generate recognition boxes for multiple objects.\n* mask_preview_color: Display the color of non masked areas in the preview output. \n* detail_method: Edge processing methods. Only VITMatte method can be used.\n* detail_erode: Mask the erosion range inward from the edge. the larger the value, the larger the range of inward repair.\n* detail_dilate: The edge of the mask expands outward. the larger the value, the wider the range of outward repair.\n* black_point: Edge black sampling threshold.\n* white_point: Edge white sampling threshold.\n* process_detail: Set to false here will skip edge processing to save runtime.\n* device: Only cuda can be used.\n* max_megapixels: Set the maximum size for VitMate operations.A larger size will result in finer mask edges, but it will lead to a significant decrease in computation speed.\n\n### \u003Ca id=\"table1\">ObjectDetectorGemini\u003C\u002Fa>\nUse Gemini API for object detection.\nApply for your API key on [Google AI Studio](https:\u002F\u002Fmakersuite.google.com\u002Fapp\u002Fapikey),  And fill it in ```api_key.ini```, this file is located in the root directory of the plug-in, and the default name is ```api_key.ini.example```. to use this file for the first time, you need to change the file suffix to ```.ini```. Open it using text editing software, fill in your API key after ```google_api_key=``` and save it.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_2eac95d5b451.jpg)\n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_ef48b94d3b71.jpg)    \n\n* image: The input image.\n* model: Selete Gemini model.\n* prompt: Describe the object that needs to be identified.\n\n### \u003Ca id=\"table1\">ObjectDetectorGeminiV2\u003C\u002Fa>\nOn the basis of the ObjectDetectorGemini node, change to using a new google-genai dependency package that supports the latest gemini-2.5-pro-exp-03-25 model.\n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_c323d5ba33b8.jpg)    \n\nSame as ObjectDetectorGemini\n\n### \u003Ca id=\"table1\">ObjectDetectorFL2\u003C\u002Fa>\n\nUse the Florence2 model to identify objects in images and output recognition box data.    \n*Download models from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1hzw9-QiU1vB8pMbBgofZIA?pwd=mfl3) and copy to ```ComfyUI\u002Fmodels\u002Fflorence2``` folder.\n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_4f6b7f6529c7.jpg)    \n\n* image: The image to segment.\n* florence2_model: Florence2 model, it from [LoadFlorence2Model](#LoadFlorence2Model) node.\n* prompt: Describe the object that needs to be identified. \n* sort_method: The selection box sorting method has 4 options: \"left_to_right\", \"top_to_bottom\", \"big_to_small\" and \"confidence\".\n* bbox_select: Select the input box data. There are three options: \"all\" to select all, \"first\" to select the box with the highest confidence, and \"by_index\" to specify the index of the box.\n* select_index: This option is valid when bbox_delect is 'by_index'. 0 is the first one. Multiple values can be entered, separated by any non numeric character, including but not limited to commas, periods, semicolons, spaces or letters, and even Chinese.\n\n### \u003Ca id=\"table1\">ObjectDetectorYOLOWorld\u003C\u002Fa>\n#### (Obsoleted. If you want to continue using it, you need to manually install the dependency package)    \nDue to potential installation issues with dependency packages, this node has been obsoleted. To use, please manually install the following dependency packages:\n```\npip install inference-cli>=0.13.0\npip install inference-gpu[yolo-world]>=0.13.0\n```\n\nUse the YOLO-World model to identify objects in images and output recognition box data.     \n*Download models from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1QpjajeTA37vEAU2OQnbDcQ?pwd=nqsk) or [GoogleDrive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1nrsfq4S-yk9ewJgwrhXAoNVqIFLZ1at7?usp=sharing) and copy to ```ComfyUI\u002Fmodels\u002Fyolo-world``` folder.\n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d0fb1157e4a5.jpg)    \n\n* image: The image to segment.\n* confidence_threshold: The threshold of confidence.\n* nms_iou_threshold: The threshold of Non-Maximum Suppression.\n* prompt: Describe the object that needs to be identified.\n* sort_method: The selection box sorting method has 4 options: \"left_to_right\", \"top_to_bottom\", \"big_to_small\" and \"confidence\".\n* bbox_select: Select the input box data. There are three options: \"all\" to select all, \"first\" to select the box with the highest confidence, and \"by_index\" to specify the index of the box.\n* select_index: This option is valid when bbox_delect is 'by_index'. 0 is the first one. Multiple values can be entered, separated by any non numeric character, including but not limited to commas, periods, semicolons, spaces or letters, and even Chinese.\n\n### \u003Ca id=\"table1\">ObjectDetectorYOLO8\u003C\u002Fa>\n\nUse the YOLO-8 model to identify objects in images and output recognition box data.    \n*Download models from [GoogleDrive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1I5TISO2G1ArSkKJu1O9b4Uvj3DVgn5d2) or [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1pEY6sjABQaPs6QtpK0q6XA?pwd=grqe)  and copy to ```ComfyUI\u002Fmodels\u002Fyolo``` folder.\n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_05190fccd1fe.jpg)\n\n* image: The image to segment.\n* yolo_model: Choose the yolo model.\n* sort_method: The selection box sorting method has 4 options: \"left_to_right\", \"top_to_bottom\", \"big_to_small\" and \"confidence\".\n* bbox_select: Select the input box data. There are three options: \"all\" to select all, \"first\" to select the box with the highest confidence, and \"by_index\" to specify the index of the box.\n* select_index: This option is valid when bbox_delect is 'by_index'. 0 is the first one. Multiple values can be entered, separated by any non numeric character, including but not limited to commas, periods, semicolons, spaces or letters, and even Chinese.\n\n### \u003Ca id=\"table1\">ObjectDetectorMask\u003C\u002Fa>\n\nUse mask as recognition box data. All areas surrounded by white areas on the mask will be recognized as an object. Multiple enclosed areas will be identified separately.   \n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_341ed0808b95.jpg)\n\n* object_mask: The mask input.\n* sort_method: The selection box sorting method has 4 options: \"left_to_right\", \"top_to_bottom\", \"big_to_small\" and \"confidence\".\n* bbox_select: Select the input box data. There are three options: \"all\" to select all, \"first\" to select the box with the highest confidence, and \"by_index\" to specify the index of the box.\n* select_index: This option is valid when bbox_delect is 'by_index'. 0 is the first one. Multiple values can be entered, separated by any non numeric character, including but not limited to commas, periods, semicolons, spaces or letters, and even Chinese.\n\n### \u003Ca id=\"table1\">BBoxJoin\u003C\u002Fa>\n\nMerge recognition box data.   \n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_8dd6afd3a6d7.jpg)\n\n* bboxes_1: Required input. The first set of identification boxes.\n* bboxes_2: Optional input. The second set of identification boxes.\n* bboxes_3: Optional input. The third set of identification boxes.\n* bboxes_4: Optional input. The fourth set of identification boxes.\n\n### \u003Ca id=\"table1\">DrawBBoxMask\u003C\u002Fa>\n\nDraw the recognition BBoxes data output by the Object Detector node as a mask.     \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_f590f2271685.jpg)\n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_425ae0cfcdf1.jpg)\n\n* image: Image input. It must be consistent with the image recognized by the Object Detector node.  \n* bboxes: Input recognition BBoxes data.\n* grow_top: Each BBox expands upwards as a percentage of its height, positive values indicate upward expansion and negative values indicate downward expansion.\n* grow_bottom: Each BBox expands downwards as a percentage of its height, positive values indicating downward expansion and negative values indicating upward expansion.\n* grow_left: Each BBox expands to the left as a percentage of its width, positive values expand to the left and negative values expand to the right.\n* grow_right: Each BBox expands to the right as a percentage of its width, positive values indicate expansion to the right and negative values indicate expansion to the left.\n\n### \u003Ca id=\"table1\">DrawBBoxMaskV2\u003C\u002Fa> \nAdd rounded rectangle drawing to the [DrawBBoxMask](#DrawBBoxMask) node.    \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_f4e20153d893.jpg)\n\nAdd Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_145c080a61de.jpg)\n* rounded_rect_radius: Rounded rectangle radius. The range is 0-100, and the larger the value, the more pronounced the rounded corners.\n* anti_aliasing: Anti aliasing, ranging from 0-16, with larger values indicating less pronounced aliasing. Excessive values will significantly reduce the processing speed of nodes.\n\n### \u003Ca id=\"table1\">EVF-SAMUltra\u003C\u002Fa>\n\nThis node is implementation of [EVF-SAM](https:\u002F\u002Fgithub.com\u002Fhustvl\u002FEVF-SAM) in ComfyUI.     \n*Please download model files from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1EvaxgKcCxUpMbYKzLnEx9w?pwd=69bn) or [huggingface\u002FEVF-SAM2](https:\u002F\u002Fhuggingface.co\u002FYxZhang\u002Fevf-sam2\u002Ftree\u002Fmain), [huggingface\u002FEVF-SAM](https:\u002F\u002Fhuggingface.co\u002FYxZhang\u002Fevf-sam\u002Ftree\u002Fmain) to ```ComfyUI\u002Fmodels\u002FEVF-SAM``` folder(save the models in their respective subdirectories).\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_bb736feb29d5.jpg)    \n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_aa0ac5a94488.jpg)    \n\n* image: The input image.\n* model: Select the model. Currently, there are options for evf-sam2 and evf sam.\n* presicion: Model accuracy can be selected from fp16, bf16, and fp32.\n* load_in_bit: Load the model with positional accuracy. You can choose from full, 8, and 4.\n* pormpt: Prompt words used for segmentation.\n* 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.\n* detail_erode: Mask the erosion range inward from the edge. the larger the value, the larger the range of inward repair.\n* detail_dilate: The edge of the mask expands outward. the larger the value, the wider the range of outward repair.\n* black_point: Edge black sampling threshold.\n* white_point: Edge white sampling threshold.\n* process_detail: Set to false here will skip edge processing to save runtime.\n* device: Set whether the VitMatte to use cuda.\n* max_megapixels: Set the maximum size for VitMate operations.\n\n### \u003Ca id=\"table1\">Florence2Ultra\u003C\u002Fa>\n\nUsing the segmentation function of the Florence2 model, while also having ultra-high edge details.\nThe code for this node section is from [spacepxl\u002FComfyUI-Florence-2](https:\u002F\u002Fgithub.com\u002Fspacepxl\u002FComfyUI-Florence-2), thanks to the original author.\n*Download the model files from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1hzw9-QiU1vB8pMbBgofZIA?pwd=mfl3) to ```ComfyUI\u002Fmodels\u002Fflorence2``` folder.\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_aceb478d73aa.jpg)    \n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_321ecaa9174e.jpg)    \n\n* florence2_model: Florence2 model input.\n* image: Image input.\n* task: Select the task for florence2.\n* text_input: Text input for florence2.\n* 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.\n* detail_erode: Mask the erosion range inward from the edge. the larger the value, the larger the range of inward repair.\n* detail_dilate: The edge of the mask expands outward. the larger the value, the wider the range of outward repair.\n* black_point: Edge black sampling threshold.\n* white_point: Edge white sampling threshold.\n* process_detail: Set to false here will skip edge processing to save runtime.\n* device: Set whether the VitMatte to use cuda.\n* max_megapixels: Set the maximum size for VitMate operations.\n\n### \u003Ca id=\"table1\">LoadFlorence2Model\u003C\u002Fa>\n\nFlorence2 model loader.\n*When using it for the first time, the model will be automatically downloaded.\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d7be405f4c38.jpg)   \nAt present, there are base, base-ft, large, large-ft, DocVQA, SD3-Captioner and base-PromptGen models to choose from.\n\n\n\n### \u003Ca id=\"table1\">BiRefNetUltra\u003C\u002Fa>\n\nUsing the BiRefNet model to remove background has better recognition ability and ultra-high edge details.\nThe code for the model part of this node comes from Viper's [ComfyUI-BiRefNet](https:\u002F\u002Fgithub.com\u002Fviperyl\u002FComfyUI-BiRefNet)，thanks to the original author.\n\n*From [https:\u002F\u002Fhuggingface.co\u002FViperYX\u002FBiRefNet](https:\u002F\u002Fhuggingface.co\u002FViperYX\u002FBiRefNet\u002Ftree\u002Fmain) or [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1GxtuNDTIHkuu4FR4uGAT-g?pwd=t2cf) download the ```BiRefNet-ep480.pth```,```pvt_v2_b2.pth```,```pvt_v2_b5.pth```,```swin_base_patch4_window12_384_22kto1k.pth```, ```swin_large_patch4_window12_384_22kto1k.pth``` 5 files to ```ComfyUI\u002Fmodels\u002FBiRefNet``` folder.\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_617d2434497f.jpg)    \n\nNode options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_9939896263ed.jpg)    \n\n* 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.\n* detail_erode: Mask the erosion range inward from the edge. the larger the value, the larger the range of inward repair.\n* detail_dilate: The edge of the mask expands outward. the larger the value, the wider the range of outward repair.\n* black_point: Edge black sampling threshold.\n* white_point: Edge white sampling threshold.\n* process_detail: Set to false here will skip edge processing to save runtime.\n* device: Set whether the VitMatte to use cuda.\n* max_megapixels: Set the maximum size for VitMate operations.\n\n### \u003Ca id=\"table1\">BiRefNetUltraV2\u003C\u002Fa>\n\nThis node supports the use of the latest BiRefNet model. \n*Download model file from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F12z3qUuqag3nqpN2NJ5pSzg?pwd=ek65) or [GoogleDrive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1s2Xe0cjq-2ctnJBR24563yMSCOu4CcxM) named ```BiRefNet-general-epoch_244.pth``` to ```ComfyUI\u002FModels\u002FBiRefNet\u002Fpth``` folder. You can also download more BiRefNet models and put them here.\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d06389a72197.jpg)    \n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_6eb5624f7e79.jpg)  \n\n* image: The input image.\n* birefnet_model: The BiRefNet model is input and it is output from the LoadBiRefNetModel node.\n* 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.\n* detail_erode: Mask the erosion range inward from the edge. the larger the value, the larger the range of inward repair.\n* detail_dilate: The edge of the mask expands outward. the larger the value, the wider the range of outward repair.\n* black_point: Edge black sampling threshold.\n* white_point: Edge white sampling threshold.\n* process_detail: Due to the excellent edge processing of BiRefNet, it is set to False by default here.\n* device: Set whether the VitMatte to use cuda.\n* max_megapixels: Set the maximum size for VitMate operations.\n\n### \u003Ca id=\"table1\">LoadBiRefNetModel\u003C\u002Fa>\n\nLoad the BiRefNet model.\n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_7863f34c836a.jpg)  \n\n* model: Select the model. List the files in the  ```CoomfyUI\u002Fmodels\u002FBiRefNet\u002Fpth```  folder for selection.\n\n\n### \u003Ca id=\"table1\">LoadBiRefNetModelV2\u003C\u002Fa>\nThis node is a PR submitted by [jimlee2048](https:\u002F\u002Fgithub.com\u002Fjimlee2048) and supports loading RMBG-2.0 models.\n    \nDownload model files from [huggingface](https:\u002F\u002Fhuggingface.co\u002Fbriaai\u002FRMBG-2.0\u002Ftree\u002Fmain) or [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1viIXlZnpTYTKkm2F-QMj_w?pwd=axr9) and copy to ```ComfyUI\u002Fmodels\u002FBiRefNet\u002FRMBG-2.0``` folder.\n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_ee5e8e116487.jpg)  \n\n* model: Select the model. There are two options, ```BiRefNet-General``` and ```RMBG-2.0```. \n\n\n### \u003Ca id=\"table1\">TransparentBackgroundUltra\u003C\u002Fa>\n\nUsing the transparent-background model to remove background has better recognition ability and speed, while also having ultra-high edge details.\n\n*From [googledrive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F10KBDY19egb8qEQBv34cqIVSwd38bUAa9?usp=sharing) or  [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F10JO0uKzTxJaIkhN_J7RSyw?pwd=v0b0)  download all files to ```ComfyUI\u002Fmodels\u002Ftransparent-background``` folder.\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_2c680e43d4c2.jpg)    \n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_7fcdf2196011.jpg)    \n\n* model: Select the model.\n* 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.\n* detail_erode: Mask the erosion range inward from the edge. the larger the value, the larger the range of inward repair.\n* detail_dilate: The edge of the mask expands outward. the larger the value, the wider the range of outward repair.\n* black_point: Edge black sampling threshold.\n* white_point: Edge white sampling threshold.\n* process_detail: Set to false here will skip edge processing to save runtime.\n* device: Set whether the VitMatte to use cuda.\n* max_megapixels: Set the maximum size for VitMate operations.\n\n### \u003Ca id=\"table1\">PersonMaskUltra\u003C\u002Fa>\n\nGenerate masks for portrait's face, hair, body skin, clothing, or accessories. Compared to the previous A Person Mask Generator node, this node has ultra-high edge details.\nThe model code for this node comes from [a-person-mask-generator](https:\u002F\u002Fgithub.com\u002Fdjbielejeski\u002Fa-person-mask-generator)， edge processing code from [ComfyUI-Image-Filters](https:\u002F\u002Fgithub.com\u002Fspacepxl\u002FComfyUI-Image-Filters)，thanks to the original author.\n*Download model files from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F13zqZtBt89ueCyFufzUlcDg?pwd=jh5g) to ```ComfyUI\u002Fmodels\u002Fmediapipe``` folder.\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_1e5428bf4281.jpg)    \n\nNode options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_0b58c28c3237.jpg)    \n\n* face: Face recognition.\n* hair: Hair recognition.\n* body: Body skin recognition.\n* clothes: Clothing recognition.\n* accessories: Identification of accessories (such as backpacks).\n* background: Background recognition.\n* confidence: Recognition threshold, lower values will output more mask ranges.\n* detail_range: Edge detail range.\n* black_point: Edge black sampling threshold.\n* white_point: Edge white sampling threshold.\n* process_detail: Set to false here will skip edge processing to save runtime.\n\n### \u003Ca id=\"table1\">PersonMaskUltraV2\u003C\u002Fa>\n\nThe V2 upgraded version of PersonMaskUltra has added the VITMatte edge processing method.(Note: Images larger than 2K in size using this method will consume huge memory) \n\nOn the basis of PersonMaskUltra, the following changes have been made: \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_cfa5ca69660d.jpg)    \n\n* 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.\n* detail_erode: Mask the erosion range inward from the edge. the larger the value, the larger the range of inward repair.\n* detail_dilate: The edge of the mask expands outward. the larger the value, the wider the range of outward repair.\n* device: Set whether the VitMatte to use cuda.\n* max_megapixels: Set the maximum size for VitMate operations.\n\n\n### \u003Ca id=\"table1\">HumanPartsUltra\u003C\u002Fa>\n\nUsed for generate human body parts masks, it is based on the warrper of [metal3d\u002FComfyUI_Human_Parts](https:\u002F\u002Fgithub.com\u002Fmetal3d\u002FComfyUI_Human_Parts), thank the original author.\nThis node has added ultra-fine edge processing based on the original work. Download model file from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1-6uwH6RB0FhIVfa3qO7hhQ?pwd=d862) or [huggingface](https:\u002F\u002Fhuggingface.co\u002FMetal3d\u002Fdeeplabv3p-resnet50-human\u002Ftree\u002Fmain) and copy to ```ComfyUI\\models\\onnx\\human-parts``` folder.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_29f44af2d682.jpg)    \n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_8d1e73ec0a83.jpg)    \n\n* image: The input image.\n* face: Recognize face switch.\n* hair: Recognize hair switch.\n* galsses: Recognize glasses switch.\n* top_clothes: Recognize top clothes switch.\n* bottom_clothes: Recognize bottom clothes switch.\n* torso_skin: Recognize torso skin switch.\n* left_arm: Recognize left arm switch.\n* right_arm: Recognize right arm switch.\n* left_leg: Recognize left leg switch.\n* right_leg: Recognize right leg switch.\n* left_foot: Recognize left foot switch.\n* right_foot: Recognize right foot switch.\n* 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.\n* detail_erode: Mask the erosion range inward from the edge. the larger the value, the larger the range of inward repair.\n* detail_dilate: The edge of the mask expands outward. the larger the value, the wider the range of outward repair.\n* black_point: Edge black sampling threshold.\n* white_point: Edge white sampling threshold.\n* process_detail: Set to false here will skip edge processing to save runtime.\n* device: Set whether the VitMatte to use cuda.\n* max_megapixels: Set the maximum size for VitMate operations.\n\n\n\n### \u003Ca id=\"table1\">YoloV8Detect\u003C\u002Fa>\n\nUse the YoloV8 model to detect faces, hand box areas, or character segmentation. Supports the output of the selected number of channels.\nDownload the model files from [GoogleDrive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1I5TISO2G1ArSkKJu1O9b4Uvj3DVgn5d2) or [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1pEY6sjABQaPs6QtpK0q6XA?pwd=grqe) to ```ComfyUI\u002Fmodels\u002Fyolo``` folder.\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_0aa32595e708.jpg)    \n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_c433318d31de.jpg)    \n\n* yolo_model: Yolo model selection. the model with ```seg``` name can output segmented masks, otherwise they can only output box masks.\n* mask_merge: Select the merged mask. ```all``` is to merge all mask outputs. The selected number is how many masks to output, sorted by recognition confidence to merge the output.\n\nOutputs:\n\n* mask: The output mask.\n* yolo_plot_image: Preview of yolo recognition results.\n* yolo_masks: For all masks identified by yolo, each individual mask is output as a mask.\n\n### \u003Ca id=\"table1\">MediapipeFacialSegment\u003C\u002Fa>\n\nUse the Mediapipe model to detect facial features, segment left and right eyebrows, eyes, lips, and tooth.\n*Download the model files from [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F13zqZtBt89ueCyFufzUlcDg?pwd=jh5g) to ```ComfyUI\u002Fmodels\u002Fmediapipe``` folder.\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_a67001892936.jpg)    \n\nNode Options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_dfd676c3d00f.jpg)    \n\n* left_eye: Recognition switch of left eye.\n* left_eyebrow: Recognition switch of left eyebrow.\n* right_eye: Recognition switch of right eye.\n* right_eyebrow: Recognition switch of right eyebrow.\n* lips: Recognition switch of lips.\n* tooth: Recognition switch of tooth.\n\n\n### \u003Ca id=\"table1\">MaskByDifferent\u003C\u002Fa>\n\nCalculate the differences between two images and output them as mask.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_8cec98fd1e66.jpg)    \n\nNode options:  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_c3c8278ee700.jpg)    \n\n* gain: The gain of difference calculate. higher value will result in a more significant slight difference.\n* fix_gap: Fix the internal gaps of the mask. higher value will repair larger gaps.\n* fix_threshold: The threshold for fix_gap.\n* main_subject_detect: Setting this to True will enable subject detection, ignoring differences outside of the subject.\n\n\n## Annotation for \u003Ca id=\"table1\">notes\u003C\u002Fa>\n\n\u003Csup>1\u003C\u002Fsup>  The layer_image, layer_mask and the background_image(if have input), These three items must be of the same size.    \n\n\u003Csup>2\u003C\u002Fsup>  The mask not a mandatory input item. the alpha channel of the image is used by default. If the image input does not include an alpha channel, the entire image's alpha channel will be automatically created. if have masks input simultaneously, the alpha channel will be overwrite by the mask.    \n\n\u003Csup>3\u003C\u002Fsup>  The \u003Ca id=\"table1\">Blend\u003C\u002Fa> Mode include **normal, multply, screen, add, subtract, difference, darker, color_burn, color_dodge, linear_burn, linear_dodge, overlay, soft_light, hard_light, vivid_light, pin_light, linear_light, and hard_mix.** all of 19 blend modes in total.    \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_cbbb48dd6093.jpg)    \n\u003Cfont size=\"1\">*Preview of the blend mode  \u003C\u002Ffont>\u003Cbr \u002F>     \n\n\u003Csup>3\u003C\u002Fsup>   The \u003Ca id=\"table1\">BlendModeV2\u003C\u002Fa> include **normal, dissolve, darken, multiply, color burn, linear burn, darker color, lighten, screen, color dodge, linear dodge(add), lighter color, dodge, overlay, soft light, hard light, vivid light, linear light, pin light, hard mix, difference, exclusion, subtract, divide, hue, saturation, color, luminosity, grain extract, grain merge** all of 30 blend modes in total.      \nPart of the code for BlendMode V2 is from [Virtuoso Nodes for ComfyUI](https:\u002F\u002Fgithub.com\u002Fchrisfreilich\u002Fvirtuoso-nodes). Thanks to the original authors.\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_644ed5b5d98c.jpg)    \n\u003Cfont size=\"1\">*Preview of the Blend Mode V2\u003C\u002Ffont>\u003Cbr \u002F>     \n\n\u003Csup>4\u003C\u002Fsup>  The RGB color described by hexadecimal RGB format, like '#FA3D86'.    \n\n\u003Csup>5\u003C\u002Fsup>  The layer_image and layer_mask must be of the same size.    \n\n## Stars\n\n[![Star History Chart](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_8b10e36a769d.png)](https:\u002F\u002Fstar-history.com\u002F#chflame163\u002FComfyUI_LayerStyle_Advance&Date)\n\n# statement\n\nLayerStyle Advance nodes follows the MIT license, Some of its functional code comes from other open-source projects. Thanks to the original author. If used for commercial purposes, please refer to the original project license to authorization agreement.\n","# ComfyUI 层样式增强版\n\n[中文说明点这里](.\u002FREADME_CN.MD)    \n\n\n从 [ComfyUI Layer Style](https:\u002F\u002Fgithub.com\u002Fchflame163\u002FComfyUI_LayerStyle) 中分离出来的节点，主要是那些对依赖包有复杂要求的节点。\n \n \n\n## 示例工作流\n\n在 ```workflow``` 目录中有一些 JSON 工作流文件，这些是展示如何在 ComfyUI 中使用这些节点的示例。\n\n## 安装方法\n\n（以 ComfyUI 官方便携版和 Aki ComfyUI 包为例，其他 ComfyUI 环境请相应修改依赖环境目录）\n\n### 安装插件\n\n* 推荐使用 ComfyUI Manager 进行安装。\n\n* 或者在 ComfyUI 的插件目录下打开命令提示符窗口，例如 ```ComfyUI\\custom_nodes```，输入：\n  \n  ```\n  git clone https:\u002F\u002Fgithub.com\u002Fchflame163\u002FComfyUI_LayerStyle_Advance.git\n  ```\n\n* 或者下载压缩包并解压后，将解压得到的文件夹复制到 ```ComfyUI\\custom_nodes``` 目录下。\n\n### 安装依赖包\n\n* 对于 ComfyUI 官方便携版，在插件目录下双击 ```install_requirements.bat```；对于 Aki ComfyUI 包，则双击插件目录下的 ```install_requirements_aki.bat```，等待安装完成。\n\n* 或者手动安装依赖包：在 ComfyUI_LayerStyle 插件目录下打开命令提示符窗口，例如 ```ComfyUI\\custom_nodes\\ComfyUI_LayerStyle_Advance```，输入以下命令：\n\n&emsp;&emsp;对于 ComfyUI 官方便携版，输入：\n\n```\n..\\..\\..\\python_embeded\\python.exe -s -m pip install .\\whl\\docopt-0.6.2-py2.py3-none-any.whl\n..\\..\\..\\python_embeded\\python.exe -s -m pip install .\\whl\\hydra_core-1.3.2-py3-none-any.whl\n..\\..\\..\\python_embeded\\python.exe -s -m pip install -r requirements.txt\n.\\repair_dependency.bat\n```\n\n&emsp;&emsp;对于 Aki ComfyUI 包，输入：\n\n```\n..\\..\\python\\python.exe -s -m pip install .\\whl\\docopt-0.6.2-py2.py3-none-any.whl\n..\\..\\python\\python.exe -s -m pip install .\\whl\\hydra_core-1.3.2-py3-none-any.whl\n..\\..\\python\\python.exe -s -m pip install -r requirements.txt\n.\\repair_dependency.bat\n```\n\n* 重启 ComfyUI。\n\n### 下载模型文件\n\n中国国内用户可以从 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1T_uXMX3OKIWOJLPuLijrgA?pwd=1yye) 或 [夸克网盘](https:\u002F\u002Fpan.quark.cn\u002Fs\u002F4802d6bca7cb) 下载；其他用户则可以从 [huggingface.co\u002Fchflame163\u002FComfyUI_LayerStyle](https:\u002F\u002Fhuggingface.co\u002Fchflame163\u002FComfyUI_LayerStyle\u002Ftree\u002Fmain) 下载所有文件，并将其复制到 ```ComfyUI\\models``` 文件夹中。该链接提供了本插件所需的所有模型文件。\n或者根据各个节点的说明单独下载模型文件。  \n一些名为“Ultra”的节点会使用 vitmatte 模型，请下载 [vitmatte 模型](https:\u002F\u002Fhuggingface.co\u002Fhustvl\u002Fvitmatte-small-composition-1k\u002Ftree\u002Fmain) 并复制到 ```ComfyUI\u002Fmodels\u002Fvitmatte``` 文件夹中，上述下载链接中也包含了该模型。\n\n## 常见问题\n\n如果节点无法正常加载或使用过程中出现错误，请检查 ComfyUI 终端窗口中的错误信息。以下是常见错误及其解决方法。\n\n### 警告：xxxx.ini 未找到，使用默认 xxxx..\n\n此警告表示找不到 ini 文件，但不影响正常使用。若不想看到这些警告，请将插件目录中的所有 ```*.ini.example``` 文件重命名为 ```*.ini```。\n\n### ModuleNotFoundError: 没有名为 'psd_tools' 的模块\n\n此错误表明 ```psd_tools``` 没有正确安装。  \n\n解决方案：\n\n* 关闭 ComfyUI，在插件目录下打开终端窗口，执行以下命令：\n  ```..\u002F..\u002F..\u002Fpython_embeded\u002Fpython.exe -s -m pip install psd_tools```\n  如果在安装 psd_tool 时出现类似 ```ModuleNotFoundError: 没有名为 'docopt' 的模块``` 的错误，请下载 [docopt 的 whl 文件](https:\u002F\u002Fwww.piwheels.org\u002Fproject\u002Fdocopt\u002F) 并手动安装。\n  在终端窗口中执行以下命令：\n  ```..\u002F..\u002F..\u002Fpython_embeded\u002Fpython.exe -s -m pip install 路径\u002Fdocopt-0.6.2-py2.py3-none-any.whl```，其中 ```路径``` 是 whl 文件的存放路径。\n\n### 无法从 'cv2.ximgproc' 导入名称 'guidedFilter'\n\n此错误是由 ```opencv-contrib-python``` 包版本不正确，或被其他 OpenCV 包覆盖导致的。\n\n### NameError: 名称 'guidedFilter' 未定义\n\n问题原因与上一条相同。\n\n### 无法从 'transformers' 导入名称 'VitMatteImageProcessor'\n\n此错误是由 ```transformers``` 包版本过低引起的。\n\n### insightface 加载非常慢\n\n此错误是由 ```protobuf``` 包版本过低造成的。\n\n#### 对于以上三个依赖包的问题，请在插件文件夹中双击 ```repair_dependency.bat```（适用于官方 ComfyUI 便携版）或 ```repair_dependency_aki.bat```（适用于 ComfyUI-aki-v1.x），即可自动修复。\n\n### onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH 已设置，但无法加载 CUDA。请按照 GPU 要求页面上的说明安装正确版本的 CUDA 和 cuDNN。\n\n解决方案：\n重新安装 ```onnxruntime``` 依赖包。\n\n### 加载模型 xxx 时出错：我们无法连接到 huggingface.co ...\n\n请检查网络环境。如果在中国无法正常访问 huggingface.co，请尝试修改 huggingface_hub 包，强制使用镜像源。\n\n* 找到 ```huggingface_hub``` 包目录下的 ```constants.py``` 文件（通常位于虚拟环境路径下的 ```Lib\u002Fsite packages\u002Fhuggingface_hub```），\n  在 ```import os``` 后添加一行：\n  \n  ```\n  os.environ['HF_ENDPOINT'] = 'https:\u002F\u002Fhf-mirror.com'\n  ```\n\n### ValueError: 三元图中没有前景像素值 (xxxx...)\n\n此错误是在使用 ```PyMatting``` 方法处理遮罩边缘时，遮罩区域过大或过小导致的。    \n\n解决方案：\n\n* 请调整参数以改变遮罩的有效区域。或者改用其他方法处理边缘。\n\n### Requests.exceptions.ProxyError: HTTPSConnectionPool(xxxx...)\n\n当出现此错误时，请检查网络环境。\n\n### UnboundLocalError: 在赋值前引用了局部变量 'clip_processor'\n\n### UnboundLocalError: 在赋值之前引用了局部变量 'text_model'\n如果在执行 ```JoyCaption2``` 节点时出现此错误，并且已确认模型文件放置在正确目录中，请检查 ```transformers``` 依赖包的版本是否至少为 4.43.2 或更高。\n\n如果 ```transformers``` 版本高于或等于 4.45.0，同时出现以下错误信息：\n```\n加载模型时出错：无法直接创建 De️️scriptors。                                                                                           \n如果此调用来自 _pb2.py 文件，则您的生成代码已过时，必须使用 protoc >= 3.19.0 重新生成。                                \n......\n```\n请尝试将 ```protobuf``` 依赖包降级到 3.20.3，或者设置环境变量：```PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python```。\n\n\n## 更新\n\n**如果更新后仍然存在依赖包错误，请双击插件文件夹中的 ```repair_dependency.bat```（适用于官方 ComfyUI 便携版）或 ```repair_dependency_aki.bat```（适用于 ComfyUI-aki-v1.x），以重新安装依赖包。    \n\n* 修复了 Florence2 在较高版本的 Transformers 中运行时的问题，该解决方案来自 [kijai](https:\u002F\u002Fgithub.com\u002Fkijai\u002FComfyUI-Florence2)，感谢 @flybirdxx 的反馈。  \n  插件更新后，请从 ```florence2_models``` 文件夹中找到 ```modeling_florence2.py``` 和 ```configuration_florence2.py```，将其复制并覆盖到 ```ComfyUI\u002Fmodels\u002Fflorence2``` 目录下的模型文件夹中。\n* 提交了 [JimengImageToImageAPI](#JimengImageToImageAPI) 节点，使用 Instant Dreaming Image 3.0 API 编辑图像。在 [Volcano Engine](#https:\u002F\u002Fconsole.volcengine.com\u002Fiam\u002Fkeymanage) 上注册账号，并申请 API AccessKeyID 和 SecretAccessKey。将这些密钥填写到插件目录下的 ```api_key.ini``` 文件中。\n* 提交了 [SAM2UltraV2](SAM2UltraV2) 和 [LoadSAM2Model](LoadSAM2Model) 节点，将 SAM 模型改为外部输入，以便在使用多个节点时节省资源。\n* 提交了 [JoyCaptionBetaOne](JoyCaptionBetaOne)、[LoadJoyCaptionBeta1Model](LoadJoyCaptionBeta1Model) 和 [JoyCaptionBeta1ExtraOptions](JoyCaptionBeta1ExtraOptions) 节点，使用 JoyCaption Beta One 模型生成提示词。\n* 提交了 [SaveImagePLusV2](SaveImagePlusV2) 节点，增加了自定义文件名功能，并可设置图像的 DPI。\n* 提交了 [GeminiImageEdit](#GeminiImageEdit) 节点，支持使用 gemini-2.0-flash-exp-image-generation API 进行图像编辑。\n* 提交了 [GeminiV2](#GeminiV2) 和 [ObjectDetectorGeminiV2](#ObjectDetectorGeminiV2) 节点，使用 google-genai 依赖包，支持 gemini-2.0-flash-exp 和 gemini-2.5-pro-exp-03-25 模型。\n* 添加了 QuarkNetdisk 模型下载链接。\n* 支持 numpy 2.x 依赖包。\n* 提交了 [DeepseekAPI_V2](#DeepseekAPI_V2) 节点，支持阿里云和 VolcEngine 的 API。\n* 提交了 [Collage](#Collage) 节点，用于将多张图片拼接成一张大图。\n* 提交了 [DeepSeekAPI](DeepSeekAPI) 节点，使用 DeepSeek API 进行文本推理。\n* 提交了 [SegmentAnythingUltraV3](#SegmentAnythingUltraV3) 和 [LoadSegmentAnythingModels](#LoadSegmentAnythingModels) 节点，避免在使用多个 SAM 节点时重复加载模型。\n* 提交了 [ZhipuGLM4](#ZhipuGLM4) 和 [ZhipuGLM4V](#ZhipuGLM4V) 节点，使用智谱 API 进行文本和视觉推理。目前智谱的 GLM-4-Flash 和 glm-4v-flash 模型是免费的。\n请在 [https:\u002F\u002Fbigmodel.cn\u002Fusercenter\u002Fproj-mgmt\u002Fapikeys](https:\u002F\u002Fbigmodel.cn\u002Fusercenter\u002Fproj-mgmt\u002Fapikeys) 免费申请 API 密钥，并将密钥填写到 ```zhipu_api_key=``` 中。\n* 提交了 [Gemini](#Gemini) 节点，使用 Gemini API 进行文本或视觉推理。\n* 提交了 [ObjectDetectorGemini](#ObjectDetectorGemini) 节点，使用 Gemini API 进行目标检测。\n* 提交了 [DrawBBOXMaskV2](#DrawBBOXMaskV2) 节点，可以绘制圆角矩形掩码。\n* 提交了 [SmolLM2](#SmolLM2)、[SmolVLM](#SmolVLM)、[LoadSmolLM2Model](#LoadSmolLM2Model) 和 [LoadSmolVLMModel](#LoadSmolVLMModel) 节点，使用 SMOL 模型进行文本推理和图像识别。\n请从 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1_jeNosYdDqqHkzpnSNGfDQ?pwd=to5b) 或 [huggingface](https:\u002F\u002Fhuggingface.co\u002Fchflame163\u002FComfyUI_LayerStyle\u002Ftree\u002Fmain\u002FComfyUI\u002Fmodels\u002Fsmol) 下载模型文件，并将其复制到 ```ComfyUI\u002Fmodels\u002Fsmol``` 文件夹。\n* Florence2 增加了对 [gokaygokay\u002FFlorence-2-Flux-Large](https:\u002F\u002Fhuggingface.co\u002Fgokaygokay\u002FFlorence-2-Flux-Large) 和 [gokaygokay\u002FFlorence-2-Flux](https:\u002F\u002Fhuggingface.co\u002Fgokaygokay\u002FFlorence-2-Flux) 模型的支持，\n请从 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1wBwJZjgMUKt0zluLAetMOQ?pwd=d6fb) 或 [huggingface](https:\u002F\u002Fhuggingface.co\u002Fchflame163\u002FComfyUI_LayerStyle\u002Ftree\u002Fmain\u002FComfyUI\u002Fmodels\u002Fflorence2) 下载 Florence-2-Flux-Large 和 Florence-2-Flux 文件夹，并将其复制到 ```ComfyUI\u002Fmodels\u002Fflorence2``` 文件夹。\n* 从 requirements.txt 文件中移除了 [ObjectDetector YOLOWorld](#ObjectDetectorYOLOWorld) 节点所需的依赖项。若要使用该节点，请手动安装相关依赖包。\n* 将 [ComfyUI Layer Style](https:\u002F\u002Fgithub.com\u002Fchflame163\u002FComfyUI_LayerStyle) 中的部分节点剥离至本仓库。\n\n\n## 说明\n\n### \u003Ca id=\"table1\">Collage\u003C\u002Fa>\n随机将输入的多张图片拼接成一张大图。\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_af645642ddc2.jpg)    \n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_81e256eac369.jpg)    \n\n* 增加了多语言支持，现支持中文、法语、日语、韩语和俄语。此功能由 [ComfyUI-Globalization-Node-Translation](https:\u002F\u002Fgithub.com\u002Fyamanacn\u002FComfyUI-Globalization-Node-Translation) 开发，感谢原作者。\n* images：输入的图片。\n* florence2_model：可选输入，用于目标识别和裁剪。\n* canvas_width：输出图像的宽度。\n* canvas_height：输出图像的高度。\n* border_width：边框宽度。\n* rounded_rect_radius：边框圆角半径。\n* uniformity：图片拼接大小的随机性。取值范围为 0–1，数值越大，拼接大小的随机性越高。\n* background_color：背景颜色。\n* seed：随机数种子。\n* control_after_generate：种子变化选项。若固定此选项，则每次生成的随机数将始终相同。\n* object_prompt：当连接 florence2_model 时，此处填写用于目标识别的提示词。\n\n\n### \u003Ca id=\"table1\">QWenImage2Prompt\u003C\u002Fa>\n\n根据图片推断提示词。该节点是对 [ComfyUI_VLM_nodes](https:\u002F\u002Fgithub.com\u002Fgokayfem\u002FComfyUI_VLM_nodes) 中的 ```UForm-Gen2 Qwen Node``` 的重新封装，感谢原作者。\n请从 [huggingface](https:\u002F\u002Fhuggingface.co\u002Funum-cloud\u002Fuform-gen2-qwen-500m) 或 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1oRkUoOKWaxGod_XTJ8NiTA?pwd=d5d2) 下载模型文件，存入 ```ComfyUI\u002Fmodels\u002FLLavacheckpoints\u002Ffiles_for_uform_gen2_qwen``` 文件夹。\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_ef5122ddb1db.jpg)    \n\n节点选项：   \n\n* question：UForm-Gen-QWen 模型的提示语。\n\n### \u003Ca id=\"table1\">LlamaVision\u003C\u002Fa>\n使用 Llama 3.2 视觉模型进行本地推理。可用于生成提示词。该节点的部分代码来自 [ComfyUI-PixtralLlamaMolmoVision](https:\u002F\u002Fgithub.com\u002FSeanScripts\u002FComfyUI-PixtralLlamaMolmoVision)，感谢原作者。\n要使用此节点，需将 ```transformers``` 升级至 4.45.0 或更高版本。\n从 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F18oHnTrkNMiwKLMcUVrfFjA?pwd=4g81) 或 [huggingface\u002FSeanScripts](https:\u002F\u002Fhuggingface.co\u002FSeanScripts\u002FLlama-3.2-11B-Vision-Instruct-nf4\u002Ftree\u002Fmain) 下载模型，并将其复制到 ```ComfyUI\u002Fmodels\u002FLLM``` 目录下。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_8609d8f539c7.jpg)    \n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_daa651905eb3.jpg)    \n\n* image: 图像输入。\n* model: 目前仅支持 “Llama-3.2-11B-Vision-Instruct-nf4” 模型。\n* system_prompt: LLM 模型的系统提示词。\n* user_prompt: LLM 模型的用户提示词。\n* max_new_tokens: LLM 模型的最大生成 token 数。\n* do_sample: LLM 模型的采样开关。\n* top-p: LLM 模型的 top-p 参数。\n* top_k: LLM 模型的 top-k 参数。\n* stop_strings: 停止字符串。\n* seed: 随机数种子。\n* control_after_generate: 种子变化选项。若固定此选项，则每次生成的随机数将始终相同。\n* include_prompt_in_output: 输出是否包含提示词。\n* cache_model: 是否缓存模型。\n\n### \u003Ca id=\"table1\">JoyCaption2\u003C\u002Fa>\n使用 JoyCaption-alpha-two 模型进行本地推理。可用于生成提示词。该节点是 https:\u002F\u002Fhuggingface.co\u002FJohn6666\u002Fjoy-caption-alpha-two-cli-mod 在 ComfyUI 中的实现，感谢原作者。\n从 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1dOjbUEacUOhzFitAQ3uIeQ?pwd=4ypv) 和 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1mH1SuW45Dy6Wga7aws5siQ?pwd=w6h5)，\n或 [huggingface\u002FOrenguteng](https:\u002F\u002Fhuggingface.co\u002FOrenguteng\u002FLlama-3.1-8B-Lexi-Uncensored-V2\u002Ftree\u002Fmain) 和 [huggingface\u002Funsloth](https:\u002F\u002Fhuggingface.co\u002Funsloth\u002FMeta-Llama-3.1-8B-Instruct\u002Ftree\u002Fmain) 下载模型，然后将其复制到 ```ComfyUI\u002Fmodels\u002FLLM``` 目录下。\n从 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1pkVymOsDcXqL7IdQJ6lMVw?pwd=v8wp) 或 [huggingface\u002Fgoogle](https:\u002F\u002Fhuggingface.co\u002Fgoogle\u002Fsiglip-so400m-patch14-384\u002Ftree\u002Fmain) 下载模型，并将其复制到 ```ComfyUI\u002Fmodels\u002Fclip``` 目录下。\n从 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F12TDwZAeI68hWT6MgRrrK7Q?pwd=d7dh) 或 [huggingface\u002FJohn6666](https:\u002F\u002Fhuggingface.co\u002FJohn6666\u002Fjoy-caption-alpha-two-cli-mod\u002Ftree\u002Fmain) 下载 ```cgrkzexw-599808``` 文件夹，并将其复制到 ```ComfyUI\u002Fmodels\u002FJoy_caption``` 目录下。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_39bb8846d322.jpg)    \n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_897774d9a1f5.jpg)    \n\n* image: 图像输入。\n* extra_options: 输入额外选项。\n* llm_model: 可选择两种 LLM 模型，分别为 Orenguteng\u002FLlama-3.1-8B-Lexi-Uncensored-V2 和 unsloth\u002FMeta-Llama-3.1-8B-Instruct。\n* device: 模型加载设备。目前仅支持 CUDA。\n* dtype: 模型精度，包括 nf4 和 bf16。\n* vlm_lora: 是否加载文本适配器。\n* caption_type: 标题类型选项，包括：“描述性”、“非正式描述性”、“训练提示”、“MidJourney”、“Booru 标签列表”、“类似 Booru 的标签列表”、“艺术评论家”、“商品列表”、“社交媒体帖子”。\n* caption_length: 标题长度。\n* user_prompt: LLM 模型的用户提示词。若此处有内容，则会覆盖所有 caption_type 和 extra_options 的设置。\n* max_new_tokens: LLM 模型的最大生成 token 数。\n* do_sample: LLM 模型的采样开关。\n* top-p: LLM 模型的 top-p 参数。\n* temperature: LLM 模型的温度参数。\n* cache_model: 是否缓存模型。\n\n### \u003Ca id=\"table1\">JoyCaption2Split\u003C\u002Fa>\n该节点将 JoyCaption2 的模型加载与推理分离，当使用多个 JoyCaption2 节点时，可共享模型以提高效率。\n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_de4235c4eedd.jpg)    \n\n* image: 图像输入。\n* joy2_model: JoyCaption 模型输入。\n* extra_options: 输入额外选项。\n* caption_type: 标题类型选项，包括：“描述性”、“非正式描述性”、“训练提示”、“MidJourney”、“Booru 标签列表”、“类似 Booru 的标签列表”、“艺术评论家”、“商品列表”、“社交媒体帖子”。\n* caption_length: 标题长度。\n* user_prompt: 模型的用户提示词。若此处有内容，则会覆盖所有 caption_type 和 extra_options 的设置。\n* max_new_tokens: 模型的最大生成 token 数。\n* do_sample: 模型的采样开关。\n* top-p: 模型的 top-p 参数。\n* temperature: 模型的温度参数。\n\n### \u003Ca id=\"table1\">LoadJoyCaption2Model\u003C\u002Fa>\nJoyCaption2 的模型加载节点，与 JoyCaption2Split 配合使用。\n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d47183d75cf5.jpg)    \n\n* llm_model: 可选择两种 LLM 模型，分别为 Orenguteng\u002FLlama-3.1-8B-Lexi-Uncensored-V2 和 unsloth\u002FMeta-Llama-3.1-8B-Instruct。\n* device: 模型加载设备。目前仅支持 CUDA。\n* dtype: 模型精度，包括 nf4 和 bf16。\n* vlm_lora: 是否加载文本适配器。\n\n### \u003Ca id=\"table1\">JoyCaption2ExtraOptions\u003C\u002Fa>\nJoyCaption2 的额外选项参数节点。\n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_c35d63e2d04c.jpg)    \n\n* refer_character_name: 若图像中存在人物\u002F角色，必须以 {name} 的形式提及。\n* exclude_people_info: 不包含无法改变的人体特征信息（如种族、性别等），但应保留可变属性（如发型）。\n* include_lighting: 包含光照信息。\n* include_camera_angle: 包含相机角度信息。\n* include_watermark: 包含是否存在水印的信息。\n* include_JPEG_artifacts: 包含是否存在 JPEG 码块效应的信息。\n* include_exif: 若为照片，必须包含可能使用的相机型号及光圈、快门速度、ISO 等详细信息。\n* exclude_sexual: 不得包含任何色情内容；保持 PG 分级。\n* exclude_image_resolution: 不得提及图像分辨率。\n* include_aesthetic_quality: 必须包含关于图像主观美学质量的描述，从低到极高。\n* include_composition_style: 包含图像构图风格信息，例如引导线、三分法或对称性。\n* exclude_text: 不得提及图像中的任何文字。\n* specify_depth_field: 明确景深范围，以及背景是清晰还是模糊。\n* specify_lighting_sources: 如适用，说明可能使用了人工或自然光源。\n* do_not_use_ambiguous_language: 不得使用模棱两可的语言。\n* include_nsfw: 包含图像属于 SFW、暗示性还是 NSFW 的信息。\n* only_describe_most_important_elements: 仅描述图像中最重要元素。\n* character_name: 人物\u002F角色名称，若选择了 ```refer_character_name```。\n\n### \u003Ca id=\"table1\">JoyCaptionBetaOne\u003C\u002Fa>   \n使用 JoyCaption Beta One 模型生成提示词。该节点是 https:\u002F\u002Fhuggingface.co\u002Ffancyfeast\u002Fllama-joycaption-beta-one-hf-llava 在 ComfyUI 中的实现。    \n\n首次使用该节点时，模型将自动下载到 ComfyUI\u002Fmodels\u002FLLavacheckpoints\u002Fllama-joycaption-beta-one-hf-llava 文件夹中。    \n\n您也可以从 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1AAh8KXtBK6hIeSLgP-hjuA?pwd=avcc) 或 [夸克网盘](https:\u002F\u002Fpan.quark.cn\u002Fs\u002Fa69a5d6c9b99) 或 [Hugging Face\u002Ffancyfeast\u002Fllama-joycaption-beta-one-hf-llava](https:\u002F\u002Fhuggingface.co\u002Ffancyfeast\u002Fllama-joycaption-beta-one-hf-llava\u002Ftree\u002Fmain) 下载 ```llama-joycaption-beta-one-hf-llava``` 文件夹，并将其复制到 ```ComfyUI\u002Fmodels\u002FLLavacheckpoints``` 目录下。\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d97e4207f466.jpg)    \n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_c3c4575f16f2.jpg)    \n\n* image：图像输入。\n* joycaption_beta1_model：JoyCaption Beta One 模型输入。该模型从 ```Load JoyCaption Beta One Model``` 节点加载。\n* extra_options：输入额外选项。\n* caption_type：字幕类型选项，包括：“描述性”、“描述性（休闲）”、“直白”、“Stable Diffusion 提示词”、“MidJourney”、“Danbooru 标签列表”、“e621 标签列表”、“Rule34 标签列表”、“类似 Booru 的标签列表”、“艺术评论家”、“商品列表”和“社交媒体帖子”。\n* caption_length：字幕长度。\n* max_new_tokens：模型的 max_new_token 参数。\n* top-p：模型的 top-p 参数。\n* top-k：模型的 top-k 参数。\n* temperature：模型的温度参数。\n* user_prompt：模型的用户提示词。如果此处有内容，则会覆盖所有 caption_type 和 extra_options 的设置。\n\n### \u003Ca id=\"table1\">LoadJoyCaptionBeta1Model\u003C\u002Fa>\nJoyCaption Beta One 的模型加载节点，与 JoyCaption Beta One 配合使用。\n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_a5de5a52fbc3.jpg)    \n\n* model：目前仅可选择 ```fancyfeast\u002Fllama-joycaption-beta-one-hf-llava``` 模型。\n* quantization_mode：模型量化模式有三种选项：nf4、int8 和 bf16。\n* device：模型加载设备。\n\n### \u003Ca id=\"table1\">JoyCaptionBeta1ExtraOptions\u003C\u002Fa>\nJoyCaption Beta One 的 extra_options 参数节点。\n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_a9f2ae5decdf.jpg)   \n\n* refer_character_name：如果图像中有人物\u002F角色，必须以 {name} 来指代他们。\n* exclude_people_info：不要包含无法改变的人或角色信息（如种族、性别等），但仍需包含可变属性（如发型）。\n* include_lighting：包含光照信息。\n* include_camera_angle：包含相机角度信息。\n* include_watermark：包含是否有水印的信息。\n* include_JPEG_artifacts：包含是否存在 JPEG 艺术伪影的信息。\n* include_exif：如果是照片，必须包含可能使用的相机信息以及光圈、快门速度、ISO 等细节。\n* exclude_sexual：不要包含任何性相关的内容；保持 PG 级别。\n* exclude_image_resolution：不要提及图像的分辨率。\n* include_aesthetic_quality：必须包含关于图像主观美学质量的信息，从低到非常高。\n* include_composition_style：包含图像构图风格的信息，例如引导线、三分法或对称性。\n* exclude_text：不要提及图像中的任何文字。\n* specify_depth_field：指定景深范围，以及背景是清晰还是模糊。\n* specify_lighting_sources：如果适用，说明可能使用了人工或自然光源。\n* do_not_use_ambiguous_language：不要使用任何模棱两可的语言。\n* include_nsfw：包含图像是否属于 SFW、暗示性或 NSFW。\n* only_describe_most_important_elements：仅描述图像中最重要元素。\n* do_not_include_artist_name_or_title：如果是艺术作品，不要包含艺术家姓名或作品标题。\n* identify_image_orientation：识别图像方向（竖版、横版或正方形）及明显的长宽比。\n* use_vulgar_slang_and_profanity：使用粗俗俚语和脏话。\n* do_not_use_polite_euphemisms：不要使用委婉语——直接采用直白、随意的表达方式。\n* include_character_age：在适用情况下，包含人物\u002F角色的年龄信息。\n* include_camera_shot_type：说明图像拍摄的是特写、近景、中近景、中景、牛仔镜头、中远景、远景还是超远景。\n* exclude_mood_feeling：不要提及图像的情绪\u002F感觉等。\n* include_camera_vantage_height：明确说明拍摄视角高度（平视、低角度虫瞰、鸟瞰、无人机、屋顶等）。\n* mention_watermark：如果有水印，必须提及。\n* avoid_meta_descriptive_phrases：您的回复将被文本转图像模型使用，因此请避免使用无用的元描述短语，如“这张图像显示……”、“您正在观看……”等。\n* character_name：人物\u002F角色名称，若选择 ```refer_character_name```。\n\n\n### \u003Ca id=\"table1\">PhiPrompt\u003C\u002Fa>\n\n使用 Microsoft Phi 3.5 文本和视觉模型进行本地推理。可用于生成提示词、处理提示词或从图像中推断提示词。运行此模型至少需要 16GB 显存。\n从 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1BdTLdaeGC3trh1U3V-6XTA?pwd=29dh) 或 [Hugging Face\u002Fmicrosoft\u002FPhi-3.5-vision-instruct](https:\u002F\u002Fhuggingface.co\u002Fmicrosoft\u002FPhi-3.5-vision-instruct\u002Ftree\u002Fmain) 以及 [Hugging Face\u002Fmicrosoft\u002FPhi-3.5-mini-instruct](https:\u002F\u002Fhuggingface.co\u002Fmicrosoft\u002FPhi-3.5-mini-instruct\u002Ftree\u002Fmain) 下载模型文件，并将其复制到 ```ComfyUI\\models\\LLM``` 文件夹中。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_e9e7f4c9640e.jpg)    \n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_39b6c49938ef.jpg)    \n\n* image：可选输入。输入图像将作为 Phi-3.5-vision-instruct 的输入。\n* model：可选择加载 Phi-3.5-vision-instruct 或 Phi-3.5-mini-instruct 模型。默认值 auto 会根据是否有图像输入自动加载相应模型。\n* device：模型加载设备。支持 CPU 和 CUDA。\n* dtype：模型加载精度有三种选项：fp16、bf16 和 fp32。\n* cache_model：是否缓存模型。\n* system_prompt：Phi-3.5-mini-instruct 的系统提示词。\n* user_prompt：LLM 模型的用户提示词。\n* do_sample：LLM 的 do_Sample 参数默认为 True。\n* temperature：LLM 的温度参数默认为 0.5。\n* max_new_tokens：LLM 的 max_new_token 参数默认为 512。\n\n### \u003Ca id=\"table1\">Gemini\u003C\u002Fa>\n使用 Google Gemini API 的文本和视觉模型进行本地推理。可用于生成提示词、处理提示词，或从图像中推断提示词。\n请在 [Google AI Studio](https:\u002F\u002Fmakersuite.google.com\u002Fapp\u002Fapikey) 上申请您的 API 密钥，并将其填写到插件根目录下的 `api_key.ini` 文件中。该文件默认名为 `api_key.ini.example`。首次使用时，需将文件后缀改为 `.ini`。用文本编辑软件打开文件，在 `google_api_key=` 后填入您的 API 密钥并保存。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_4c5bf5b58444.jpg)    \n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_b914af66f705.jpg)    \n\n* image_1：可选输入。如果此处有图像输入，请在 user_dempt 中说明 'image_1' 的用途。\n* image_2：可选输入。如果此处有图像输入，请在 user_dempt 中说明 'image_2' 的用途。\n* model：选择 Gemini 模型。\n* max_output_tokens：Gemini 的 max_output_token 参数默认为 4096。\n* temperature：Gemini 的 temperature 参数默认为 0.5。\n* words_limit：回复的默认字数限制为 200。\n* response_language：回复的语言。\n* system_prompt：系统提示。\n* user_prompt：用户提示。\n\n### \u003Ca id=\"table1\">GeminiV2\u003C\u002Fa>\n在 Gemini 节点的基础上，切换至使用新的 google-genai 依赖包，该包支持最新的 gemini-2.0-flash、gemini-2.0-flash-lite 和 gemini-2.5-pro-exp-03-25 模型。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_ed4a1a3c4381.jpg)       \n\n在原有节点基础上新增：    \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_56bf416d01df.jpg)     \n* seed：请求 Google API 时使用的随机种子值。    \n\n\n### \u003Ca id=\"table1\">GeminiImageEdit\u003C\u002Fa>\n使用 gemini-2.0-flash-exp-image-generation 模型实现多模态图像编辑。    \n请在 [Google AI Studio](https:\u002F\u002Fmakersuite.google.com\u002Fapp\u002Fapikey) 上申请您的 API 密钥，并将其填写到插件根目录下的 `api_key.ini` 文件中。该文件默认名为 `api_key.ini.example`。首次使用时，需将文件后缀改为 `.ini`。用文本编辑软件打开文件，在 `google_api_key=` 后填入您的 API 密钥并保存。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_ace6ddb7639c.jpg)    \n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_5c3a49336145.jpg)    \n\n* image：输入图像。\n* image_2：可选的第二张输入图像。\n* image_3：可选的第三张输入图像。\n* model：选择 Gemini 模型。目前仅支持 gemini-2.0-flash-exp-image-generation 模型。\n* temperature：Gemini 的 temperature 参数默认为 0.5。\n* seed：请求 Google API 时使用的随机种子值。\n* control_after_generate：设置是否每次生成后都更换种子。\n* user_prompt：用户提示。\n\n### \u003Ca id=\"table1\">DeepSeekAPI\u003C\u002Fa>\n使用 DeepSeek API 进行文本推理，支持多节点上下文拼接。         \n请在 [https:\u002F\u002Fplatform.deepseek.com\u002Fapi_keys](https:\u002F\u002Fplatform.deepseek.com\u002Fapi_keys) 免费申请 API 密钥，并将其填写到插件根目录下的 `api_key.ini` 文件中。该文件默认名为 `api_key.ini.example`。首次使用时，需将文件后缀改为 `.ini`。用文本编辑软件打开文件，在 `deepseek_api_key=` 后填入您的 API 密钥并保存。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_5ed0687dd6dd.jpg)    \n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_147c6e9e552a.jpg)    \n\n* history：DeepSeekAPI 节点的历史记录，可选输入。如果有输入，历史记录将被用作上下文。\n* model：选择 DeepSeek 模型，目前只有一个选项：“deepseek-chat”，即 DeepSeek-V3 模型。\n* max_tokens：DeepSeek 的 max_token 参数默认为 4096。\n* temperature：DeepSeek 的 temperature 参数默认为 1。\n* top_p：DeepSeek 的 top_p 参数默认为 1。\n* presence_penalty：DeepSeek 的 presence_penalty 参数默认为 0。\n* frequency_penalty：DeepSeek 的 frequency_penalty 参数默认为 0。\n* history_length：历史记录长度。超过此长度的记录将被丢弃。\n* system_prompt：系统提示。\n* user_prompt：用户提示。\n\n输出：\n* text：DeepSeek 的输出文本。\n* history：DeepSeek 对话的历史记录。\n\n### \u003Ca id=\"table1\">DeepSeekAPI_V2\u003C\u002Fa>    \n在 [DeepSeekAPI](#DeepSeekAPI) 节点的基础上，新增支持阿里云和火山引擎的 DeepSeek API，这两家中国云服务提供商将提供更稳定的 API 服务。\n     \n* 在 [火山引擎](https:\u002F\u002Fconsole.volcengine.com\u002Fai\u002Fapi\u002Fkey\u002F) 申请火山引擎 API 密钥时，可获得 50 万 token 的免费额度。如果您在申请时填写我的邀请码 ```27RVS1QN```，还将额外获得 375 万个 R1 模型的免费 token。\n\n* 在 [阿里云](https:\u002F\u002Fbailian.console.aliyun.com\u002F?apiKey=1#\u002Fapi-key) 申请阿里云 API 密钥。\n\n* 将获取到的 API 密钥分别填写到 `api_key.ini` 文件中的 `volcengine_api_key` 和 `aliyun_api_key` 字段中。该文件位于插件根目录，默认名为 `api_key.ini.example`。编辑后将文件扩展名改为 `.ini`。\n    \n新增选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_6c783f7c72a3.jpg)\n\n* time_out：超时时间默认设置为 300 秒。\n\n\n### \u003Ca id=\"table1\">ZhipuGLM4\u003C\u002Fa>\n使用智谱 API 进行文本推理，支持多节点上下文拼接。   \n请在 [https:\u002F\u002Fbigmodel.cn\u002Fusercenter\u002Fproj-mgmt\u002Fapikeys](https:\u002F\u002Fbigmodel.cn\u002Fusercenter\u002Fproj-mgmt\u002Fapikeys) 免费申请 API 密钥，并将其填写到插件根目录下的 `api_key.ini` 文件中。该文件默认名为 `api_key.ini.example`。首次使用时，需将文件后缀改为 `.ini`。用文本编辑软件打开文件，在 `zhipu_api_key=` 后填入您的 API 密钥并保存。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d6dee46fff61.jpg)    \n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_0b1e103e1120.jpg)    \n\n* history：GLM4 节点的历史记录，可选输入。如果有输入，历史记录将被用作上下文。\n* model：选择 GLM4 模型。GLM-4-Flash 是一款免费模型。\n* user_prompt：用户提示。\n* history_length：历史记录长度。超过此长度的记录将被丢弃。\n\n输出：\n* text：GLM4 的输出文本。\n* history：GLM4 对话的历史记录。\n\n### \u003Ca id=\"table1\">智普GLM4V\u003C\u002Fa>\n使用智普API进行视觉推理。\n请在[https:\u002F\u002Fbigmodel.cn\u002Fusercenter\u002Fproj-mgmt\u002Fapikeys](https:\u002F\u002Fbigmodel.cn\u002Fusercenter\u002Fproj-mgmt\u002Fapikeys)免费申请API密钥，并将其填写到```api_key.ini```文件中。该文件位于插件的根目录下，默认名称为```api_key.ini.example```。首次使用时，需将文件后缀改为```.ini```。用文本编辑软件打开文件，在```zhipu_api_key=```后填入您的API密钥并保存。\n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_a40942b82e21.jpg)    \n\n* image：输入图像。\n* model：选择GLM4V模型。glm-4v-flash是免费模型。\n* user_prompt：用户提示词。\n\n输出：\n* text：GLM4V的输出文本。\n\n\n### \u003Ca id=\"table1\">SmolLM2\u003C\u002Fa>\n使用[SmolLM2](https:\u002F\u002Fhuggingface.co\u002FHuggingFaceTB\u002FSmolLM2-135M-Instruct)模型进行本地推理。\n\n从[百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1_jeNosYdDqqHkzpnSNGfDQ?pwd=to5b)或[Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fchflame163\u002FComfyUI_LayerStyle\u002Ftree\u002Fmain\u002FComfyUI\u002Fmodels\u002Fsmol)下载模型文件，找到SmolLM2-135M-Instruct、SmolLM2-360M-Instruct、SmolLM2-1.7B-Instruct文件夹，至少下载其中一个，然后复制到```ComfyUI\u002Fmodels\u002Fsmol```文件夹。\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_e322df187647.jpg)    \n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_c4b2f66c208f.jpg)    \n\n* smolLM2_model：SmolLM2模型的输入由[LoadSmolLM2Model](#LoadSmolLM2Model)节点加载。\n* max_new_tokens：最大token数默认为512。\n* do_sample：do_Sample参数默认为True。\n* temperature：temperature参数默认为0.5。\n* top-p：top_p参数默认为0.9。\n* system_prompt：系统提示词。\n* user_prompt：用户提示词。\n\n### \u003Ca id=\"table1\">LoadSmolLM2Model\u003C\u002Fa>\n加载SmolLM2模型。\n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_adff78ac7331.jpg)    \n\n* model：SmolLM2模型有三个选项：SmolLM2-135M-Instruct、SmolLM2-360M-Instruct和SmolLM2-1.7B-Instruct。\n* dtype：模型精度有两个选项：bf16和fp32。\n* device：模型加载设备有两个选项：cuda或cpu。\n\n### \u003Ca id=\"table1\">SmolVLM\u003C\u002Fa>\n使用[Hugging Face](https:\u002F\u002Fhuggingface.co\u002FHuggingFaceTB\u002FSmolVLM-Instruct)上的轻量级视觉模型进行本地推理。\n\n从[百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1_jeNosYdDqqHkzpnSNGfDQ?pwd=to5b)或[Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fchflame163\u002FComfyUI_LayerStyle\u002Ftree\u002Fmain\u002FComfyUI\u002Fmodels\u002Fsmol)下载```SmolVLM-Instruct```文件夹，并复制到```ComfyUI\u002Fmodels\u002Fsmol```文件夹。\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_af892b2ae005.jpg)    \n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_69aea52cb421.jpg)    \n\n* image：图像输入，支持批量图像。\n* smolVLM_model：SmolVLM模型的输入由[LoadSmolVLMModel](#LoadSmolVLMModel)节点加载。\n* max_new_tokens：最大token数默认为512。\n* user_prompt：用户提示词。\n\n### \u003Ca id=\"table1\">LoadSmolVLMModel\u003C\u002Fa>\n加载SmolVLM模型。\n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_1a445a64ad61.jpg)    \n\n* model：目前SmolVLM模型仅有一个选项：SmolVLM-Instruct。\n* dtype：模型精度有两个选项：bf16和fp32。\n* device：模型加载设备有两个选项：cuda或cpu。\n\n### \u003Ca id=\"table1\">JimengImageToImageAPI\u003C\u002Fa>\n使用Jimeng API编辑图片。\n请在[火山引擎](#https:\u002F\u002Fconsole.volcengine.com\u002Fiam\u002Fkeymanage)注册账号，申请API AccessKeyID和SecretAccessKey，并将其填写到```api_key.ini```文件中。该文件位于插件的根目录下，默认名称为```api_key.ini.example```。首次使用时，需将文件后缀改为'.ini'。用文本编辑软件打开文件，在```volcengine_SecretAccessKey=```和```volcengine_AccessKeyID=```后填入相应值。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_3fbd51abd42c.jpg)    \n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_bea9a661f925.jpg)    \n\n* image：输入图像。\n* model：选择DreamMap和Life Map模型。目前仅支持Jimeng_i2i-v30模型。\n* time_out：等待API返回的最大时间限制，单位为秒。超过此时间，节点将停止运行。\n* scale：Jimeng_i2iuv30的scale参数默认为0.5。\n* seed：种子值。\n* prompt：提示词。\n\n### \u003Ca id=\"table1\">UserPromptGeneratorTxtImg\u003C\u002Fa>\n\n用于生成SD文本转图像提示词的预设用户提示。\n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_3ec7e233e7ed.jpg)\n\n* template：提示词模板。目前仅提供'SD txt2img提示'。\n* describe：提示词描述。在此输入简单的描述。\n* limit_word：输出提示词的最大长度限制。例如，200表示输出文本将被限制在200个单词以内。\n\n### \u003Ca id=\"table1\">UserPromptGeneratorTxtImgWithReference\u003C\u002Fa>\n\n基于输入内容生成SD文本转图像提示词的预设用户提示。\n\n节点选项：     \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_66383f019e71.jpg)\n\n* reference_text：参考文本输入。通常为图像的风格描述。\n* template：提示词模板。目前仅提供'SD txt2img提示'。\n* describe：提示词描述。在此输入简单的描述。\n* limit_word：输出提示词的最大长度限制。例如，200表示输出文本将被限制在200个单词以内。\n\n### \u003Ca id=\"table1\">UserPromptGeneratorReplaceWord\u003C\u002Fa>\n\n用于将文本中的关键词替换为不同内容的预设用户提示。这不仅是简单的替换，还会根据提示词的上下文对文本进行逻辑排序，以确保输出内容的合理性。\n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_6d1422aebbf8.jpg)\n\n* orig_prompt：原始提示词输入。\n* template：提示词模板。目前仅提供'提示词替换'。\n* exclude_word：需要排除的关键词。\n* replace_with_word：将替换exclude_word的词语。\n\n### \u003Ca id=\"table1\">PromptTagger\u003C\u002Fa>\n\n根据图像推理生成提示词，可以替换提示词中的关键词。该节点目前使用 Google Gemini API 作为后端服务，请确保网络环境能够正常访问 Gemini。\n请在 [Google AI Studio](https:\u002F\u002Fmakersuite.google.com\u002Fapp\u002Fapikey) 上申请您的 API 密钥，并将其填写到插件根目录下的 `api_key.ini` 文件中。该文件默认名为 `api_key.ini.example`，首次使用时需将文件后缀改为 `.ini`。用文本编辑软件打开文件，在 `google_api_key=` 后填入您的 API 密钥并保存。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_90f729525601.jpg)    \n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_1b946e9d1d39.jpg)    \n\n* api: 使用的 API。目前有两个选项：“gemini-1.5-flash” 和 “google-gemini”。\n* token_limit: 生成提示词的最大令牌限制。\n* exclude_word: 需要排除的关键词。\n* replace_with_word: 将用于替换 `exclude_word` 的词语。\n\n### \u003Ca id=\"table1\">PromptEmbellish\u003C\u002Fa>\n\n输入简单的提示词，输出经过润色的提示词；支持输入图片作为参考，并且支持中文输入。该节点目前使用 Google Gemini API 作为后端服务，请确保网络环境能够正常访问 Gemini。\n请在 [Google AI Studio](https:\u002F\u002Fmakersuite.google.com\u002Fapp\u002Fapikey) 上申请您的 API 密钥，并将其填写到插件根目录下的 `api_key.ini` 文件中。该文件默认名为 `api_key.ini.example`，首次使用时需将文件后缀改为 `.ini`。用文本编辑软件打开文件，在 `google_api_key=` 后填入您的 API 密钥并保存。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_245c22420872.jpg)    \n\n节点选项：   \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d2b5542a6c55.jpg)    \n\n* image: 可选，输入图片作为提示词的参考。\n* api: 使用的 API。目前有两个选项：“gemini-1.5-flash” 和 “google-gemini”。\n* token_limit: 生成提示词的最大令牌限制。\n* discribe: 在此处输入简单的描述，支持中文文本输入。\n\n### \u003Ca id=\"table1\">Florence2Image2Prompt\u003C\u002Fa>\n\n使用 Florence 2 模型推理生成提示词。该节点部分代码来自 [yiwangsimple\u002Fflorence_dw](https:\u002F\u002Fgithub.com\u002Fyiwangsimple\u002Fflorence_dw)，感谢原作者。\n*首次使用时，模型会自动下载。您也可以从 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1hzw9-QiU1vB8pMbBgofZIA?pwd=mfl3) 下载模型文件至 `ComfyUI\u002Fmodels\u002Fflorence2` 文件夹。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_85a50923b85f.jpg) \n\n节点选项：\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_ea5bdb43deea.jpg)\n\n* florence2_model: Florence2 模型输入。\n* image: 图像输入。\n* task: 选择 Florence2 的任务。\n* text_input: Florence2 的文本输入。\n* max_new_tokens: 生成文本的最大令牌数。\n* num_beams: 生成文本的束搜索数量。\n* do_sample: 是否使用文本生成采样。\n* fill_mask: 是否使用文本标记掩码填充。\n\n\n\n### \u003Ca id=\"table1\">GetColorTone\u003C\u002Fa>\n\n从图像中获取主色调或平均颜色，并输出 RGB 值。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_ede127689747.jpg)    \n\n节点选项：\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_41bd7ad97f49.jpg)    \n\n* mode：有两种模式可选，分别为主色调和平均颜色。\n\n输出类型：\n\n* HEX 格式的 RGB 颜色：以十六进制 RGB 格式表示的 RGB 颜色，例如 '#FA3D86'。\n* 列表格式的 HSV 颜色：以 Python 列表数据格式表示的 HSV 颜色。\n\n### \u003Ca id=\"table1\">GetColorToneV2\u003C\u002Fa>\n\nGetColorTone 的 V2 版本升级。您可以指定获取主体或背景的主导色或平均色。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_2faaad726ba0.jpg)    \n\n在 GetColorTong 的基础上进行了以下改进：\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_b19c282cc0e9.jpg)    \n\n* color_of: 提供 4 种选项，分别是遮罩区域、整幅图像、背景和主体，分别用于选择相应区域的颜色。\n* remove_background_method: 背景识别有两种方法：BiRefNet 和 RMBG V1.4。\n* invert_mask: 是否反转遮罩。\n* mask_grow: 遮罩扩展。对于主体而言，数值越大，获得的颜色越接近身体中心的颜色。\n\n输出：\n\n* image: 单色图片输出，尺寸与输入图片相同。\n* mask: 遮罩输出。\n\n\n### \u003Ca id=\"table1\">ImageRewardFilter\u003C\u002Fa>\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d44d6002e431.jpg)    \n对批量图片进行评分，并输出排名靠前的图片。它使用了 [ImageReward] (https:\u002F\u002Fgithub.com\u002FTHUDM\u002FImageReward) 进行图像评分，感谢原作者。\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_98e60c2efbd8.jpg)    \n节点选项：\n\n* prompt: 可选输入。在此处输入提示词将作为判断图片与提示词匹配程度的依据。\n* output_nun: 输出图片的数量。此值应小于输入的图片批次数量。\n\n输出：\n\n* images: 按评分从高到低排序的批量图片。\n* obsolete_images: 被淘汰的图片。同样按评分从高到低排序输出。\n\n\n### \u003Ca id=\"table1\">LaMa\u003C\u002Fa>\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_90325ee88455.jpg)    \n根据遮罩从图像中擦除物体。该节点是对 [IOPaint](https:\u002F\u002Fwww.iopaint.com) 的重新封装，由最先进的 AI 模型驱动，感谢原作者。    \n它使用了 [LaMa](https:\u002F\u002Fgithub.com\u002Fadvimman\u002Flama)、[LDM](https:\u002F\u002Fgithub.com\u002FCompVis\u002Flatent-diffusion)、[ZITS](https:\u002F\u002Fgithub.com\u002FDQiaole\u002FZITS_inpainting)、[MAT](https:\u002F\u002Fgithub.com\u002Ffenglinglwb\u002FMAT)、[FcF](https:\u002F\u002Fgithub.com\u002FSHI-Labs\u002FFcF-Inpainting)、[Manga](https:\u002F\u002Fgithub.com\u002Fmsxie92\u002FMangaInpainting) 等模型以及 SPREAD 方法来进行擦除。各模型的介绍请参阅原始链接。    \n请从 [lama 模型（百度网盘）](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1m7La2ELsSKaIFhQ57qg1XQ?pwd=jn10) 或 [lama 模型（Google Drive）](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1Aq0a4sybb3SRxi7j1e1_ZbBRjaWDdP9e?usp=sharing) 下载模型文件至 `ComfyUI\u002Fmodels\u002Flama` 文件夹。    \n\n节点选项：\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_c0a7bb6fc22f.jpg)    \n\n* lama_model: 选择模型或方法。\n* device: 正确安装 Torch 和 Nvidia CUDA 驱动程序后，使用 CUDA 可显著提升运行速度。\n* invert_mask: 是否反转遮罩。\n* grow: 正值向外扩展，负值向内收缩。\n* blur: 对边缘进行模糊处理。\n\n### \u003Ca id=\"table1\">ImageAutoCrop\u003C\u002Fa>\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_e121c7e6d839.jpg)    \n根据掩码自动抠图并裁剪图像。可以指定背景颜色、宽高比和输出图像的尺寸。该节点旨在为模型训练生成图像素材。   \n*请参考[SegmentAnythingUltra](#SegmentAnythingUltra)和[RemBgUltra](#RemBgUltra)的模型安装方法。  \n\n节点选项：\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_832354867954.jpg)    \n\n* background_color\u003Csup>4\u003C\u002Fsup>: 背景颜色。\n* aspect_ratio: 提供了几种常见的画面比例。此外，您也可以选择“original”以保持原始比例，或使用“custom”来自定义比例。\n* proportional_width: 按比例设置的宽度。如果宽高比选项不是“custom”，则此设置将被忽略。\n* proportional_height: 按比例设置的高度。如果宽高比选项不是“custom”，则此设置将被忽略。\n* scale_by_longest_side: 允许按最长边的尺寸进行缩放。\n* longest_side: 当scale_by_longest_side设置为True时，此值将用于图像的长边。当输入了original_size时，此设置将被忽略。\n* detect: 检测方法，min_bounding_rect是最小外接矩形，max_inscribed_rect是最大内切矩形。\n* border_reserve: 保留边框。将裁剪范围扩展到检测到的掩码主体区域之外。\n* ultra_detail_range: 掩码边缘超精细处理范围，0表示不处理，这样可以节省生成时间。\n* matting_method: 生成掩码的方法。有两种方法可供选择：Segment Anything和RMBG 1.4。RMBG 1.4运行速度更快。\n* sam_model: 在此处选择Segment Anything使用的SAM模型。\n* grounding_dino_model: 在此处选择Segment Anything使用的Grounding_Dino模型。\n* sam_threshold: Segment Anything的阈值。\n* sam_prompt: Segment Anything的提示词。\n\n输出：\ncropped_image: 裁剪并替换背景后的图像。\nbox_preview: 裁剪位置预览。\ncropped_mask: 裁剪后的掩码。\n\n### \u003Ca id=\"table1\">ImageAutoCropV2\u003C\u002Fa>\n\n```ImageAutoCrop```的升级版本V2，在原有基础上做了以下改动：\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_a07181263f25.jpg)    \n\n* 增加了掩码的可选输入。当有掩码输入时，直接使用该输入，跳过内置的掩码生成过程。\n* 增加了```fill_background```选项。当设置为False时，背景将不会被处理，超出框架的部分也不会包含在输出范围内。\n* ```aspect_ratio```增加了```original```选项。\n* scale_by: 允许按指定的最长边、最短边、宽度或高度进行缩放。\n* scale_by_length: 此处的值用作```scale_by```，用于指定边的长度。\n\n### \u003Ca id=\"table1\">ImageAutoCropV3\u003C\u002Fa>\n\n自动将图像裁剪为指定尺寸。您可以输入掩码来保留掩码的指定区域。该节点旨在为模型训练生成图像素材。  \n\n节点选项：\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_65cdf58d121c.jpg)   \n\n* image: 输入图像。\n* mask: 可选的输入掩码。遮罩部分将在裁剪宽高比的范围内保留。\n* aspect_ratio: 输出的宽高比。提供了常见的画面比例，其中“custom”为自定义比例，“original”为原始画面比例。\n* proportional_width: 按比例设置的宽度。如果aspect_ratio选项不是‘custom’，则此设置将被忽略。\n* proportional_height: 按比例设置的高度。如果aspect_ratio选项不是‘custom’，则此设置将被忽略。\n* method: 缩放采样方法包括Lanczos、Bicubic、Hamming、Bilinear、Box和Nearest。\n* scale_to_side: 允许按长边、短边、宽度、高度或总像素数指定缩放。\n* scale_to_length: 此处的值用作scale_to-side，用于指定边的长度或总像素数（千像素）。\n* round_to_multiple: 四舍五入到最接近的整数倍。例如，若设置为8，则宽度和高度将强制设定为8的倍数。\n\n输出：\ncropped_image: 裁剪后的图像。\nbox_preview: 裁剪位置预览。\n\n\n\n### \u003Ca id=\"table1\">SaveImagePlus\u003C\u002Fa>\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_ee1734cf3bd4.jpg)  \n增强型保存图像节点。您可以自定义图片保存的目录，为文件名添加时间戳，选择保存格式，设置图像压缩率，决定是否保存工作流，并可选地为图片添加不可见水印。（以肉眼不可见的方式添加信息，并使用```ShowBlindWaterMark```节点解码水印）。还可以选择性输出工作流的json文件。\n\n节点选项：\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_dbabba33170d.jpg)    \n\n* image: 输入图像。\n* custom_path\u003Csup>*\u003C\u002Fsup>: 用户自定义目录，请以正确格式输入目录名称。若为空，则保存至ComfyUI的默认输出目录。\n* filename_prefix\u003Csup>*\u003C\u002Fsup>: 文件名前缀。\n* timestamp: 为文件名添加时间戳，可选择日期、精确到秒的时间以及精确到毫秒的时间。\n* format: 图片保存格式。目前支持```png```和```jpg```。请注意，RGBA模式的图片仅支持png格式。\n* quality: 图像质量，取值范围为10-100，数值越高，画质越好，但文件体积也会相应增大。\n* meta_data: 是否将元数据保存到png文件中，即工作流信息。如果您不希望工作流信息泄露，请将其设置为false。\n* blind_watermark: 此处输入的文字（不支持多语言）将被转换为二维码，并以不可见水印的形式保存。使用```ShowBlindWaterMark```节点可以解码水印。请注意，带有水印的图片建议保存为png格式，而较低质量的jpg格式可能会导致水印信息丢失。\n* save_workflow_as_json: 是否同时输出工作流的json文件（输出的json文件与图片位于同一目录）。\n* preview: 预览开关。\n\n\u003Csup>*\u003C\u002Fsup> 输入```%date```表示当前日期（YY-mm-dd），输入```%time```表示当前时间（HH-MM-SS）。您可以在路径中使用```\u002F```来创建子目录。例如，```%date\u002Fname_%tiem```会将图片输出到```YY-mm-dd```文件夹，文件名前缀为```name_HH-MM-SS```。\n\n### \u003Ca id=\"table1\">SaveImagePlusV2\u003C\u002Fa> \n在SaveImagePlus节点中新增了自定义文件名和DPI选项。\n\n节点选项：\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_29d304616653.jpg)    \n\n* custom_filename\u003Csup>*\u003C\u002Fsup>: 用户自定义文件名，若在此处输入，则将使用该文件名。请注意，重复的文件将会被覆盖。若此项为空，则会使用文件名前缀和时间戳作为文件名。\n* dpi: 设置图像文件的DPI值。\n\n\u003Csup>*\u003C\u002Fsup> 输入```%date```表示当前日期（YY-mm-dd），输入```%time```表示当前时间（HH-MM-SS）。可以使用```\u002F```来创建子目录。例如，```%date\u002Fname_%tiem```会将图片输出到```YY-mm-dd```文件夹下，并以```name_HH-MM-SS```作为文件名前缀。\n\n\n\n### \u003Ca id=\"table1\">AddBlindWaterMark\u003C\u002Fa>\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_f06a43fb7f3e.jpg)    \n为图片添加不可见水印。以肉眼无法察觉的方式嵌入水印图像，并使用```ShowBlindWaterMark```节点解码水印。\n\n节点选项：\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_5590357ae800.jpg)    \n\n* image: 输入图像。\n* watermark_image: 水印图像。此处输入的图像将自动转换为方形黑白图像作为水印。建议使用二维码作为水印。\n\n### \u003Ca id=\"table1\">ShowBlindWaterMark\u003C\u002Fa>\n\n解码由```AddBlindWaterMark```和```SaveImagePlus```节点添加的不可见水印。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_4f66ade8bb9b.jpg)    \n\n### \u003Ca id=\"table1\">CreateQRCode\u003C\u002Fa>\n\n生成方形二维码图片。\n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_5a32f5e2464d.jpg)    \n\n* size: 图片的边长。\n* border: 二维码周围的边框大小，数值越大，边框越宽。\n* text: 在此处输入二维码的内容，不支持多语言。\n\n### \u003Ca id=\"table1\">DecodeQRCode\u003C\u002Fa>\n\n解码二维码。\n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_04ff336c7162.jpg)    \n\n* image: 输入的二维码图像。\n* pre_blur: 预处理模糊，对于难以识别的二维码，可以尝试调整此参数。\n\n### \u003Ca id=\"table1\">LoadPSD\u003C\u002Fa>\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_45621612a35e.jpg)    \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_444ada7dcd79.jpg)    \n加载PSD格式文件并导出图层。  \n请注意，此节点需要安装```psd_tools```依赖包。如果在安装psd_tool时出现错误，例如```ModuleNotFoundError: No module named 'docopt'```，请下载[docopt的whl文件](https:\u002F\u002Fwww.piwheels.org\u002Fproject\u002Fdocopt\u002F)并手动安装。\n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_5671e50ddf57.jpg)    \n\n* image: 这里列出了```ComfyUI\u002Finput```下的*.psd文件，可以选择之前已加载的PSD图像。\n* file_path: PSD文件的完整路径和文件名。\n* include_hidden_layer: 是否包含隐藏层。\n* find_layer_by: 可以通过图层编号或图层名称来查找图层。图层组被视为一个图层。\n* layer_index: 图层编号，0为最底层，依次递增。若设置为false，则不计算隐藏层。设置为-1则输出最顶层。\n* layer_name: 图层名称。请注意，大小写和标点符号必须完全匹配。\n\n输出：\nflat_image: PSD预览图像。\nlayer_iamge: 查找并输出指定图层。\nall_layers: 包含所有图层的批量图像。\n\n### \u003Ca id=\"table1\">SD3NegativeConditioning\u003C\u002Fa>\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_f145e17b154d.jpg)  \n将SD3中的四个负面条件节点封装成一个单独的节点。\n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_9bf532a07cf8.jpg)    \n\n* zero_out_start: 设置负面条件ZeroOut的ConditioningSetTimestepRange起始值，该值与负面条件的ConditioningSetTimestepRange结束值相同。\n\n\n### \u003Ca id=\"table1\">BenUltra\u003C\u002Fa>\n这是[PramaLLC\u002FBEN](https:\u002F\u002Fhuggingface.co\u002FPramaLLC\u002FBEN)项目在ComfyUI中的实现。感谢原作者。请从[huggingface](https:\u002F\u002Fhuggingface.co\u002Fchflame163\u002FComfyUI_LayerStyle\u002Ftree\u002Fmain\u002FComfyUI\u002Fmodels\u002FBEN)或[BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F17mdBxfBl_R97mtNHuiHsxQ?pwd=2jn3)下载所有文件，并复制到```ComfyUI\u002Fmodels\u002FBEN```文件夹。\n\n![image](image\u002Fben_ultra_example.jpg)\n\n节点选项：\n![image](image\u002Fben_ultra_node.jpg)\n* ben_model: BEN模型输入。有两个模型可供选择：BEN_Base和BEN2_base。\n* image: 图像输入。\n* detail_method: 边缘处理方法。提供VITMatte、VITMatte(local)、PyMatting、GuidedFilter。如果首次使用VITMatte后已下载模型，则后续可使用VITMatte (local)。\n* detail_erode: 从边缘向内侵蚀遮罩范围。数值越大，向内修复的范围越大。\n* detail_dilate: 遮罩边缘向外扩展。数值越大，向外修复的范围越大。\n* black_point: 边缘黑色采样阈值。\n* white_point: 边缘白色采样阈值。\n* process_detail: 若设置为false，则跳过边缘处理以节省运行时间。\n* max_megapixels: 设置VitMate操作的最大尺寸。\n\n### \u003Ca id=\"table1\">LoadBenModel\u003C\u002Fa>\n加载BEN模型。\n\n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_e1986a47d767.jpg)  \n\n* model: 选择模型。目前仅可选择Ben_Sase模型。\n\n### \u003Ca id=\"table1\">SegmentAnythingUltra\u003C\u002Fa>\n\n对[ComfyUI Segment Anything](https:\u002F\u002Fgithub.com\u002Fstoryicon\u002Fcomfyui_segment_anything)的改进，感谢原作者。\n\n*请参考ComfyUI Segment Anything的安装说明来安装模型。如果ComfyUI Segment Anything已正确安装，则可跳过此步骤。\n\n* 从[这里](https:\u002F\u002Fhuggingface.co\u002Fbert-base-uncased\u002Ftree\u002Fmain)下载config.json、model.safetensors、tokenizer_config.json、tokenizer.json和vocab.txt这5个文件，并将其放入```ComfyUI\u002Fmodels\u002Fbert-base-uncased```文件夹中。\n* 下载[GroundingDINO_SwinT_OGC配置文件](https:\u002F\u002Fhuggingface.co\u002FShilongLiu\u002FGroundingDINO\u002Fresolve\u002Fmain\u002FGroundingDINO_SwinT_OGC.cfg.py)、[GroundingDINO_SwinT_OGC模型](https:\u002F\u002Fhuggingface.co\u002FShilongLiu\u002FGroundingDINO\u002Fresolve\u002Fmain\u002Fgroundingdino_swint_ogc.pth)、\n  [GroundingDINO_SwinB配置文件](https:\u002F\u002Fhuggingface.co\u002FShilongLiu\u002FGroundingDINO\u002Fresolve\u002Fmain\u002FGroundingDINO_SwinB.cfg.py)、[GroundingDINO_SwinB模型](https:\u002F\u002Fhuggingface.co\u002FShilongLiu\u002FGroundingDINO\u002Fresolve\u002Fmain\u002Fgroundingdino_swinb_cogcoor.pth)，并将它们放入```ComfyUI\u002Fmodels\u002Fgrounding-dino```文件夹中。\n* 下载[sam_vit_h](https:\u002F\u002Fdl.fbaipublicfiles.com\u002Fsegment_anything\u002Fsam_vit_h_4b8939.pth)、[sam_vit_l](https:\u002F\u002Fdl.fbaipublicfiles.com\u002Fsegment_anything\u002Fsam_vit_l_0b3195.pth)、\n  [sam_vit_b](https:\u002F\u002Fdl.fbaipublicfiles.com\u002Fsegment_anything\u002Fsam_vit_b_01ec64.pth)、[sam_hq_vit_h](https:\u002F\u002Fhuggingface.co\u002Flkeab\u002Fhq-sam\u002Fresolve\u002Fmain\u002Fsam_hq_vit_h.pth)、\n  [sam_hq_vit_l](https:\u002F\u002Fhuggingface.co\u002Flkeab\u002Fhq-sam\u002Fresolve\u002Fmain\u002Fsam_hq_vit_l.pth)、[sam_hq_vit_b](https:\u002F\u002Fhuggingface.co\u002Flkeab\u002Fhq-sam\u002Fresolve\u002Fmain\u002Fsam_hq_vit_b.pth)、\n  [mobile_sam](https:\u002F\u002Fgithub.com\u002FChaoningZhang\u002FMobileSAM\u002Fblob\u002Fmaster\u002Fweights\u002Fmobile_sam.pt)，并将它们放入```ComfyUI\u002Fmodels\u002Fsams```文件夹中。\n  *或者从[百度网盘上的GroundingDino模型](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1P7WQDuaqSYazlSQX8SJjxw?pwd=24ki)和[百度网盘上的SAM模型](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1n7JrHb2vzV2K2z3ktqpNxg?pwd=yoqh)下载。\n  ![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_7035a595d501.jpg)    \n  ![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_21bb4860fbf2.jpg)    \n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d26ccc3db4d5.jpg)    \n\n* sam_model：选择SAM模型。\n* ground_dino_model：选择Grounding DINO模型。\n* threshold：SAM的阈值。\n* detail_range：边缘细节范围。\n* black_point：边缘黑色采样阈值。\n* white_point：边缘白色采样阈值。\n* process_detail：此处设置为false将跳过边缘处理以节省运行时间。\n* prompt：SAM的提示输入。\n* cache_model：设置是否缓存模型。\n\n### \u003Ca id=\"table1\">SegmentAnythingUltraV2\u003C\u002Fa>\n\nSegmentAnythingUltra的V2升级版本增加了VITMatte边缘处理方法。（注：使用此方法处理超过2K尺寸的图像会消耗大量内存） \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_c17464e44c89.jpg)    \n\n在SegmentAnythingUltra的基础上，进行了以下更改： \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d9e9a16ab4f0.jpg)    \n\n* detail_method：边缘处理方法。提供VITMatte、VITMatte（本地）、PyMatting、GuidedFilter。如果首次使用VITMatte后已下载模型，则后续可使用VITMatte（本地）。\n* detail_erode：从边缘向内侵蚀掩膜范围。数值越大，向内修复的范围越大。\n* detail_dilate：掩膜边缘向外扩张。数值越大，向外修复的范围越大。\n* device：设置VitMatte是否使用CUDA。\n* max_megapixels：设置VitMate操作的最大尺寸。\n\n\n### \u003Ca id=\"table1\">SegmentAnythingUltraV3\u003C\u002Fa>\n将模型加载与推理节点分离，以避免在使用多个SAM节点时重复加载模型。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_05b91c755493.jpg)  \n\n节点选项：\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_aafdee051912.jpg)\n与SegmentAnythingUltra相同，移除了```sam_comodel```和```ground-dino_comodel```，改为从节点输入获取。\n\n### \u003Ca id=\"table1\">LoadSegmentAnythingModels\u003C\u002Fa>\n加载SegmentAnything模型。\n  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_0ec7e980d977.jpg)\n\n\n### \u003Ca id=\"table1\">SAM2Ultra\u003C\u002Fa>\n\n该节点由[kijai\u002FComfyUI-segment-anything-2](https:\u002F\u002Fgithub.com\u002Fkijai\u002FComfyUI-segment-anything-2)修改而来。感谢[kijai](https:\u002F\u002Fgithub.com\u002Fkijai)为Comfyui社区做出的重大贡献。    \nSAM2 Ultra节点仅支持单张图像。如需处理多张图像，请先将图像批次转换为图像列表。    \n*从[百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1xaQYBA6ktxvAxm310HXweQ?pwd=auki)或[huggingface.co\u002FKijai\u002Fsam2-safetensors](https:\u002F\u002Fhuggingface.co\u002FKijai\u002Fsam2-safetensors\u002Ftree\u002Fmain)下载模型，并复制到```ComfyUI\u002Fmodels\u002Fsam2```文件夹中。\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_4d4f84241f34.jpg)    \n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_257b9f3594bf.jpg)    \n\n* image：待分割的图像。\n* bboxes：输入识别框数据。\n* sam2_model：选择SAM2模型。\n* presicion：模型精度。可选择fp16、bf16和fp32。\n* bbox_select：选择输入框数据。有三种选项：“all”选择所有框，“first”选择置信度最高的框，“by_index”指定框的索引。\n* select_index：当bbox_delect为“by_index”时有效。0表示第一个。可输入多个值，用任何非数字字符分隔，包括但不限于逗号、句号、分号、空格或字母，甚至中文。\n* cache_model：是否缓存模型。缓存模型后，可节省模型加载时间。\n* detail_method：边缘处理方法。提供VITMatte、VITMatte（本地）、PyMatting、GuidedFilter。如果首次使用VITMatte后已下载模型，则后续可使用VITMatte（本地）。\n* detail_erode：从边缘向内侵蚀掩膜范围。数值越大，向内修复的范围越大。\n* detail_dilate：掩膜边缘向外扩张。数值越大，向外修复的范围越大。\n* black_point：边缘黑色采样阈值。\n* white_point：边缘白色采样阈值。\n* process_detail：此处设置为false将跳过边缘处理以节省运行时间。\n* device：设置VitMatte是否使用CUDA。\n* max_megapixels：设置VitMate操作的最大尺寸。\n\n### \u003Ca id=\"table1\">SAM2UltraV2\u003C\u002Fa>\n在```SAM2 Ultra```节点的基础上，将SAM2模型改为外部输入，这样在使用多个节点时可以节省资源。\n\n修改后的节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_86e0836311c8.jpg)    \n\n* sam2_model：SAM2模型输入，该模型由```Load SAM2 Model```节点加载。\n\n### \u003Ca id=\"table1\">LoadSAM2Model\u003C\u002Fa>\n加载SAM2模型。\n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_19753c92182f.jpg)    \n\n* sam2_model：选择SAM2模型。\n* presicion：模型精度。可选择fp16、bf16和fp32。\n* device：设置是否使用CUDA。\n\n### \u003Ca id=\"table1\">SAM2VideoUltra\u003C\u002Fa>\n\nSAM2 Video Ultra 节点支持处理多帧图像或视频序列。请在序列的第一帧中定义识别框数据，以确保正确识别。\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F4726b8bf-9b98-4630-8f54-cb7ed7a3d2c5\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fb2a45c96-4be1-4470-8ceb-addaf301b0cb\n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_e49a305b0752.jpg)    \n\n* image: 需要分割的图像。\n* bboxes: 可选的识别框输入数据。```bboxes``` 和 ```first_frame_mask``` 至少需要一个输入。如果输入了 ```first_frame_mask```，则会忽略 ```bboxes```。\n* first_frame_mask: 可选的第一帧掩码输入。该掩码将被用作第一帧的识别对象。```bboxes``` 和 ```first_frame_mask``` 至少需要一个输入。如果输入了 ```first_frame_mask```，则会忽略 ```bboxes```。\n* pre_mask: 可选的输入掩码，用作传播焦点范围的限制，有助于提高识别精度。\n* sam2_model: 选择 SAM2 模型。\n* presicion: 模型的精度。可选择 fp16 和 bf16。\n* cache_model: 是否缓存模型。缓存模型后，可以节省模型加载时间。\n* individual_object: 当设置为 True 时，将专注于识别单个对象。当设置为 False 时，则会尝试为多个对象生成识别框。\n* mask_preview_color: 在预览输出中显示未遮罩区域的颜色。\n* detail_method: 边缘处理方法。目前仅支持 VITMatte 方法。\n* detail_erode: 从边缘向内侵蚀掩码范围。数值越大，向内修复的范围越大。\n* detail_dilate: 掩码边缘向外扩展。数值越大，向外修复的范围越大。\n* black_point: 边缘黑色采样阈值。\n* white_point: 边缘白色采样阈值。\n* process_detail: 如果设置为 false，则会跳过边缘处理以节省运行时间。\n* device: 仅支持 cuda。\n* max_megapixels: 设置 VitMate 操作的最大尺寸。尺寸越大，掩码边缘越精细，但计算速度会显著下降。\n\n### \u003Ca id=\"table1\">ObjectDetectorGemini\u003C\u002Fa>\n使用 Gemini API 进行目标检测。\n请在 [Google AI Studio](https:\u002F\u002Fmakersuite.google.com\u002Fapp\u002Fapikey) 上申请您的 API 密钥，并将其填写到插件根目录下的 ```api_key.ini``` 文件中。该文件默认名为 ```api_key.ini.example```。首次使用时，需将文件后缀改为 ```.ini```。使用文本编辑软件打开文件，在 ```google_api_key=``` 后填入您的 API 密钥并保存。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_2eac95d5b451.jpg)\n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_ef48b94d3b71.jpg)    \n\n* image: 输入图像。\n* model: 选择 Gemini 模型。\n* prompt: 描述需要识别的目标。\n\n### \u003Ca id=\"table1\">ObjectDetectorGeminiV2\u003C\u002Fa>\n在 ObjectDetectorGemini 节点的基础上，改用新的 google-genai 依赖包，支持最新的 gemini-2.5-pro-exp-03-25 模型。\n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_c323d5ba33b8.jpg)    \n\n与 ObjectDetectorGemini 相同。\n\n### \u003Ca id=\"table1\">ObjectDetectorFL2\u003C\u002Fa>\n\n使用 Florence2 模型识别图像中的目标，并输出识别框数据。    \n*请从 [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1hzw9-QiU1vB8pMbBgofZIA?pwd=mfl3) 下载模型，并复制到 ```ComfyUI\u002Fmodels\u002Fflorence2``` 文件夹中。\n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_4f6b7f6529c7.jpg)    \n\n* image: 需要分割的图像。\n* florence2_model: Florence2 模型，来自 [LoadFlorence2Model](#LoadFlorence2Model) 节点。\n* prompt: 描述需要识别的目标。\n* sort_method: 选择框排序方式有四种选项：“left_to_right”、“top_to_bottom”、“big_to_small”和“confidence”。\n* bbox_select: 选择输入框数据。有三种选项：“all”选择所有框，“first”选择置信度最高的框，“by_index”指定框的索引。\n* select_index: 此选项在 bbox_delect 为 ‘by_index’ 时有效。0 表示第一个框。可以输入多个值，用任何非数字字符分隔，包括但不限于逗号、句号、分号、空格或字母，甚至中文。\n\n### \u003Ca id=\"table1\">ObjectDetectorYOLOWorld\u003C\u002Fa>\n#### （已弃用。若仍需使用，需手动安装依赖包）    \n由于依赖包可能存在安装问题，该节点已被弃用。如需使用，请手动安装以下依赖包：\n```\npip install inference-cli>=0.13.0\npip install inference-gpu[yolo-world]>=0.13.0\n```\n\n使用 YOLO-World 模型识别图像中的目标，并输出识别框数据。     \n*请从 [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1QpjajeTA37vEAU2OQnbDcQ?pwd=nqsk) 或 [GoogleDrive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1nrsfq4S-yk9ewJgwrhXAoNVqIFLZ1at7?usp=sharing) 下载模型，并复制到 ```ComfyUI\u002Fmodels\u002Fyolo-world``` 文件夹中。\n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d0fb1157e4a5.jpg)    \n\n* image: 需要分割的图像。\n* confidence_threshold: 置信度阈值。\n* nms_iou_threshold: 非极大值抑制阈值。\n* prompt: 描述需要识别的目标。\n* sort_method: 选择框排序方式有四种选项：“left_to_right”、“top_to_bottom”、“big_to_small”和“confidence”。\n* bbox_select: 选择输入框数据。有三种选项：“all”选择所有框，“first”选择置信度最高的框，“by_index”指定框的索引。\n* select_index: 此选项在 bbox_delect 为 ‘by_index’ 时有效。0 表示第一个框。可以输入多个值，用任何非数字字符分隔，包括但不限于逗号、句号、分号、空格或字母，甚至中文。\n\n### \u003Ca id=\"table1\">ObjectDetectorYOLO8\u003C\u002Fa>\n\n使用 YOLO-8 模型识别图像中的物体，并输出检测框数据。    \n*请从 [GoogleDrive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1I5TISO2G1ArSkKJu1O9b4Uvj3DVgn5d2) 或 [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1pEY6sjABQaPs6QtpK0q6XA?pwd=grqe) 下载模型，并将其复制到 ```ComfyUI\u002Fmodels\u002Fyolo``` 文件夹中。\n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_05190fccd1fe.jpg)\n\n* image: 需要进行分割的图像。\n* yolo_model: 选择 YOLO 模型。\n* sort_method: 检测框排序方法有四种选项：“left_to_right”（从左到右）、“top_to_bottom”（从上到下）、“big_to_small”（从大到小）和“confidence”（按置信度排序）。\n* bbox_select: 选择输入的检测框数据。共有三种选项：“all”选择所有检测框，“first”选择置信度最高的检测框，“by_index”指定检测框的索引。\n* select_index: 当 bbox_delect 设置为 ‘by_index’ 时，此选项有效。0 表示第一个检测框。可以输入多个值，用任何非数字字符分隔，包括但不限于逗号、句号、分号、空格或字母，甚至中文。\n\n### \u003Ca id=\"table1\">ObjectDetectorMask\u003C\u002Fa>\n\n使用掩码作为检测框数据。掩码上白色区域所包围的所有区域都将被识别为一个物体。多个封闭区域将分别被识别。\n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_341ed0808b95.jpg)\n\n* object_mask: 掩码输入。\n* sort_method: 检测框排序方法有四种选项：“left_to_right”（从左到右）、“top_to_bottom”（从上到下）、“big_to_small”（从大到小）和“confidence”（按置信度排序）。\n* bbox_select: 选择输入的检测框数据。共有三种选项：“all”选择所有检测框，“first”选择置信度最高的检测框，“by_index”指定检测框的索引。\n* select_index: 当 bbox_delect 设置为 ‘by_index’ 时，此选项有效。0 表示第一个检测框。可以输入多个值，用任何非数字字符分隔，包括但不限于逗号、句号、分号、空格或字母，甚至中文。\n\n### \u003Ca id=\"table1\">BBoxJoin\u003C\u002Fa>\n\n合并检测框数据。\n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_8dd6afd3a6d7.jpg)\n\n* bboxes_1: 必填项。第一组检测框。\n* bboxes_2: 可选输入。第二组检测框。\n* bboxes_3: 可选输入。第三组检测框。\n* bboxes_4: 可选输入。第四组检测框。\n\n### \u003Ca id=\"table1\">DrawBBoxMask\u003C\u002Fa>\n\n将 Object Detector 节点输出的检测框数据绘制为掩码。     \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_f590f2271685.jpg)\n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_425ae0cfcdf1.jpg)\n\n* image: 图像输入。必须与 Object Detector 节点识别的图像一致。  \n* bboxes: 输入的检测框数据。\n* grow_top: 每个检测框会按照其高度的百分比向上扩展，正值表示向上扩展，负值表示向下扩展。\n* grow_bottom: 每个检测框会按照其高度的百分比向下扩展，正值表示向下扩展，负值表示向上扩展。\n* grow_left: 每个检测框会按照其宽度的百分比向左扩展，正值表示向左扩展，负值表示向右扩展。\n* grow_right: 每个检测框会按照其宽度的百分比向右扩展，正值表示向右扩展，负值表示向左扩展。\n\n### \u003Ca id=\"table1\">DrawBBoxMaskV2\u003C\u002Fa> \n在 [DrawBBoxMask](#DrawBBoxMask) 节点的基础上增加了圆角矩形绘制功能。    \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_f4e20153d893.jpg)\n\n新增选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_145c080a61de.jpg)\n* rounded_rect_radius: 圆角半径。范围为 0-100，数值越大，圆角越明显。\n* anti_aliasing: 抗锯齿效果，范围为 0-16，数值越大，锯齿现象越不明显。过高的数值会显著降低节点的处理速度。\n\n### \u003Ca id=\"table1\">EVF-SAMUltra\u003C\u002Fa>\n\n该节点是 [EVF-SAM](https:\u002F\u002Fgithub.com\u002Fhustvl\u002FEVF-SAM) 在 ComfyUI 中的实现。     \n*请从 [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1EvaxgKcCxUpMbYKzLnEx9w?pwd=69bn) 或 [huggingface\u002FEVF-SAM2](https:\u002F\u002Fhuggingface.co\u002FYxZhang\u002Fevf-sam2\u002Ftree\u002Fmain)、[huggingface\u002FEVF-SAM](https:\u002F\u002Fhuggingface.co\u002FYxZhang\u002Fevf-sam\u002Ftree\u002Fmain) 下载模型文件，并将其保存到 ```ComfyUI\u002Fmodels\u002FEVF-SAM``` 文件夹中（将模型分别存放在各自的子目录中）。\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_bb736feb29d5.jpg)    \n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_aa0ac5a94488.jpg)    \n\n* image: 输入图像。\n* model: 选择模型。目前有 evf-sam2 和 evf sam 两种选项。\n* presicion: 模型精度可选择 fp16、bf16 和 fp32。\n* load_in_bit: 按位精度加载模型。可以选择 full、8 和 4。\n* pormpt: 用于分割的提示词。\n* detail_method: 边缘处理方法。提供 VITMatte、VITMatte(local)、PyMatting、GuidedFilter。如果首次使用 VITMatte 后下载了模型，则后续可使用 VITMatte (local)。\n* detail_erode: 从边缘向内侵蚀掩码范围。数值越大，向内修复的范围越大。\n* detail_dilate: 掩码边缘向外扩张。数值越大，向外修复的范围越大。\n* black_point: 边缘黑色采样阈值。\n* white_point: 边缘白色采样阈值。\n* process_detail: 如果设置为 false，则跳过边缘处理以节省运行时间。\n* device: 设置是否使用 cuda 的 VitMatte。\n* max_megapixels: 设置 VitMate 操作的最大尺寸。\n\n### \u003Ca id=\"table1\">Florence2Ultra\u003C\u002Fa>\n\n利用 Florence2 模型的分割功能，同时具备超高的边缘细节。\n该节点部分代码来自 [spacepxl\u002FComfyUI-Florence-2](https:\u002F\u002Fgithub.com\u002Fspacepxl\u002FComfyUI-Florence-2)，感谢原作者。\n*请从 [BaiduNetdisk](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1hzw9-QiU1vB8pMbBgofZIA?pwd=mfl3) 下载模型文件，并将其复制到 ```ComfyUI\u002Fmodels\u002Fflorence2``` 文件夹中。\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_aceb478d73aa.jpg)    \n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_321ecaa9174e.jpg)    \n\n* florence2_model: Florence2 模型输入。\n* image: 图像输入。\n* task: 选择 Florence2 的任务。\n* text_input: Florence2 的文本输入。\n* detail_method: 边缘处理方法。提供 VITMatte、VITMatte(local)、PyMatting、GuidedFilter。如果首次使用 VITMatte 后下载了模型，则后续可使用 VITMatte (local)。\n* detail_erode: 从边缘向内侵蚀掩码范围。数值越大，向内修复的范围越大。\n* detail_dilate: 掩码边缘向外扩张。数值越大，向外修复的范围越大。\n* black_point: 边缘黑色采样阈值。\n* white_point: 边缘白色采样阈值。\n* process_detail: 如果设置为 false，则跳过边缘处理以节省运行时间。\n* device: 设置是否使用 cuda 的 VitMatte。\n* max_megapixels: 设置 VitMate 操作的最大尺寸。\n\n### \u003Ca id=\"table1\">LoadFlorence2Model\u003C\u002Fa>\n\nFlorence2 模型加载器。\n*首次使用时，模型将自动下载。\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d7be405f4c38.jpg)   \n目前可供选择的模型包括 base、base-ft、large、large-ft、DocVQA、SD3-Captioner 和 base-PromptGen。\n\n\n\n### \u003Ca id=\"table1\">BiRefNetUltra\u003C\u002Fa>\n\n使用 BiRefNet 模型进行背景去除，具有更好的识别能力和超高的边缘细节。\n该节点的模型部分代码来自 Viper 的 [ComfyUI-BiRefNet](https:\u002F\u002Fgithub.com\u002Fviperyl\u002FComfyUI-BiRefNet)，感谢原作者。\n\n*从 [https:\u002F\u002Fhuggingface.co\u002FViperYX\u002FBiRefNet](https:\u002F\u002Fhuggingface.co\u002FViperYX\u002FBiRefNet\u002Ftree\u002Fmain) 或 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1GxtuNDTIHkuu4FR4uGAT-g?pwd=t2cf) 下载 ```BiRefNet-ep480.pth```,```pvt_v2_b2.pth```,```pvt_v2_b5.pth```,```swin_base_patch4_window12_384_22kto1k.pth```, ```swin_large_patch4_window12_384_22kto1k.pth``` 5 个文件，放入 ```ComfyUI\u002Fmodels\u002FBiRefNet``` 文件夹中。\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_617d2434497f.jpg)    \n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_9939896263ed.jpg)    \n\n* detail_method：边缘处理方法。提供 VITMatte、VITMatte(local)、PyMatting、GuidedFilter。如果在首次使用 VITMatte 后已下载模型，则后续可使用 VITMatte (local)。\n* detail_erode：从边缘向内侵蚀掩膜范围。数值越大，向内修复的范围越大。\n* detail_dilate：掩膜边缘向外扩张。数值越大，向外修复的范围越宽。\n* black_point：边缘黑色采样阈值。\n* white_point：边缘白色采样阈值。\n* process_detail：此处设置为 false 将跳过边缘处理以节省运行时间。\n* device：设置是否使用 CUDA 进行 VitMate 处理。\n* max_megapixels：设置 VitMate 操作的最大尺寸。\n\n### \u003Ca id=\"table1\">BiRefNetUltraV2\u003C\u002Fa>\n\n该节点支持使用最新的 BiRefNet 模型。\n*从 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F12z3qUuqag3nqpN2NJ5pSzg?pwd=ek65) 或 [GoogleDrive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1s2Xe0cjq-2ctnJBR24563yMSCOu4CcxM) 下载名为 ```BiRefNet-general-epoch_244.pth``` 的模型文件，放入 ```ComfyUI\u002FModels\u002FBiRefNet\u002Fpth``` 文件夹中。您也可以下载更多 BiRefNet 模型并放置于此处。\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_d06389a72197.jpg)    \n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_6eb5624f7e79.jpg)  \n\n* image：输入图像。\n* birefnet_model：BiRefNet 模型作为输入，由 LoadBiRefNetModel 节点输出。\n* detail_method：边缘处理方法。提供 VITMatte、VITMatte(local)、PyMatting、GuidedFilter。如果在首次使用 VITMatte 后已下载模型，则后续可使用 VITMatte (local)。\n* detail_erode：从边缘向内侵蚀掩膜范围。数值越大，向内修复的范围越大。\n* detail_dilate：掩膜边缘向外扩张。数值越大，向外修复的范围越宽。\n* black_point：边缘黑色采样阈值。\n* white_point：边缘白色采样阈值。\n* process_detail：由于 BiRefNet 具有出色的边缘处理能力，此处默认设置为 False。\n* device：设置是否使用 CUDA 进行 VitMate 处理。\n* max_megapixels：设置 VitMate 操作的最大尺寸。\n\n### \u003Ca id=\"table1\">LoadBiRefNetModel\u003C\u002Fa>\n\n加载 BiRefNet 模型。\n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_7863f34c836a.jpg)  \n\n* model：选择模型。列出 ```CoomfyUI\u002Fmodels\u002FBiRefNet\u002Fpth``` 文件夹中的文件供选择。\n\n\n### \u003Ca id=\"table1\">LoadBiRefNetModelV2\u003C\u002Fa>\n该节点是由 [jimlee2048](https:\u002F\u002Fgithub.com\u002Fjimlee2048) 提交的 PR，支持加载 RMBG-2.0 模型。\n    \n从 [huggingface](https:\u002F\u002Fhuggingface.co\u002Fbriaai\u002FRMBG-2.0\u002Ftree\u002Fmain) 或 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1viIXlZnpTYTKkm2F-QMj_w?pwd=axr9) 下载模型文件，并复制到 ```ComfyUI\u002Fmodels\u002FBiRefNet\u002FRMBG-2.0``` 文件夹中。\n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_ee5e8e116487.jpg)  \n\n* model：选择模型。有两个选项，分别是 ```BiRefNet-General``` 和 ```RMBG-2.0```。\n\n\n### \u003Ca id=\"table1\">TransparentBackgroundUltra\u003C\u002Fa>\n\n使用透明背景模型进行背景去除，具有更好的识别能力和速度，同时拥有超高的边缘细节。\n\n*从 [googledrive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F10KBDY19egb8qEQBv34cqIVSwd38bUAa9?usp=sharing) 或 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F10JO0uKzTxJaIkhN_J7RSyw?pwd=v0b0) 下载所有文件，放入 ```ComfyUI\u002Fmodels\u002Ftransparent-background``` 文件夹中。\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_2c680e43d4c2.jpg)    \n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_7fcdf2196011.jpg)    \n\n* model：选择模型。\n* detail_method：边缘处理方法。提供 VITMatte、VITMatte(local)、PyMatting、GuidedFilter。如果在首次使用 VITMatte 后已下载模型，则后续可使用 VITMatte (local)。\n* detail_erode：从边缘向内侵蚀掩膜范围。数值越大，向内修复的范围越大。\n* detail_dilate：掩膜边缘向外扩张。数值越大，向外修复的范围越宽。\n* black_point：边缘黑色采样阈值。\n* white_point：边缘白色采样阈值。\n* process_detail：此处设置为 false 将跳过边缘处理以节省运行时间。\n* device：设置是否使用 CUDA 进行 VitMate 处理。\n* max_megapixels：设置 VitMate 操作的最大尺寸。\n\n### \u003Ca id=\"table1\">PersonMaskUltra\u003C\u002Fa>\n\n为人物的面部、头发、身体皮肤、衣物或配饰生成掩膜。与之前的 A Person Mask Generator 节点相比，该节点具有超高的边缘细节。\n该节点的模型代码来自 [a-person-mask-generator](https:\u002F\u002Fgithub.com\u002Fdjbielejeski\u002Fa-person-mask-generator)，边缘处理代码来自 [ComfyUI-Image-Filters](https:\u002F\u002Fgithub.com\u002Fspacepxl\u002FComfyUI-Image-Filters)，感谢原作者。\n*从 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F13zqZtBt89ueCyFufzUlcDg?pwd=jh5g) 下载模型文件，放入 ```ComfyUI\u002Fmodels\u002Fmediapipe``` 文件夹中。\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_1e5428bf4281.jpg)    \n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_0b58c28c3237.jpg)    \n\n* face：面部识别。\n* hair：头发识别。\n* body：身体皮肤识别。\n* clothes：衣物识别。\n* accessories：配饰识别（如背包）。\n* background：背景识别。\n* confidence：识别阈值，数值越低，输出的掩膜范围越大。\n* detail_range：边缘细节范围。\n* black_point：边缘黑色采样阈值。\n* white_point：边缘白色采样阈值。\n* process_detail：此处设置为 false 将跳过边缘处理以节省运行时间。\n\n### \u003Ca id=\"table1\">PersonMaskUltraV2\u003C\u002Fa>\n\nPersonMaskUltra 的 V2 升级版本新增了 VITMatte 边缘处理方法。（注意：使用此方法处理超过 2K 分辨率的图像会消耗大量内存）\n\n在 PersonMaskUltra 的基础上，进行了以下更改：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_cfa5ca69660d.jpg)    \n\n* detail_method：边缘处理方法。提供 VITMatte、VITMatte（本地）、PyMatting 和 GuidedFilter。如果首次使用 VITMatte 后已下载模型，则后续可使用 VITMatte（本地）。\n* detail_erode：从边缘向内侵蚀遮罩范围。值越大，向内修复的范围越大。\n* detail_dilate：遮罩边缘向外扩展。值越大，向外修复的范围越大。\n* device：设置是否使用 CUDA 加速的 VitMatte。\n* max_megapixels：设置 VitMate 操作的最大尺寸。\n\n\n### \u003Ca id=\"table1\">HumanPartsUltra\u003C\u002Fa>\n\n用于生成人体各部位的掩码，基于 [metal3d\u002FComfyUI_Human_Parts](https:\u002F\u002Fgithub.com\u002Fmetal3d\u002FComfyUI_Human_Parts) 的封装，感谢原作者。  \n该节点在原有基础上增加了超精细的边缘处理功能。请从 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1-6uwH6RB0FhIVfa3qO7hhQ?pwd=d862) 或 [Hugging Face](https:\u002F\u002Fhuggingface.co\u002FMetal3d\u002Fdeeplabv3p-resnet50-human\u002Ftree\u002Fmain) 下载模型文件，并将其复制到 ```ComfyUI\\models\\onnx\\human-parts``` 文件夹中。  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_29f44af2d682.jpg)    \n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_8d1e73ec0a83.jpg)    \n\n* image：输入图像。\n* face：人脸识别开关。\n* hair：头发识别开关。\n* glasses：眼镜识别开关。\n* top_clothes：上衣识别开关。\n* bottom_clothes：下装识别开关。\n* torso_skin：躯干皮肤识别开关。\n* left_arm：左臂识别开关。\n* right_arm：右臂识别开关。\n* left_leg：左腿识别开关。\n* right_leg：右腿识别开关。\n* left_foot：左脚识别开关。\n* right_foot：右脚识别开关。\n* detail_method：边缘处理方法。提供 VITMatte、VITMatte（本地）、PyMatting 和 GuidedFilter。如果首次使用 VITMatte 后已下载模型，则后续可使用 VITMatte（本地）。\n* detail_erode：从边缘向内侵蚀遮罩范围。值越大，向内修复的范围越大。\n* detail_dilate：遮罩边缘向外扩展。值越大，向外修复的范围越大。\n* black_point：边缘黑色采样阈值。\n* white_point：边缘白色采样阈值。\n* process_detail：此处设为 false 将跳过边缘处理以节省运行时间。\n* device：设置是否使用 CUDA 加速的 VitMatte。\n* max_megapixels：设置 VitMate 操作的最大尺寸。\n\n\n### \u003Ca id=\"table1\">YoloV8Detect\u003C\u002Fa>\n\n使用 YoloV8 模型检测人脸、手部框区域或字符分割。支持输出选定数量的通道。  \n请从 [Google Drive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1I5TISO2G1ArSkKJu1O9b4Uvj3DVgn5d2) 或 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1pEY6sjABQaPs6QtpK0q6XA?pwd=grqe) 下载模型文件，并将其放置到 ```ComfyUI\\models\u002Fyolo``` 文件夹中。\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_0aa32595e708.jpg)    \n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_c433318d31de.jpg)    \n\n* yolo_model：Yolo 模型选择。名称中带有 ```seg``` 的模型可以输出分割掩码，否则仅能输出框形掩码。\n* mask_merge：选择合并后的掩码。```all``` 表示合并所有掩码输出；若选择具体数字，则按识别置信度排序后合并相应数量的掩码并输出。\n\n输出：  \n* mask：输出的掩码。\n* yolo_plot_image：Yolo 识别结果预览。\n* yolo_masks：对于 Yolo 识别出的所有掩码，每个单独的掩码都会作为独立输出。\n\n\n### \u003Ca id=\"table1\">MediapipeFacialSegment\u003C\u002Fa>\n\n使用 Mediapipe 模型检测面部特征，分割左右眉毛、眼睛、嘴唇和牙齿。  \n请从 [百度网盘](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F13zqZtBt89ueCyFufzUlcDg?pwd=jh5g) 下载模型文件，并将其复制到 ```ComfyUI\\models\u002Fmediapipe``` 文件夹中。\n\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_a67001892936.jpg)    \n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_dfd676c3d00f.jpg)    \n\n* left_eye：左眼识别开关。\n* left_eyebrow：左眉识别开关。\n* right_eye：右眼识别开关。\n* right_eyebrow：右眉识别开关。\n* lips：嘴唇识别开关。\n* tooth：牙齿识别开关。\n\n\n### \u003Ca id=\"table1\">MaskByDifferent\u003C\u002Fa>\n\n计算两张图像之间的差异，并将其输出为掩码。  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_8cec98fd1e66.jpg)    \n\n节点选项：  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_c3c8278ee700.jpg)    \n\n* gain：差异计算的增益。值越高，细微差异越明显。\n* fix_gap：修复掩码内部的空隙。值越高，修复的空隙越大。\n* fix_threshold：fix_gap 的阈值。\n* main_subject_detect：设置为 True 时启用主体检测，忽略主体以外的差异。\n\n\n## 注释说明 \u003Ca id=\"table1\">notes\u003C\u002Fa>\n\n\u003Csup>1\u003C\u002Fsup> layer_image、layer_mask 以及 background_image（如有输入），这三者必须具有相同的尺寸。  \n\n\u003Csup>2\u003C\u002Fsup> 掩码并非必填项。默认情况下会使用图像的 Alpha 通道。如果输入图像不包含 Alpha 通道，则会自动创建整个图像的 Alpha 通道。若同时输入掩码，Alpha 通道将被掩码覆盖。  \n\n\u003Csup>3\u003C\u002Fsup> \u003Ca id=\"table1\">Blend\u003C\u002Fa> 模式包括 **正常、正片叠底、滤色、添加、减去、差值、变暗、颜色加深、颜色减淡、线性加深、线性减淡、叠加、柔光、强光、亮光、点光、线性光和硬混**，共计 19 种混合模式。  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_cbbb48dd6093.jpg)    \n\u003Cfont size=\"1\">*混合模式预览*\u003C\u002Ffont>\u003Cbr \u002F>     \n\n\u003Csup>3\u003C\u002Fsup> \u003Ca id=\"table1\">BlendModeV2\u003C\u002Fa> 包括 **正常、溶解、变暗、正片叠底、颜色加深、线性加深、深色、变亮、滤色、颜色减淡、线性减淡（加法）、浅色、排除、叠加、柔光、强光、亮光、线性光、点光、硬混、差值、排除、减去、除法、色调、饱和度、颜色、明度、颗粒提取、颗粒合并**，共计 30 种混合模式。  \nBlendMode V2 的部分代码来自 [Virtuoso Nodes for ComfyUI](https:\u002F\u002Fgithub.com\u002Fchrisfreilich\u002Fvirtuoso-nodes)，感谢原作者。  \n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_644ed5b5d98c.jpg)    \n\u003Cfont size=\"1\">*Blend Mode V2 预览*\u003C\u002Ffont>\u003Cbr \u002F>     \n\n\u003Csup>4\u003C\u002Fsup> RGB 颜色采用十六进制 RGB 格式描述，例如 '#FA3D86'。  \n\n\u003Csup>5\u003C\u002Fsup> layer_image 和 layer_mask 必须具有相同的尺寸。\n\n## 星标\n\n[![星标历史图表](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_readme_8b10e36a769d.png)](https:\u002F\u002Fstar-history.com\u002F#chflame163\u002FComfyUI_LayerStyle_Advance&Date)\n\n# 声明\n\nLayerStyle Advance 节点遵循 MIT 许可证，其中部分功能代码来源于其他开源项目。感谢原作者。如用于商业用途，请参考原项目许可证以达成授权协议。","# ComfyUI_LayerStyle_Advance 快速上手指南\n\nComfyUI_LayerStyle_Advance 是从 ComfyUI Layer Style 插件中分离出的高级节点集合，主要包含对依赖环境要求较复杂的图像处理功能（如高级抠图、拼贴、API 调用等）。\n\n## 1. 环境准备\n\n*   **系统要求**：Windows \u002F Linux \u002F macOS\n*   **前置依赖**：\n    *   已安装 **ComfyUI**（推荐使用官方便携版或 Aki 整合包）。\n    *   已安装 **Git**（用于克隆仓库）。\n    *   **Python 环境**：通常由 ComfyUI 自带，无需单独配置。\n*   **网络建议**：部分模型托管在 HuggingFace，国内用户建议配置镜像源或准备梯子，或直接使用提供的百度网盘\u002F夸克网盘下载链接。\n\n## 2. 安装步骤\n\n### 第一步：安装插件\n\n推荐两种方式，任选其一：\n\n**方式 A：使用 ComfyUI Manager（推荐）**\n在 ComfyUI Manager 中搜索 `ComfyUI_LayerStyle_Advance` 并点击安装。\n\n**方式 B：手动安装**\n打开终端进入 ComfyUI 的自定义节点目录（例如 `ComfyUI\\custom_nodes`），执行以下命令：\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fchflame163\u002FComfyUI_LayerStyle_Advance.git\n```\n或者下载 ZIP 压缩包解压后，将文件夹复制到 `ComfyUI\\custom_nodes` 目录下。\n\n### 第二步：安装依赖包\n\n进入插件目录 `ComfyUI\\custom_nodes\\ComfyUI_LayerStyle_Advance`，根据你的 ComfyUI 版本选择操作：\n\n*   **官方便携版 (Official Portable)**：\n    双击运行目录下的 `install_requirements.bat`。\n\n*   **Aki 整合包 (Aki ComfyUI)**：\n    双击运行目录下的 `install_requirements_aki.bat`。\n\n*   **手动命令行安装（进阶）**：\n    若批处理失败，可在插件目录打开 CMD，根据环境路径执行（以官方便携版为例）：\n    ```bash\n    ..\\..\\..\\python_embeded\\python.exe -s -m pip install .\\whl\\docopt-0.6.2-py2.py3-none-any.whl\n    ..\\..\\..\\python_embeded\\python.exe -s -m pip install .\\whl\\hydra_core-1.3.2-py3-none-any.whl\n    ..\\..\\..\\python_embeded\\python.exe -s -m pip install -r requirements.txt\n    .\\repair_dependency.bat\n    ```\n    *(注：Aki 包请将 python 路径改为 `..\\..\\python\\python.exe`)*\n\n### 第三步：下载模型文件\n\n本插件需要额外的模型文件才能运行部分节点（如 Ultra 系列节点）。\n\n**国内用户推荐（百度网盘\u002F夸克网盘）：**\n*   **百度网盘**: [下载链接](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1T_uXMX3OKIWOJLPuLijrgA?pwd=1yye) (提取码: 1yye)\n*   **夸克网盘**: [下载链接](https:\u002F\u002Fpan.quark.cn\u002Fs\u002F4802d6bca7cb)\n\n**海外用户：**\n*   **HuggingFace**: [chflame163\u002FComfyUI_LayerStyle](https:\u002F\u002Fhuggingface.co\u002Fchflame163\u002FComfyUI_LayerStyle\u002Ftree\u002Fmain)\n\n**安装方法：**\n将下载的所有文件复制到 `ComfyUI\\models` 文件夹中。\n*   特别注意：如果使用名为 \"Ultra\" 的节点（如 SAM2UltraV2），需确保 `vitmatte` 模型已放置在 `ComfyUI\\models\\vitmatte` 目录下（上述大包中已包含）。\n\n### 第四步：重启 ComfyUI\n完成上述步骤后，重启 ComfyUI 即可加载新节点。\n\n## 3. 基本使用\n\n以下以常用的 **图片拼贴 (Collage)** 功能为例，展示最基础的工作流搭建：\n\n1.  **加载节点**：\n    在节点搜索栏输入 `Collage`，添加该节点。\n\n2.  **连接输入**：\n    *   准备多个图像输入（可以使用 `Load Image` 节点加载多张图片，或通过上游生成节点输出图像列表）。\n    *   将图像列表连接到 `Collage` 节点的 `images` 输入端。\n\n3.  **参数设置**：\n    *   `canvas_width` \u002F `canvas_height`: 设置输出画布的宽和高。\n    *   `border_width`: 设置图片之间的边框宽度。\n    *   (可选) `florence2_model`: 如需基于物体识别进行智能裁剪拼贴，可连接 Florence2 模型加载器。\n\n4.  **查看结果**：\n    连接 `Save Image` 节点或直接查看预览，即可看到随机拼贴后的效果。\n\n**工作流示例逻辑：**\n```text\n[Load Image 1] \\\n[Load Image 2]  --> [Collage] --> [Save Image]\n[Load Image 3] \u002F\n```\n\n> **提示**：更多复杂用法（如 API 调用、高级抠图）请参考插件目录 `workflow` 文件夹下提供的 JSON 示例工作流文件，直接拖入 ComfyUI 即可加载体验。","一位电商设计师正在为促销海报批量生成带有复杂光影和纹理合成的商品展示图，需要精确控制图层混合模式与蒙版细节。\n\n### 没有 ComfyUI_LayerStyle_Advance 时\n- 设计师必须在 Photoshop 中手动处理每张图的图层样式（如投影、内发光），无法融入 ComfyUI 的自动化工作流，导致 AI 生成与后期修图割裂。\n- 遇到需要复杂依赖包（如 psd_tools）的高级节点时，手动配置环境极易报错，非技术背景的设计师往往卡在安装步骤，无法运行工作流。\n- 调整图层混合效果需反复导出图片到外部软件修改再重新导入，单次迭代耗时超过 10 分钟，严重拖慢创意验证速度。\n- 缺乏原生的超精细抠图（Ultra Matte）支持，处理毛发或透明物体边缘时效果生硬，必须额外寻找插件或手动修补。\n\n### 使用 ComfyUI_LayerStyle_Advance 后\n- 设计师直接在 ComfyUI 中调用分离出的高级节点，将投影、颜色叠加等图层样式纳入自动化流程，实现从生成到精修的一站式完成。\n- 通过一键脚本自动解决 docopt、hydra_core 等复杂依赖问题，无需深究代码即可稳定运行包含高级功能的复杂工作流。\n- 利用节点实时预览调整混合参数，修改即见成效，将单张图的风格迭代时间从 10 分钟压缩至 30 秒以内。\n- 内置集成的 vitmatte 模型提供了电影级的超精细抠图能力，轻松处理商品边缘的半透明阴影与细节，无需切换工具。\n\nComfyUI_LayerStyle_Advance 通过补齐高级图层处理与依赖管理短板，让专业级平面设计工作流在 ComfyUI 中真正实现了全链路自动化。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fchflame163_ComfyUI_LayerStyle_Advance_af645642.jpg","chflame163",null,"https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fchflame163_59afbcb5.png","Beijing","https:\u002F\u002Fgithub.com\u002Fchflame163",[79,83,87,91,95,98,102],{"name":80,"color":81,"percentage":82},"Python","#3572A5",97.7,{"name":84,"color":85,"percentage":86},"Jupyter Notebook","#DA5B0B",1.9,{"name":88,"color":89,"percentage":90},"Cuda","#3A4E3A",0.2,{"name":92,"color":93,"percentage":94},"Shell","#89e051",0.1,{"name":96,"color":97,"percentage":94},"Batchfile","#C1F12E",{"name":99,"color":100,"percentage":101},"JavaScript","#f1e05a",0,{"name":103,"color":104,"percentage":101},"HTML","#e34c26",640,74,"2026-04-05T23:09:03","MIT","Windows","可选（支持 CUDA），若使用 ONNX Runtime GPU 加速需安装对应版本的 CUDA 和 cuDNN；具体显存需求未说明，取决于加载的模型（如 SAM2, Florence2, VitMatte 等）","未说明",{"notes":113,"python":114,"dependencies":115},"1. 主要面向 Windows 用户（提供 .bat 安装脚本），其他系统需手动配置依赖路径。2. 必须下载额外模型文件（VitMatte, SAM2, Florence2, Smol 等）至 ComfyUI\u002Fmodels 目录，国内用户可使用百度网盘或夸克网盘下载。3. 若遇到 protobuf 版本冲突（Descriptors cannot be created directly），需降级至 3.20.3 或设置环境变量 PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python。4. 部分节点（如 Gemini, DeepSeek, ZhipuGLM4）需要申请并配置 API Key。5. 如遇依赖报错，可运行插件目录下的 repair_dependency.bat 修复。","依赖宿主 ComfyUI 环境的 Python 版本（通常为 3.10+），支持 numpy 2.x",[116,117,118,119,120,121,122,123,124],"psd_tools","opencv-contrib-python","transformers>=4.43.2","protobuf\u003C=3.20.3","onnxruntime","hydra_core","docopt","google-genai","numpy>=2.0",[15,43],"2026-03-27T02:49:30.150509","2026-04-07T22:50:54.211778",[129,134,139,144,149,154],{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},23139,"插件安装总是失败，显示错误图片，该如何处理？","如果是临时性的网络问题或仓库同步延迟导致的安装失败，通常等待一段时间（如第二天）后再试即可恢复正常。如果问题持续，请检查网络连接或手动克隆仓库进行安装。","https:\u002F\u002Fgithub.com\u002Fchflame163\u002FComfyUI_LayerStyle_Advance\u002Fissues\u002F130",{"id":135,"question_zh":136,"answer_zh":137,"source_url":138},23134,"SAM2Ultra 节点自动下载模型到缓存目录，如何手动指定模型文件位置？","请下载 vitmatte 模型文件（config.json, model.safetensors, preprocessor_config.json），并将它们放入 `ComfyUI\u002Fmodels\u002Fvitmatte` 文件夹中。如果更新插件后仍然尝试下载到 `.cache\\huggingface` 目录，请确保已更新至最新版本，因为早期的模型加载代码存在缺陷，已在后续修复。","https:\u002F\u002Fgithub.com\u002Fchflame163\u002FComfyUI_LayerStyle_Advance\u002Fissues\u002F3",{"id":140,"question_zh":141,"answer_zh":142,"source_url":143},23135,"LoadBenModel 节点报错提示找不到 'BEN_Base.pth' 文件，应该放在哪里？","请将 `BEN_Base.pth` 文件放置在 `ComfyUI\u002Fmodels\u002FBEN\u002F` 目录下（例如：`D:\\ComfyUI\\models\\BEN\\BEN_Base.pth`）。放置完成后，请务必在 ComfyUI 网页界面点击“刷新”按钮，或者重启后端服务（停止 Python 进程后重新运行），以清除服务器缓存并让系统识别新文件。","https:\u002F\u002Fgithub.com\u002Fchflame163\u002FComfyUI_LayerStyle_Advance\u002Fissues\u002F32",{"id":145,"question_zh":146,"answer_zh":147,"source_url":148},23136,"如何在同一个工作流中多次使用相同模型而不重复加载，以节省显存？","建议使用拆分后的独立节点来实现模型共享。开发者已提交并更新了 `SegmentAnythingUltraV3` 和 `LoadSegmentAnythingModels` 节点。通过先使用独立的加载节点加载一次模型，然后在多个处理节点中引用该模型，可以避免模型被重复加载，从而减少内存和显存占用。请确保插件已更新到包含这些新节点的版本。","https:\u002F\u002Fgithub.com\u002Fchflame163\u002FComfyUI_LayerStyle_Advance\u002Fissues\u002F13",{"id":150,"question_zh":151,"answer_zh":152,"source_url":153},23137,"使用 person_mask_ultra 或 person_mask_ultra_v2 节点时出现 NumPy 广播错误（operands could not be broadcast together）怎么办？","该错误通常不是 ComfyUI 本身的问题，而是由不兼容的 MediaPipe 版本引起的。请检查您的环境，尝试更新或调整 MediaPipe 的版本以解决形状不匹配的问题。开发者已针对此兼容性问题的根源提交了修复方案，建议更新插件至最新版本。","https:\u002F\u002Fgithub.com\u002Fchflame163\u002FComfyUI_LayerStyle_Advance\u002Fissues\u002F132",{"id":155,"question_zh":156,"answer_zh":157,"source_url":158},23138,"运行 Lama 修复节点时出现 OpenCV 错误：\"(-215:Assertion failed) !_src.empty() in function 'cvtColor'\"，如何解决？","此错误通常表明输入图像为空或损坏，导致 OpenCV 无法进行颜色转换。虽然日志中可能伴随 libpng 错误，但核心问题是图像数据未正确加载。用户可以尝试更新 `ComfyUI_LayerStyle_Advance\u002Fpy\u002Fiopaint` 目录下的相关文件（参考社区提供的修复补丁），或者检查输入图像路径是否正确以及图像文件是否完整。","https:\u002F\u002Fgithub.com\u002Fchflame163\u002FComfyUI_LayerStyle_Advance\u002Fissues\u002F58",[]]