From 09161a58baeb87b038121d8813b54017e2cb935d Mon Sep 17 00:00:00 2001 From: fujammy <467918@qq.com> Date: Thu, 26 Dec 2024 02:09:07 +0800 Subject: [PATCH] readme update --- README.md | 81 +++++++++++++++++++++++++++++++++++------------- README_CN.md | 55 ++++++++++++++++++++++++++++++-- requirements.txt | 3 ++ 3 files changed, 116 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index bb1694e..87e4a63 100644 --- a/README.md +++ b/README.md @@ -33,25 +33,25 @@ Features: - 12:5 (1536x640) - 5:12 (640x1536) - Multiple extend modes: - - contain: Scale image to fit within target size - - cover: Scale image to cover target size - - fill: Stretch image to fill target size - - inside: Like contain, but only scales down - - outside: Like cover, but only scales up + - contain: Scale proportionally to fit within target size + - cover: Scale proportionally to cover target size + - fill: Stretch to fill target size + - inside: Like contain, but only downscale + - outside: Like cover, but only upscale - top/bottom/left/right/center: Position image within target size -- Adjustable scale factor +- Adjustable scaling factor - Configurable maximum and minimum resolution limits -- Color picker for background fill -- Maintains aspect ratio while resizing +- Background color picker +- Maintains aspect ratio during adjustment Usage: 1. Add the node to your workflow 2. Select target resolution from SDXL presets -3. Choose extend mode based on your needs +3. Choose extend mode as needed 4. Use color picker to set background color -5. Adjust scale factor and resolution limits if needed +5. Adjust scaling factor and resolution limits as needed -### Remove Empty Lines And Leading Spaces +### ✂️Remove Empty Lines And Leading Spaces A text processing node that cleans up text by removing empty lines and leading/trailing spaces. Features: @@ -101,21 +101,21 @@ Remove empty lines and spaces to generate list: ![Remove empty lines and spaces to generate list](docs/images/rm_line_and_space_cn04.png) -### 📝TextCombiner -A text combiner that merges multiple text inputs into a single output. +### Text Combiner +Added Text Combiner node for combining multiple text inputs into a single output. Features: -- Dynamic Inputs: Automatically adds new input points when connected -- Flexible Separators: +- Dynamic inputs: automatically adds new input points when connected +- Flexible separators: - Supports regular expressions - Supports escape characters (e.g., \n, \r) - - Uses space as separator when left empty -- Smart Line Breaks: Automatically splits output by lines when separator contains line breaks -- Auto Filtering: Removes empty lines while preserving whitespace content + - Uses space when left empty +- Smart line breaks: automatically splits output by line when separator includes newline +- Auto filtering: removes empty lines while preserving pure space content Usage Examples: 1. Basic Usage: - - Using comma as separator: `,` + - Using comma separator: `,` - Output: text1, text2, text3 2. Line Break Separator: @@ -129,17 +129,56 @@ Usage Examples: 3. Mixed Separator: - Using comma or newline: `,|\n` - - Supports both separation methods + - Supports both separator types 4. Empty Separator: - Leave empty - - Directly connects texts with spaces + - Directly joins text with spaces + + +### 🖼️Dynamic Image Input +A node for dynamically combining multiple image inputs. +Features: +- Dynamic input ports: automatically adds new image input points when connected +- Smart image processing: + - Automatically filters empty inputs + - Maintains image format and quality + - Supports batch image processing +- Error handling: + - Returns blank image when no valid inputs + - Gracefully handles exceptions +- Output format: returns image list for further processing + +Usage: +1. Add the node to your workflow +2. Connect image inputs (new input ports will be created automatically) +3. Node will automatically combine all non-empty image inputs +4. Output can be connected to other nodes that require image lists + +Use Cases: +- Batch image processing +- Image collection management +- Dynamic workflow building +- Image list generation + + ## 📝 License MIT License ## 🤝 Updates +### v0.1.3 (2024-12-26) +- Added Dynamic Image Input Combiner + - Implemented dynamic input ports + - Added smart image processing + - Optimized error handling mechanism + - Added support for image list output + +### v0.1.2 (2024-12-25) +- Added image outline feature +- Added text combiner node + ### v0.1.1 (2024-12-25) - Added TextCombiner node diff --git a/README_CN.md b/README_CN.md index d0a2ae7..ccd510b 100644 --- a/README_CN.md +++ b/README_CN.md @@ -43,6 +43,13 @@ - 可配置的最大和最小分辨率限制 - 背景颜色选择器 - 调整时保持宽高比 +### 图像描边功能 (Image Outline) +在图像分辨率调整器中新增了描边功能: +- 一键添加 1 像素宽的描边 +- 描边颜色自动设置为背景色的反色 +- 适用于所有延展模式 +- 保持图像质量不变 +- 自动调整输出尺寸(每边增加 1 像素) 使用方法: 1. 将节点添加到工作流 @@ -50,6 +57,10 @@ 3. 根据需要选择延展模式 4. 使用颜色选择器设置背景颜色 5. 根据需要调整缩放系数和分辨率限制 +6. 在图像分辨率调整器中找到 `add_outline` 选项 +7. 设置为 `True` 启用描边 +8. 描边颜色会自动根据 `background_color` 设置的背景色计算反色 +9. 输出图像尺寸会自动调整(宽高各增加 2 像素) ### ✂️空行和前导空格清理器 (Remove Empty Lines And Leading Spaces) 一个用于清理文本中的空行和前导/尾随空格的文本处理节点。 @@ -101,8 +112,9 @@ ![清除空行、空格生成列表](docs/images/rm_line_and_space_cn04.png) -### 📝文本组合器(TextCombiner) -文本组合器,可以将多个文本输入组合成一个文本输出。 + +### 文本组合器(TextCombiner) +新增文本组合器节点,可以将多个文本输入组合成一个文本输出。 功能特点: - 支持动态输入:连接输入时自动增加新的输入点 @@ -136,11 +148,50 @@ - 直接用空格连接文本 +### 🖼️动态图像输入组合器 (Dynamic Image Input) +一个用于动态组合多个图像输入的节点。 + +特点: +- 动态输入端口:连接时自动增加新的图像输入点 +- 智能图像处理: + - 自动过滤空输入 + - 保持图像格式和质量 + - 支持批量图像处理 +- 错误处理: + - 当没有有效输入时返回空白图像 + - 优雅处理异常情况 +- 输出格式:返回图像列表,便于后续处理 + +使用方法: +1. 将节点添加到工作流 +2. 连接图像输入(会自动创建新的输入端口) +3. 节点将自动组合所有非空图像输入 +4. 输出可以连接到需要图像列表的其他节点 + +使用场景: +- 批量图像处理 +- 图像集合管理 +- 动态工作流构建 +- 图像列表生成 + ## 📝 许可证 MIT License ## 🤝 更新说明 +### v0.1.3 (2024-12-26) +- 新增动态图像输入组合器 + - 实现动态输入端口 + - 添加智能图像处理 + - 优化错误处理机制 + - 支持图像列表输出 + + +### v0.1.2 (2024-12-25) +- 新增图像描边功能 +- 新增文本组合器节点 + + ### v0.1.1 (2024-12-25) - 新增 TextCombiner 节点 - 实现动态输入连接点 diff --git a/requirements.txt b/requirements.txt index e69de29..a414277 100644 --- a/requirements.txt +++ b/requirements.txt @@ -0,0 +1,3 @@ +numpy>=1.21.0 +Pillow>=9.0.0 +torch>=1.7.0