Merge pull request #6 from jammyfu/docs/five-language-entry-20261112
docs: five-language task-first guides and verified discovery metadata
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
# Presentation and discovery review
|
||||
|
||||
2026-11-12. Proposed metadata only; repository settings were not changed.
|
||||
|
||||
## About proposal
|
||||
|
||||
ComfyUI custom nodes for SDXL image sizing, text cleanup, mask workflows, URL images and legacy workflow repair.
|
||||
|
||||
## Relevant topics
|
||||
|
||||
comfyui, comfyui-nodes, sdxl, image-processing, text-processing, workflow
|
||||
|
||||
## Evidence and limitations
|
||||
|
||||
- Five-language entry guides share verified task order; long historical references remain in their original languages. No claim of five-language application UI.
|
||||
- English, Simplified Chinese, Taiwan Traditional Chinese, Japanese and Korean were AI-authored and checked against shared identifiers and limitations, not native-editor certified.
|
||||
- Priority is editorial task usefulness; recent comparative popularity is unknown, no measured-heat claim.
|
||||
- No invented release badge or PyPI installation claim. llms.txt is optional navigation, not a ranking guarantee.
|
||||
- Existing conflicting GEO PR remains untouched; compare it against current main before reuse.
|
||||
- GitHub rendered desktop/mobile review and full application integration are separate from static checks and are not claimed here.
|
||||
@@ -0,0 +1,53 @@
|
||||
# ComfyUI Painting Coder Utilities
|
||||
|
||||

|
||||
|
||||
画像サイズ調整、テキスト整形、マスク処理とワークフロー修復のための ComfyUI カスタムノード集です。目的から入口を選び、詳しい設定は既存のノード資料を参照してください。
|
||||
|
||||
[English](README.md) | [简体中文](README_CN.md) | [繁體中文(臺灣)](README.zh-TW.md) | [日本語](README.ja.md) | [한국어](README.ko.md)
|
||||
|
||||
## 目的から選ぶ
|
||||
|
||||
| 目的 | 既存の入口 |
|
||||
| --- | --- |
|
||||
| 画像の解像度を調整 | `ImageResolutionAdjuster` |
|
||||
| 画像・latent のサイズを作成 | `ImageSizeCreator`、`ImageLatentCreator` と Plus 版 |
|
||||
| 画像・マスクを結合/確認 | `DynamicImageCombiner`、`DynamicMaskCombiner`、`MaskPreview` |
|
||||
| テキストの整形・結合・表示 | `RemoveEmptyLinesAndLeadingSpaces`、`TextCombiner`、`ShowTextPlus` |
|
||||
| ワークフローの値を切替 | 画像・テキスト・マスク・latent の切替ノード |
|
||||
| URL画像の読込/エンコード | `WebImageLoader`、`ImageToBase64` |
|
||||
|
||||

|
||||
|
||||
既存プロジェクトのワークフロー画像です。AI生成の製品イメージではありません。
|
||||
|
||||
## ComfyUI 環境への導入
|
||||
|
||||
ComfyUI を実行している Python を使ってください。互換性のない Torch を追加しないよう注意してください。requirements.txt には NumPy、Pillow、Torch、Gradio が記載されています。環境との互換性を確認してから依存関係を導入し、クローン後に ComfyUI を再起動します。
|
||||
|
||||
```sh
|
||||
cd ComfyUI/custom_nodes
|
||||
git clone https://github.com/jammyfu/ComfyUI_PaintingCoderUtils.git
|
||||
# Run with the Python interpreter used by ComfyUI:
|
||||
python -m pip install -r ComfyUI_PaintingCoderUtils/requirements.txt
|
||||
```
|
||||
|
||||
## 旧ワークフローの移行と最初の例
|
||||
|
||||
v0.3.0 の名前空間変更により、古いワークフローが動かない場合があります。まず JSON をバックアップし、ローカルのブラウザ修復ツールでノード名とパス区切りを更新してから ComfyUI で開き直します。同梱の Flux ワークフローには別のノードやモデルファイルが必要な場合があり、モデル自体は含まれません。
|
||||
|
||||
- [Workflow fixer](docs/fix/workflow_fixer.html)
|
||||
- [Flux workflow JSON](workflow/Flux_Image_Resolution_Adjuster_scale_up_batch_workflow.json)
|
||||
|
||||
## 範囲と利用条件
|
||||
|
||||
__init__.py に登録されたノードクラスは20個です。5言語の案内はノードUIの5言語対応を意味しません。過去の詳しい設定資料は英語・中国語のまま残しています。この文書更新はすべての ComfyUI/PyTorch の組合せの動作保証ではありません。
|
||||
|
||||
コードは商用利用・改変・再配布が可能ですが、著作権表示とライセンス文を残してください。モデル、入力素材、第三者の画像は別途権利確認が必要です。
|
||||
(MIT) · [LICENSE](LICENSE)
|
||||
|
||||
## 詳細資料
|
||||
|
||||
- [English node reference](README.reference.md) · [中文节点参考](README_CN.reference.md)
|
||||
- [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md)
|
||||
- [Issues](https://github.com/jammyfu/ComfyUI_PaintingCoderUtils/issues)
|
||||
@@ -0,0 +1,53 @@
|
||||
# ComfyUI Painting Coder Utilities
|
||||
|
||||

|
||||
|
||||
이미지 크기 조정, 텍스트 정리, 마스크 처리와 워크플로 복구를 위한 ComfyUI 사용자 정의 노드 모음입니다. 작업에 맞는 항목을 고른 뒤 기존 노드 설명에서 세부 설정을 확인하세요.
|
||||
|
||||
[English](README.md) | [简体中文](README_CN.md) | [繁體中文(臺灣)](README.zh-TW.md) | [日本語](README.ja.md) | [한국어](README.ko.md)
|
||||
|
||||
## 작업별 선택
|
||||
|
||||
| 작업 | 기존 기능 |
|
||||
| --- | --- |
|
||||
| 이미지 해상도 조정 | `ImageResolutionAdjuster` |
|
||||
| 이미지·latent 크기 생성 | `ImageSizeCreator`, `ImageLatentCreator` 및 Plus 버전 |
|
||||
| 이미지·마스크 결합과 확인 | `DynamicImageCombiner`, `DynamicMaskCombiner`, `MaskPreview` |
|
||||
| 텍스트 정리·결합·표시 | `RemoveEmptyLinesAndLeadingSpaces`, `TextCombiner`, `ShowTextPlus` |
|
||||
| 워크플로 값 전환 | 이미지·텍스트·마스크·latent 전환 노드 |
|
||||
| URL 이미지 불러오기·인코딩 | `WebImageLoader`, `ImageToBase64` |
|
||||
|
||||

|
||||
|
||||
기존 프로젝트의 실제 워크플로 이미지이며 AI로 생성한 제품 목업이 아닙니다.
|
||||
|
||||
## ComfyUI 환경에 설치
|
||||
|
||||
ComfyUI를 실행하는 Python을 사용하세요. 호환되지 않는 Torch를 추가 설치하지 않도록 주의하세요. requirements.txt에는 NumPy, Pillow, Torch, Gradio가 선언되어 있습니다. 환경 호환성을 확인한 뒤 의존성을 설치하고, 저장소를 복제한 후 ComfyUI를 다시 시작하세요.
|
||||
|
||||
```sh
|
||||
cd ComfyUI/custom_nodes
|
||||
git clone https://github.com/jammyfu/ComfyUI_PaintingCoderUtils.git
|
||||
# Run with the Python interpreter used by ComfyUI:
|
||||
python -m pip install -r ComfyUI_PaintingCoderUtils/requirements.txt
|
||||
```
|
||||
|
||||
## 기존 워크플로 이전과 첫 예제
|
||||
|
||||
v0.3.0의 네임스페이스 변경으로 이전 워크플로가 작동하지 않을 수 있습니다. JSON을 먼저 백업한 뒤 로컬 브라우저 복구 도구로 노드 이름과 경로 구분자를 바꾸고 ComfyUI에서 다시 여세요. 포함된 Flux 워크플로는 추가 노드와 모델 파일이 필요할 수 있으며, 모델 자체는 포함하지 않습니다.
|
||||
|
||||
- [Workflow fixer](docs/fix/workflow_fixer.html)
|
||||
- [Flux workflow JSON](workflow/Flux_Image_Resolution_Adjuster_scale_up_batch_workflow.json)
|
||||
|
||||
## 범위와 사용 조건
|
||||
|
||||
__init__.py에 등록된 노드 클래스는 20개입니다. 5개 언어 안내는 노드 UI가 5개 언어를 지원한다는 뜻이 아닙니다. 상세한 기존 설정 자료는 영어·중국어로 보존했습니다. 이번 문서 수정이 모든 ComfyUI/PyTorch 조합의 검증을 의미하지는 않습니다.
|
||||
|
||||
코드는 상업적 사용·수정·재배포가 가능하며 저작권 및 라이선스 고지를 유지해야 합니다. 모델, 입력 자료와 제3자 이미지의 권리는 별도로 확인하세요.
|
||||
(MIT) · [LICENSE](LICENSE)
|
||||
|
||||
## 상세 자료
|
||||
|
||||
- [English node reference](README.reference.md) · [中文节点参考](README_CN.reference.md)
|
||||
- [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md)
|
||||
- [Issues](https://github.com/jammyfu/ComfyUI_PaintingCoderUtils/issues)
|
||||
@@ -1,578 +1,53 @@
|
||||

|
||||
# ComfyUI Painting Coder Utilities
|
||||
|
||||
# ComfyUI Painting Coder Utilities Nodes
|
||||

|
||||
|
||||
A practical collection of nodes designed for ComfyUI that streamlines image and text processing workflows. Features include optimized resolution adjustment, text cleaning tools, dynamic image/text combination, and mask preview utilities. Created by a programmer who enjoys painting, this collection is perfect for artists and developers looking to enhance their AI art creation pipeline.
|
||||
ComfyUI nodes for image sizing, text cleanup, masks and workflow repair. Choose a task below, then open the original node reference.
|
||||
|
||||
[English](./README.md) | [简体中文](./README_CN.md)
|
||||
[English](README.md) | [简体中文](README_CN.md) | [繁體中文(臺灣)](README.zh-TW.md) | [日本語](README.ja.md) | [한국어](README.ko.md)
|
||||
|
||||
<!-- geo:badges -->
|
||||
[](https://github.com/comfyanonymous/ComfyUI) [](pyproject.toml) [](LICENSE) [](https://github.com/jammyfu/ComfyUI_PaintingCoderUtils/releases)
|
||||
## Choose a task
|
||||
|
||||
**Quick install / 快速安装:** `cd ComfyUI/custom_nodes && git clone https://github.com/jammyfu/ComfyUI_PaintingCoderUtils.git`, then restart ComfyUI. See [Installation](#-installation).
|
||||
| Task | Existing entry |
|
||||
| --- | --- |
|
||||
| Resize images without inventing a new workflow | `ImageResolutionAdjuster` |
|
||||
| Create image/latent dimensions | `ImageSizeCreator`, `ImageLatentCreator` and Plus variants |
|
||||
| Combine or inspect images and masks | `DynamicImageCombiner`, `DynamicMaskCombiner`, `MaskPreview` |
|
||||
| Clean, join or display text | `RemoveEmptyLinesAndLeadingSpaces`, `TextCombiner`, `ShowTextPlus` |
|
||||
| Route workflow values | image, text, mask and latent switch nodes |
|
||||
| Load URLs or encode images | `WebImageLoader`, `ImageToBase64` |
|
||||
|
||||

|
||||
|
||||
Existing project workflow screenshot; not an AI-generated product mockup.
|
||||
|
||||
# ⚠️ Important Update Notice
|
||||
## Install in your ComfyUI environment
|
||||
|
||||
**Version 0.3.0 Breaking Changes:**
|
||||
- The namespace has been modified to improve compatibility
|
||||
- This update will cause older workflows to stop working
|
||||
- To fix your existing workflows, please use our workflow fixer tool:
|
||||
Use the Python interpreter that runs ComfyUI. Do not install a second incompatible Torch build into it. The pack declares NumPy, Pillow, Torch and Gradio dependencies in requirements.txt; review their compatibility before installing. Restart ComfyUI after cloning.
|
||||
|
||||

|
||||
|
||||
Open the page [Workflow Fixer Tool](https://jammyfu.github.io/ComfyUI_PaintingCoderUtils/fix/workflow_fixer.html?lang=en) Or go to the directory **ComfyUI_PaintingCoderUtils/docs/fix/** to find **workflow_fixer.html** and open the page
|
||||
|
||||
|
||||
- Added new feature: Path separator conversion between Windows and Unix-style (Linux/Mac) formats
|
||||
- The fixer tool now supports both namespace updates and path format conversion
|
||||
---
|
||||
|
||||
## 🎯 Nodes
|
||||
|
||||
### 📐Image Resolution Adjuster
|
||||
A utility node for adjusting image resolutions according to SDXL optimal aspect ratios.
|
||||
|
||||

|
||||
|
||||
Image resolution adjustment with customizable background color fill
|
||||

|
||||
|
||||
Batch image redrawing with aspect ratio preservation
|
||||

|
||||
|
||||
#### Flux Image Resolution Adjuster Batch Workflow Download
|
||||
<a href="https://raw.githubusercontent.com/jammyfu/ComfyUI_PaintingCoderUtils/refs/heads/main/workflow/Flux_Image_Resolution_Adjuster_scale_up_batch_workflow.json" download="Flux_Image_Resolution_Adjuster_batch_workflow.json">⬇️ Download Workflow JSON (Right Click Save As)</a>
|
||||
|
||||
Features:
|
||||
- Supports all SDXL optimal resolutions:
|
||||
- 1:1 (1024x1024)
|
||||
- 9:7 (1152x896)
|
||||
- 7:9 (896x1152)
|
||||
- 3:2 (1216x832)
|
||||
- 2:3 (832x1216)
|
||||
- 7:4 (1344x768)
|
||||
- 4:7 (768x1344)
|
||||
- 12:5 (1536x640)
|
||||
- 5:12 (640x1536)
|
||||
- Multiple extend modes:
|
||||
- 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 scaling factor
|
||||
- Configurable maximum and minimum resolution limits
|
||||
- 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 as needed
|
||||
4. Use color picker to set background color
|
||||
5. Adjust scaling factor and resolution limits as needed
|
||||
|
||||
### 🌐Web Image Loader
|
||||
A node for loading images from the web.
|
||||
|
||||

|
||||

|
||||
|
||||
Features:
|
||||
- Supports loading images from URLs and Base64 format
|
||||
- Automatically handles image formats
|
||||
- Supports batch image loading
|
||||
- Error handling:
|
||||
- Returns a placeholder image for invalid URLs
|
||||
- Gracefully handles exceptions, automatically removing erroneous images
|
||||
|
||||
Usage:
|
||||
1. Add the node to your workflow
|
||||
2. Input the image URL
|
||||
3. The node will automatically load and process the image
|
||||
4. The output image can be connected to other nodes requiring image input
|
||||
|
||||
Use Cases:
|
||||
- Loading images from online resources
|
||||
- Dynamic image processing workflows
|
||||
- Batch image downloading and processing
|
||||
|
||||
### 🖼️Image to Base64 Encoder
|
||||
A node for converting images to Base64 encoding.
|
||||
|
||||

|
||||
|
||||
Features:
|
||||
- Supports various image formats (JPEG, PNG, BMP, etc.)
|
||||
- Automatically handles image size and format
|
||||
- Supports batch image encoding
|
||||
- Error handling:
|
||||
- Returns error information for invalid images
|
||||
- Gracefully handles exceptions, ensuring workflow continuity
|
||||
|
||||
Usage:
|
||||
1. Add the node to your workflow
|
||||
2. Input the image file or image path
|
||||
3. The node will automatically convert the image to Base64 encoding
|
||||
4. The output Base64 string can be connected to other nodes requiring Base64 input
|
||||
|
||||
Use Cases:
|
||||
- Image data transmission
|
||||
- Embedding images in HTML or JSON
|
||||
- Dynamic image processing workflows
|
||||
- Batch image encoding and processing
|
||||
|
||||
### 🔀 Switch Node (Image Switch, Text Switch)
|
||||
Switch nodes are used to dynamically switch between different input or output paths in a workflow.
|
||||
|
||||

|
||||
|
||||
Features:
|
||||
- Supports multiple input and output types
|
||||
- Configurable switching conditions
|
||||
- Automatically handles input and output connections
|
||||
|
||||
Usage:
|
||||
1. Add the Switch node to your workflow
|
||||
2. Configure switching conditions (e.g., boolean values, numerical ranges, etc.)
|
||||
3. Connect different input and output paths
|
||||
4. Automatically switch paths based on conditions
|
||||
|
||||
Use Cases:
|
||||
- Dynamically adjusting workflows
|
||||
- Conditional branch processing
|
||||
- Multi-path selection
|
||||
|
||||
|
||||
### 🖼️Image Size Creator
|
||||
A node for creating image dimensions.
|
||||
|
||||

|
||||
|
||||
Features:
|
||||
- Supports all SDXL optimal resolutions:
|
||||
- 1:1 (1024x1024)
|
||||
- 9:7 (1152x896)
|
||||
- 7:9 (896x1152)
|
||||
- 3:2 (1216x832)
|
||||
- 2:3 (832x1216)
|
||||
- 7:4 (1344x768)
|
||||
- 4:7 (768x1344)
|
||||
- 12:5 (1536x640)
|
||||
- 5:12 (640x1536)
|
||||
- Adjustable scale factor
|
||||
- Supports landscape, portrait and square modes
|
||||
- Automatic calculation of optimal resolution
|
||||
|
||||
Usage:
|
||||
1. Add the node to your workflow
|
||||
2. Select image mode (landscape/portrait/square)
|
||||
3. Choose target resolution
|
||||
4. Adjust scale factor (optional)
|
||||
|
||||
Use Cases:
|
||||
- Creating images with specific dimensions
|
||||
- SDXL image generation optimization
|
||||
- Batch image processing workflows
|
||||
|
||||
### ✨Image Size Creator Plus
|
||||
|
||||

|
||||
|
||||
An enhanced version of the image size creator that supports both SDXL and Midjourney standard resolutions. Key features:
|
||||
- Supports switching between SDXL and Midjourney styles
|
||||
- Includes all SDXL standard resolutions
|
||||
- Includes all Midjourney standard resolutions
|
||||
- Three modes: landscape, portrait, and square
|
||||
- Adjustable scale factor
|
||||
|
||||
### 🖼️Image Latent Creator
|
||||
A node for creating empty image latent spaces.
|
||||
|
||||

|
||||
Features:
|
||||
- Inherits all functionality from Image Size Creator
|
||||
- Supports batch size settings
|
||||
- Automatically creates optimized latent space dimensions
|
||||
- Supports additional PNG information
|
||||
|
||||
Usage:
|
||||
1. Add the node to your workflow
|
||||
2. Set desired image dimension parameters
|
||||
3. Set batch size
|
||||
4. Connect to nodes requiring latent space input
|
||||
|
||||
Use Cases:
|
||||
- Creating empty latent spaces
|
||||
- SDXL workflow initialization
|
||||
- Batch image generation
|
||||
- Custom latent space processing
|
||||
|
||||
|
||||
### ✨Image Latent Creator Plus
|
||||
An enhanced version of the latent creator that inherits all functionality from Image Size Creator Plus and supports batch latent space creation.
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
### ✂️Remove Empty Lines And Leading Spaces
|
||||
A text processing node that cleans up text by removing empty lines and leading/trailing spaces.
|
||||
|
||||

|
||||
|
||||
Features:
|
||||
- Removes empty lines from text
|
||||
- Removes leading and trailing spaces
|
||||
- Option to keep single empty line between paragraphs
|
||||
- Option to preserve indentation
|
||||
- Supports batch text processing
|
||||
|
||||
Usage Example:
|
||||
```
|
||||
Input text:
|
||||
Hello World
|
||||
|
||||
This is a test
|
||||
|
||||
|
||||
Multiple empty lines above
|
||||
|
||||
Output text (with default settings):
|
||||
Hello World
|
||||
This is a test
|
||||
Multiple empty lines above
|
||||
```sh
|
||||
cd ComfyUI/custom_nodes
|
||||
git clone https://github.com/jammyfu/ComfyUI_PaintingCoderUtils.git
|
||||
# Run with the Python interpreter used by ComfyUI:
|
||||
python -m pip install -r ComfyUI_PaintingCoderUtils/requirements.txt
|
||||
```
|
||||
|
||||
Parameters:
|
||||
- `output type`: Output type (text, list)
|
||||
- `remove empty line option`: Remove empty lines
|
||||
- `remove loading space option`: Remove spaces
|
||||
## Workflow migration and first example
|
||||
|
||||
Use Cases:
|
||||
- Cleaning up prompt text
|
||||
- Formatting text for LoRA training
|
||||
- Preparing text for text-to-image generation
|
||||
- Standardizing text input format
|
||||
The v0.3.0 namespace change can break older workflows. Back up the JSON first, use the local browser fixer to update names/path separators, then reopen it in ComfyUI. The bundled Flux workflow may need other nodes and model files; this repository does not bundle them.
|
||||
|
||||
Remove extra empty lines and spaces to generate text:
|
||||

|
||||
- [Workflow fixer](docs/fix/workflow_fixer.html)
|
||||
- [Flux workflow JSON](workflow/Flux_Image_Resolution_Adjuster_scale_up_batch_workflow.json)
|
||||
|
||||
Remove empty lines while keeping spaces to generate text:
|
||||

|
||||
## Scope and permission
|
||||
|
||||
Remove spaces while keeping empty lines to generate text:
|
||||

|
||||
20 node classes are registered in __init__.py. These five guides do not imply five-language node UI. Full historical node settings remain in the English/Chinese references. This documentation change does not certify every ComfyUI/PyTorch version.
|
||||
|
||||
Remove empty lines and spaces to generate list:
|
||||

|
||||
You may use, modify and distribute the code, including commercially, while retaining the copyright and license notice. Model, workflow-input and third-party image rights are separate.
|
||||
(MIT) · [LICENSE](LICENSE)
|
||||
|
||||
## Reference
|
||||
|
||||
### 🔗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:
|
||||
- Supports regular expressions
|
||||
- Supports escape characters (e.g., \n, \r)
|
||||
- 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 separator: `,`
|
||||
- Output: text1, text2, text3
|
||||
|
||||
2. Line Break Separator:
|
||||
- Using newline: `\n`
|
||||
- Output:
|
||||
```
|
||||
text1
|
||||
text2
|
||||
text3
|
||||
```
|
||||
|
||||
3. Mixed Separator:
|
||||
- Using comma or newline: `,|\n`
|
||||
- Supports both separator types
|
||||
|
||||
4. Empty Separator:
|
||||
- Leave empty
|
||||
- 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
|
||||
|
||||
### 📝 Text Display Enhancer (Show Text Plus)
|
||||
An enhanced text display node that provides more text formatting and display options.
|
||||
|
||||

|
||||
|
||||
Features:
|
||||
- Display Mode Options:
|
||||
- Normal Mode: Displays text directly
|
||||
- Text Statistics Functionality:
|
||||
- Character Count
|
||||
- Word Count
|
||||
- Line Count
|
||||
- Supports automatic line wrapping for long texts
|
||||
- Supports multilingual text
|
||||
|
||||
Usage Instructions:
|
||||
1. Add the node to your workflow
|
||||
2. Connect the text input
|
||||
3. Select the display mode
|
||||
|
||||
### 📝 Multiline Text Input (Multiline Text)
|
||||
A node that supports multiline text input, making it easy to input and edit long text content.
|
||||
|
||||

|
||||
|
||||
Features:
|
||||
- Supports multiline text input and editing
|
||||
- Retains text formatting and line breaks
|
||||
- Compatible with both Chinese and English input
|
||||
- User-friendly text editing interface
|
||||
- Supports copy and paste operations
|
||||
|
||||
Usage Instructions:
|
||||
1. Add the node to your workflow
|
||||
2. Double-click the text box to edit
|
||||
3. Supports direct pasting of multiline text
|
||||
4. Click outside the area to save after editing
|
||||
|
||||
Usage Scenarios:
|
||||
- Inputting long prompt phrases
|
||||
- Editing multiline descriptive texts
|
||||
- Batch text processing
|
||||
- Preparing texts for LoRA training
|
||||
|
||||
### 🎭Mask Preview
|
||||
A utility node for previewing and inspecting image masks.
|
||||
|
||||

|
||||
|
||||
Features:
|
||||
- Intuitive mask area visualization
|
||||
- Multiple preview modes:
|
||||
- Original mask
|
||||
- Outline highlight
|
||||
- Support for batch mask preview
|
||||
- Real-time preview updates
|
||||
|
||||
Usage:
|
||||
1. Add the node to your workflow
|
||||
2. Connect mask input
|
||||
3. Select preview mode
|
||||
4. Adjust display parameters
|
||||
|
||||
|
||||
## 📦 Installation
|
||||
|
||||
1. Navigate to ComfyUI's `custom_nodes` directory
|
||||
2. Clone the repository:
|
||||
```bash
|
||||
cd custom_nodes
|
||||
git clone https://github.com/jammyfu/ComfyUI_PaintingCoderUtils.git
|
||||
```
|
||||
3. Restart ComfyUI
|
||||
|
||||
|
||||
## 📝 License
|
||||
|
||||
MIT License
|
||||
|
||||
## 🤝 Updates
|
||||
### v0.3.5 Update (2025-01-25)
|
||||
- **New Features:**
|
||||
- Added Image Size Creator Plus node, supporting SDXL and Midjourney dimensions
|
||||
- Added Image Latent Creator Plus node, inheriting all Plus node functionalities
|
||||
- Optimized Plus node user interface and interaction experience
|
||||
- Added more resolution preset options
|
||||
- Improved node performance and stability
|
||||
|
||||
### v0.3.4 Update (2025-01-24)
|
||||
- **Updates:**
|
||||
- Modified the ComfyUI workflow fixer tool page to enhance user experience
|
||||
- Added more error messages to help users locate issues faster
|
||||
- Optimized file upload and download functionality to support more file processing
|
||||
- Improved path separator conversion functionality to enhance cross-platform compatibility
|
||||
- Enhanced interface response speed to reduce loading time
|
||||
|
||||
### v0.3.3 (2025-01-23)
|
||||
- **Improvements:**
|
||||
- Bug fixes, added workflow fixer tool to repair old version workflow JSON files
|
||||
- Added path separator conversion functionality to switch between Windows and Unix formats
|
||||
- Added file upload functionality to upload JSON files for repair
|
||||
- Added file download functionality to download repaired JSON files or ZIP files
|
||||
|
||||
### v0.3.2 (2025-01-22)
|
||||
- **Improvements:**
|
||||
- Enhanced the workflow fixer tool with more error handling and informative messages
|
||||
- Optimized the user interface for more intuitive operation
|
||||
- Added support for more node types
|
||||
- Improved the stability of the path separator conversion functionality
|
||||
- Fixed issues where JSON files could not be loaded correctly in certain cases
|
||||
|
||||
### v0.3.1 (2025-01-22)
|
||||
- **Bug Fixes:**
|
||||
- Fixed crash issue in Text Combiner when handling special characters
|
||||
- Fixed issue with Dynamic Image Input node not handling inputs correctly in certain cases
|
||||
- Fixed display error in Mask Previewer during batch preview
|
||||
- Fixed compatibility issues with path separator conversion functionality on some systems
|
||||
- Fixed processing errors in Image Resolution Adjuster at specific resolutions
|
||||
|
||||
### v0.3.0 (2025-01-21)
|
||||
- **Breaking Changes:**
|
||||
- Modified namespace structure for better compatibility
|
||||
- Added workflow fixer tool for migration
|
||||
- Added path separator conversion functionality
|
||||
- Enhanced error handling and user feedback
|
||||
- Improved cross-platform compatibility
|
||||
|
||||
### v0.2.2 (2024-01-09)
|
||||
- Added Mask Switch node
|
||||
- Support switching between two masks based on conditions
|
||||
- Provides default blank mask handling
|
||||
- Optimized exception handling mechanism
|
||||
- Maintains mask format and quality
|
||||
|
||||
### v0.2.1 (2024-01-07)
|
||||
- Added Web Image Loader node
|
||||
- Support loading images from URLs and Base64
|
||||
- Automatic image format handling
|
||||
- Support batch image loading
|
||||
- Error handling: returns placeholder image for invalid URLs, graceful exception handling
|
||||
- Cache support for improved loading efficiency
|
||||
- Preview feature: generates and saves preview images
|
||||
|
||||
### v0.2.0 (2024-01-06)
|
||||
- Added Image Switch node
|
||||
- Support switching between two images based on conditions
|
||||
- Provides default blank image handling
|
||||
- Optimized exception handling mechanism
|
||||
- Maintains image format and quality
|
||||
|
||||
- Added Text Switch node
|
||||
- Support switching between two texts based on conditions
|
||||
- Provides default blank text handling
|
||||
- Optimized exception handling mechanism
|
||||
|
||||
### v0.1.9 (2024-01-05)
|
||||
- Enhanced Image Resolution Adjuster
|
||||
- Added mask feathering functionality
|
||||
- Improved mask edge processing algorithm
|
||||
- Enhanced mask processing performance
|
||||
- Optimized edge smoothing effects
|
||||
|
||||
### v0.1.8 (2024-01-04)
|
||||
- Optimized Text Combiner
|
||||
- Improved text concatenation logic
|
||||
- Enhanced performance for large text processing
|
||||
- Fixed special character handling issues
|
||||
- Optimized memory usage
|
||||
|
||||
### v0.1.7 (2024-01-03)
|
||||
- Enhanced Image Resolution Adjuster
|
||||
- Improved extend mode algorithms
|
||||
- Enhanced image processing performance
|
||||
- Fixed edge handling issues
|
||||
- Optimized memory usage
|
||||
|
||||
### v0.1.6 (2024-01-02)
|
||||
- Added Multiline Text Input node
|
||||
- Support for multiline text input and editing
|
||||
- Preserves text formatting and line breaks
|
||||
- Compatible with both Chinese and English input
|
||||
- User-friendly text editing interface
|
||||
- Supports copy and paste operations
|
||||
|
||||
### v0.1.5 (2024-12-28)
|
||||
- Added Mask Preview node
|
||||
- Added real-time preview update
|
||||
- Added batch mask preview
|
||||
|
||||
### v0.1.4 (2024-12-27)
|
||||
- Added Show Text Plus node
|
||||
- Added multiple display modes
|
||||
- Implemented text statistics functionality
|
||||
- Added support for custom display options
|
||||
- Optimized long text display
|
||||
|
||||
### 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
|
||||
- Implemented dynamic input connections
|
||||
- Added support for regex separators
|
||||
- Added support for newlines and escape characters
|
||||
- Added empty separator handling
|
||||
- Optimized text joining logic
|
||||
|
||||
### v0.1.0 (2024-12-23)
|
||||
- Initial release
|
||||
- Added Image Resolution Adjuster:
|
||||
- Support for SDXL optimal resolutions
|
||||
- Multiple extend modes
|
||||
- Color picker for background
|
||||
- Scale factor adjustment
|
||||
- Resolution limits
|
||||
- Added Remove Empty Lines And Leading Spaces:
|
||||
- Text cleaning functionality
|
||||
- Configurable preservation options
|
||||
- Batch processing support
|
||||
|
||||
|
||||
### Planned Features
|
||||
- Dynamic image input combination
|
||||
- Text template system
|
||||
- More image processing utilities
|
||||
|
||||
## 🤝 Contributions
|
||||
|
||||
Issues and Pull Requests are welcome!
|
||||
|
||||
## 🙏 Acknowledgements
|
||||
|
||||
- ComfyUI Team
|
||||
- Impact-Pack Project
|
||||
- [English node reference](README.reference.md) · [中文节点参考](README_CN.reference.md)
|
||||
- [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md)
|
||||
- [Issues](https://github.com/jammyfu/ComfyUI_PaintingCoderUtils/issues)
|
||||
|
||||
@@ -0,0 +1,578 @@
|
||||

|
||||
|
||||
# ComfyUI Painting Coder Utilities Nodes
|
||||
|
||||
A practical collection of nodes designed for ComfyUI that streamlines image and text processing workflows. Features include optimized resolution adjustment, text cleaning tools, dynamic image/text combination, and mask preview utilities. Created by a programmer who enjoys painting, this collection is perfect for artists and developers looking to enhance their AI art creation pipeline.
|
||||
|
||||
[English](./README.md) | [简体中文](./README_CN.md)
|
||||
|
||||
<!-- geo:badges -->
|
||||
[](https://github.com/comfyanonymous/ComfyUI) [](pyproject.toml) [](LICENSE) [](https://github.com/jammyfu/ComfyUI_PaintingCoderUtils/releases)
|
||||
|
||||
**Quick install / 快速安装:** `cd ComfyUI/custom_nodes && git clone https://github.com/jammyfu/ComfyUI_PaintingCoderUtils.git`, then restart ComfyUI. See [Installation](#-installation).
|
||||
|
||||
|
||||
|
||||
# ⚠️ Important Update Notice
|
||||
|
||||
**Version 0.3.0 Breaking Changes:**
|
||||
- The namespace has been modified to improve compatibility
|
||||
- This update will cause older workflows to stop working
|
||||
- To fix your existing workflows, please use our workflow fixer tool:
|
||||
|
||||

|
||||
|
||||
Open the page [Workflow Fixer Tool](https://jammyfu.github.io/ComfyUI_PaintingCoderUtils/fix/workflow_fixer.html?lang=en) Or go to the directory **ComfyUI_PaintingCoderUtils/docs/fix/** to find **workflow_fixer.html** and open the page
|
||||
|
||||
|
||||
- Added new feature: Path separator conversion between Windows and Unix-style (Linux/Mac) formats
|
||||
- The fixer tool now supports both namespace updates and path format conversion
|
||||
---
|
||||
|
||||
## 🎯 Nodes
|
||||
|
||||
### 📐Image Resolution Adjuster
|
||||
A utility node for adjusting image resolutions according to SDXL optimal aspect ratios.
|
||||
|
||||

|
||||
|
||||
Image resolution adjustment with customizable background color fill
|
||||

|
||||
|
||||
Batch image redrawing with aspect ratio preservation
|
||||

|
||||
|
||||
#### Flux Image Resolution Adjuster Batch Workflow Download
|
||||
<a href="https://raw.githubusercontent.com/jammyfu/ComfyUI_PaintingCoderUtils/refs/heads/main/workflow/Flux_Image_Resolution_Adjuster_scale_up_batch_workflow.json" download="Flux_Image_Resolution_Adjuster_batch_workflow.json">⬇️ Download Workflow JSON (Right Click Save As)</a>
|
||||
|
||||
Features:
|
||||
- Supports all SDXL optimal resolutions:
|
||||
- 1:1 (1024x1024)
|
||||
- 9:7 (1152x896)
|
||||
- 7:9 (896x1152)
|
||||
- 3:2 (1216x832)
|
||||
- 2:3 (832x1216)
|
||||
- 7:4 (1344x768)
|
||||
- 4:7 (768x1344)
|
||||
- 12:5 (1536x640)
|
||||
- 5:12 (640x1536)
|
||||
- Multiple extend modes:
|
||||
- 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 scaling factor
|
||||
- Configurable maximum and minimum resolution limits
|
||||
- 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 as needed
|
||||
4. Use color picker to set background color
|
||||
5. Adjust scaling factor and resolution limits as needed
|
||||
|
||||
### 🌐Web Image Loader
|
||||
A node for loading images from the web.
|
||||
|
||||

|
||||

|
||||
|
||||
Features:
|
||||
- Supports loading images from URLs and Base64 format
|
||||
- Automatically handles image formats
|
||||
- Supports batch image loading
|
||||
- Error handling:
|
||||
- Returns a placeholder image for invalid URLs
|
||||
- Gracefully handles exceptions, automatically removing erroneous images
|
||||
|
||||
Usage:
|
||||
1. Add the node to your workflow
|
||||
2. Input the image URL
|
||||
3. The node will automatically load and process the image
|
||||
4. The output image can be connected to other nodes requiring image input
|
||||
|
||||
Use Cases:
|
||||
- Loading images from online resources
|
||||
- Dynamic image processing workflows
|
||||
- Batch image downloading and processing
|
||||
|
||||
### 🖼️Image to Base64 Encoder
|
||||
A node for converting images to Base64 encoding.
|
||||
|
||||

|
||||
|
||||
Features:
|
||||
- Supports various image formats (JPEG, PNG, BMP, etc.)
|
||||
- Automatically handles image size and format
|
||||
- Supports batch image encoding
|
||||
- Error handling:
|
||||
- Returns error information for invalid images
|
||||
- Gracefully handles exceptions, ensuring workflow continuity
|
||||
|
||||
Usage:
|
||||
1. Add the node to your workflow
|
||||
2. Input the image file or image path
|
||||
3. The node will automatically convert the image to Base64 encoding
|
||||
4. The output Base64 string can be connected to other nodes requiring Base64 input
|
||||
|
||||
Use Cases:
|
||||
- Image data transmission
|
||||
- Embedding images in HTML or JSON
|
||||
- Dynamic image processing workflows
|
||||
- Batch image encoding and processing
|
||||
|
||||
### 🔀 Switch Node (Image Switch, Text Switch)
|
||||
Switch nodes are used to dynamically switch between different input or output paths in a workflow.
|
||||
|
||||

|
||||
|
||||
Features:
|
||||
- Supports multiple input and output types
|
||||
- Configurable switching conditions
|
||||
- Automatically handles input and output connections
|
||||
|
||||
Usage:
|
||||
1. Add the Switch node to your workflow
|
||||
2. Configure switching conditions (e.g., boolean values, numerical ranges, etc.)
|
||||
3. Connect different input and output paths
|
||||
4. Automatically switch paths based on conditions
|
||||
|
||||
Use Cases:
|
||||
- Dynamically adjusting workflows
|
||||
- Conditional branch processing
|
||||
- Multi-path selection
|
||||
|
||||
|
||||
### 🖼️Image Size Creator
|
||||
A node for creating image dimensions.
|
||||
|
||||

|
||||
|
||||
Features:
|
||||
- Supports all SDXL optimal resolutions:
|
||||
- 1:1 (1024x1024)
|
||||
- 9:7 (1152x896)
|
||||
- 7:9 (896x1152)
|
||||
- 3:2 (1216x832)
|
||||
- 2:3 (832x1216)
|
||||
- 7:4 (1344x768)
|
||||
- 4:7 (768x1344)
|
||||
- 12:5 (1536x640)
|
||||
- 5:12 (640x1536)
|
||||
- Adjustable scale factor
|
||||
- Supports landscape, portrait and square modes
|
||||
- Automatic calculation of optimal resolution
|
||||
|
||||
Usage:
|
||||
1. Add the node to your workflow
|
||||
2. Select image mode (landscape/portrait/square)
|
||||
3. Choose target resolution
|
||||
4. Adjust scale factor (optional)
|
||||
|
||||
Use Cases:
|
||||
- Creating images with specific dimensions
|
||||
- SDXL image generation optimization
|
||||
- Batch image processing workflows
|
||||
|
||||
### ✨Image Size Creator Plus
|
||||
|
||||

|
||||
|
||||
An enhanced version of the image size creator that supports both SDXL and Midjourney standard resolutions. Key features:
|
||||
- Supports switching between SDXL and Midjourney styles
|
||||
- Includes all SDXL standard resolutions
|
||||
- Includes all Midjourney standard resolutions
|
||||
- Three modes: landscape, portrait, and square
|
||||
- Adjustable scale factor
|
||||
|
||||
### 🖼️Image Latent Creator
|
||||
A node for creating empty image latent spaces.
|
||||
|
||||

|
||||
Features:
|
||||
- Inherits all functionality from Image Size Creator
|
||||
- Supports batch size settings
|
||||
- Automatically creates optimized latent space dimensions
|
||||
- Supports additional PNG information
|
||||
|
||||
Usage:
|
||||
1. Add the node to your workflow
|
||||
2. Set desired image dimension parameters
|
||||
3. Set batch size
|
||||
4. Connect to nodes requiring latent space input
|
||||
|
||||
Use Cases:
|
||||
- Creating empty latent spaces
|
||||
- SDXL workflow initialization
|
||||
- Batch image generation
|
||||
- Custom latent space processing
|
||||
|
||||
|
||||
### ✨Image Latent Creator Plus
|
||||
An enhanced version of the latent creator that inherits all functionality from Image Size Creator Plus and supports batch latent space creation.
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
### ✂️Remove Empty Lines And Leading Spaces
|
||||
A text processing node that cleans up text by removing empty lines and leading/trailing spaces.
|
||||
|
||||

|
||||
|
||||
Features:
|
||||
- Removes empty lines from text
|
||||
- Removes leading and trailing spaces
|
||||
- Option to keep single empty line between paragraphs
|
||||
- Option to preserve indentation
|
||||
- Supports batch text processing
|
||||
|
||||
Usage Example:
|
||||
```
|
||||
Input text:
|
||||
Hello World
|
||||
|
||||
This is a test
|
||||
|
||||
|
||||
Multiple empty lines above
|
||||
|
||||
Output text (with default settings):
|
||||
Hello World
|
||||
This is a test
|
||||
Multiple empty lines above
|
||||
```
|
||||
|
||||
Parameters:
|
||||
- `output type`: Output type (text, list)
|
||||
- `remove empty line option`: Remove empty lines
|
||||
- `remove loading space option`: Remove spaces
|
||||
|
||||
Use Cases:
|
||||
- Cleaning up prompt text
|
||||
- Formatting text for LoRA training
|
||||
- Preparing text for text-to-image generation
|
||||
- Standardizing text input format
|
||||
|
||||
Remove extra empty lines and spaces to generate text:
|
||||

|
||||
|
||||
Remove empty lines while keeping spaces to generate text:
|
||||

|
||||
|
||||
Remove spaces while keeping empty lines to generate text:
|
||||

|
||||
|
||||
Remove empty lines and spaces to generate list:
|
||||

|
||||
|
||||
|
||||
### 🔗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:
|
||||
- Supports regular expressions
|
||||
- Supports escape characters (e.g., \n, \r)
|
||||
- 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 separator: `,`
|
||||
- Output: text1, text2, text3
|
||||
|
||||
2. Line Break Separator:
|
||||
- Using newline: `\n`
|
||||
- Output:
|
||||
```
|
||||
text1
|
||||
text2
|
||||
text3
|
||||
```
|
||||
|
||||
3. Mixed Separator:
|
||||
- Using comma or newline: `,|\n`
|
||||
- Supports both separator types
|
||||
|
||||
4. Empty Separator:
|
||||
- Leave empty
|
||||
- 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
|
||||
|
||||
### 📝 Text Display Enhancer (Show Text Plus)
|
||||
An enhanced text display node that provides more text formatting and display options.
|
||||
|
||||

|
||||
|
||||
Features:
|
||||
- Display Mode Options:
|
||||
- Normal Mode: Displays text directly
|
||||
- Text Statistics Functionality:
|
||||
- Character Count
|
||||
- Word Count
|
||||
- Line Count
|
||||
- Supports automatic line wrapping for long texts
|
||||
- Supports multilingual text
|
||||
|
||||
Usage Instructions:
|
||||
1. Add the node to your workflow
|
||||
2. Connect the text input
|
||||
3. Select the display mode
|
||||
|
||||
### 📝 Multiline Text Input (Multiline Text)
|
||||
A node that supports multiline text input, making it easy to input and edit long text content.
|
||||
|
||||

|
||||
|
||||
Features:
|
||||
- Supports multiline text input and editing
|
||||
- Retains text formatting and line breaks
|
||||
- Compatible with both Chinese and English input
|
||||
- User-friendly text editing interface
|
||||
- Supports copy and paste operations
|
||||
|
||||
Usage Instructions:
|
||||
1. Add the node to your workflow
|
||||
2. Double-click the text box to edit
|
||||
3. Supports direct pasting of multiline text
|
||||
4. Click outside the area to save after editing
|
||||
|
||||
Usage Scenarios:
|
||||
- Inputting long prompt phrases
|
||||
- Editing multiline descriptive texts
|
||||
- Batch text processing
|
||||
- Preparing texts for LoRA training
|
||||
|
||||
### 🎭Mask Preview
|
||||
A utility node for previewing and inspecting image masks.
|
||||
|
||||

|
||||
|
||||
Features:
|
||||
- Intuitive mask area visualization
|
||||
- Multiple preview modes:
|
||||
- Original mask
|
||||
- Outline highlight
|
||||
- Support for batch mask preview
|
||||
- Real-time preview updates
|
||||
|
||||
Usage:
|
||||
1. Add the node to your workflow
|
||||
2. Connect mask input
|
||||
3. Select preview mode
|
||||
4. Adjust display parameters
|
||||
|
||||
|
||||
## 📦 Installation
|
||||
|
||||
1. Navigate to ComfyUI's `custom_nodes` directory
|
||||
2. Clone the repository:
|
||||
```bash
|
||||
cd custom_nodes
|
||||
git clone https://github.com/jammyfu/ComfyUI_PaintingCoderUtils.git
|
||||
```
|
||||
3. Restart ComfyUI
|
||||
|
||||
|
||||
## 📝 License
|
||||
|
||||
MIT License
|
||||
|
||||
## 🤝 Updates
|
||||
### v0.3.5 Update (2025-01-25)
|
||||
- **New Features:**
|
||||
- Added Image Size Creator Plus node, supporting SDXL and Midjourney dimensions
|
||||
- Added Image Latent Creator Plus node, inheriting all Plus node functionalities
|
||||
- Optimized Plus node user interface and interaction experience
|
||||
- Added more resolution preset options
|
||||
- Improved node performance and stability
|
||||
|
||||
### v0.3.4 Update (2025-01-24)
|
||||
- **Updates:**
|
||||
- Modified the ComfyUI workflow fixer tool page to enhance user experience
|
||||
- Added more error messages to help users locate issues faster
|
||||
- Optimized file upload and download functionality to support more file processing
|
||||
- Improved path separator conversion functionality to enhance cross-platform compatibility
|
||||
- Enhanced interface response speed to reduce loading time
|
||||
|
||||
### v0.3.3 (2025-01-23)
|
||||
- **Improvements:**
|
||||
- Bug fixes, added workflow fixer tool to repair old version workflow JSON files
|
||||
- Added path separator conversion functionality to switch between Windows and Unix formats
|
||||
- Added file upload functionality to upload JSON files for repair
|
||||
- Added file download functionality to download repaired JSON files or ZIP files
|
||||
|
||||
### v0.3.2 (2025-01-22)
|
||||
- **Improvements:**
|
||||
- Enhanced the workflow fixer tool with more error handling and informative messages
|
||||
- Optimized the user interface for more intuitive operation
|
||||
- Added support for more node types
|
||||
- Improved the stability of the path separator conversion functionality
|
||||
- Fixed issues where JSON files could not be loaded correctly in certain cases
|
||||
|
||||
### v0.3.1 (2025-01-22)
|
||||
- **Bug Fixes:**
|
||||
- Fixed crash issue in Text Combiner when handling special characters
|
||||
- Fixed issue with Dynamic Image Input node not handling inputs correctly in certain cases
|
||||
- Fixed display error in Mask Previewer during batch preview
|
||||
- Fixed compatibility issues with path separator conversion functionality on some systems
|
||||
- Fixed processing errors in Image Resolution Adjuster at specific resolutions
|
||||
|
||||
### v0.3.0 (2025-01-21)
|
||||
- **Breaking Changes:**
|
||||
- Modified namespace structure for better compatibility
|
||||
- Added workflow fixer tool for migration
|
||||
- Added path separator conversion functionality
|
||||
- Enhanced error handling and user feedback
|
||||
- Improved cross-platform compatibility
|
||||
|
||||
### v0.2.2 (2024-01-09)
|
||||
- Added Mask Switch node
|
||||
- Support switching between two masks based on conditions
|
||||
- Provides default blank mask handling
|
||||
- Optimized exception handling mechanism
|
||||
- Maintains mask format and quality
|
||||
|
||||
### v0.2.1 (2024-01-07)
|
||||
- Added Web Image Loader node
|
||||
- Support loading images from URLs and Base64
|
||||
- Automatic image format handling
|
||||
- Support batch image loading
|
||||
- Error handling: returns placeholder image for invalid URLs, graceful exception handling
|
||||
- Cache support for improved loading efficiency
|
||||
- Preview feature: generates and saves preview images
|
||||
|
||||
### v0.2.0 (2024-01-06)
|
||||
- Added Image Switch node
|
||||
- Support switching between two images based on conditions
|
||||
- Provides default blank image handling
|
||||
- Optimized exception handling mechanism
|
||||
- Maintains image format and quality
|
||||
|
||||
- Added Text Switch node
|
||||
- Support switching between two texts based on conditions
|
||||
- Provides default blank text handling
|
||||
- Optimized exception handling mechanism
|
||||
|
||||
### v0.1.9 (2024-01-05)
|
||||
- Enhanced Image Resolution Adjuster
|
||||
- Added mask feathering functionality
|
||||
- Improved mask edge processing algorithm
|
||||
- Enhanced mask processing performance
|
||||
- Optimized edge smoothing effects
|
||||
|
||||
### v0.1.8 (2024-01-04)
|
||||
- Optimized Text Combiner
|
||||
- Improved text concatenation logic
|
||||
- Enhanced performance for large text processing
|
||||
- Fixed special character handling issues
|
||||
- Optimized memory usage
|
||||
|
||||
### v0.1.7 (2024-01-03)
|
||||
- Enhanced Image Resolution Adjuster
|
||||
- Improved extend mode algorithms
|
||||
- Enhanced image processing performance
|
||||
- Fixed edge handling issues
|
||||
- Optimized memory usage
|
||||
|
||||
### v0.1.6 (2024-01-02)
|
||||
- Added Multiline Text Input node
|
||||
- Support for multiline text input and editing
|
||||
- Preserves text formatting and line breaks
|
||||
- Compatible with both Chinese and English input
|
||||
- User-friendly text editing interface
|
||||
- Supports copy and paste operations
|
||||
|
||||
### v0.1.5 (2024-12-28)
|
||||
- Added Mask Preview node
|
||||
- Added real-time preview update
|
||||
- Added batch mask preview
|
||||
|
||||
### v0.1.4 (2024-12-27)
|
||||
- Added Show Text Plus node
|
||||
- Added multiple display modes
|
||||
- Implemented text statistics functionality
|
||||
- Added support for custom display options
|
||||
- Optimized long text display
|
||||
|
||||
### 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
|
||||
- Implemented dynamic input connections
|
||||
- Added support for regex separators
|
||||
- Added support for newlines and escape characters
|
||||
- Added empty separator handling
|
||||
- Optimized text joining logic
|
||||
|
||||
### v0.1.0 (2024-12-23)
|
||||
- Initial release
|
||||
- Added Image Resolution Adjuster:
|
||||
- Support for SDXL optimal resolutions
|
||||
- Multiple extend modes
|
||||
- Color picker for background
|
||||
- Scale factor adjustment
|
||||
- Resolution limits
|
||||
- Added Remove Empty Lines And Leading Spaces:
|
||||
- Text cleaning functionality
|
||||
- Configurable preservation options
|
||||
- Batch processing support
|
||||
|
||||
|
||||
### Planned Features
|
||||
- Dynamic image input combination
|
||||
- Text template system
|
||||
- More image processing utilities
|
||||
|
||||
## 🤝 Contributions
|
||||
|
||||
Issues and Pull Requests are welcome!
|
||||
|
||||
## 🙏 Acknowledgements
|
||||
|
||||
- ComfyUI Team
|
||||
- Impact-Pack Project
|
||||
@@ -0,0 +1,53 @@
|
||||
# ComfyUI Painting Coder Utilities
|
||||
|
||||

|
||||
|
||||
用於影像尺寸、文字清理、遮罩處理與工作流程修復的 ComfyUI 節點套件。先依任務選擇入口,再查看原有節點說明。
|
||||
|
||||
[English](README.md) | [简体中文](README_CN.md) | [繁體中文(臺灣)](README.zh-TW.md) | [日本語](README.ja.md) | [한국어](README.ko.md)
|
||||
|
||||
## 依任務選擇
|
||||
|
||||
| 任務 | 現有入口 |
|
||||
| --- | --- |
|
||||
| 調整影像解析度 | `ImageResolutionAdjuster` |
|
||||
| 建立影像與 latent 尺寸 | `ImageSizeCreator`、`ImageLatentCreator` 與 Plus 版本 |
|
||||
| 合併或預覽影像、遮罩 | `DynamicImageCombiner`、`DynamicMaskCombiner`、`MaskPreview` |
|
||||
| 清理、串接或顯示文字 | `RemoveEmptyLinesAndLeadingSpaces`、`TextCombiner`、`ShowTextPlus` |
|
||||
| 切換工作流程資料 | 影像、文字、遮罩與 latent 切換節點 |
|
||||
| 載入網址影像或編碼 | `WebImageLoader`、`ImageToBase64` |
|
||||
|
||||

|
||||
|
||||
既有專案的工作流程截圖,並非 AI 生成的產品示意圖。
|
||||
|
||||
## 安裝至 ComfyUI 環境
|
||||
|
||||
請使用實際執行 ComfyUI 的 Python,避免另外安裝不相容的 Torch。requirements.txt 列有 NumPy、Pillow、Torch 與 Gradio,請先檢查環境相容性再安裝相依套件。完成複製後重新啟動 ComfyUI。
|
||||
|
||||
```sh
|
||||
cd ComfyUI/custom_nodes
|
||||
git clone https://github.com/jammyfu/ComfyUI_PaintingCoderUtils.git
|
||||
# Run with the Python interpreter used by ComfyUI:
|
||||
python -m pip install -r ComfyUI_PaintingCoderUtils/requirements.txt
|
||||
```
|
||||
|
||||
## 移轉舊工作流程與第一個範例
|
||||
|
||||
v0.3.0 調整了命名空間,舊工作流程可能無法使用。請先備份 JSON,再以本機瀏覽器修復工具更新節點名稱與路徑分隔符號,最後在 ComfyUI 重新開啟。附帶的 Flux 工作流程可能需要其他節點與模型檔案,本儲存庫不包含這些模型。
|
||||
|
||||
- [Workflow fixer](docs/fix/workflow_fixer.html)
|
||||
- [Flux workflow JSON](workflow/Flux_Image_Resolution_Adjuster_scale_up_batch_workflow.json)
|
||||
|
||||
## 範圍與使用條件
|
||||
|
||||
__init__.py 註冊了 20 個節點類別。五語導覽不代表節點介面支援五語;完整歷史參數說明仍保留於中英參考文件。這次文件更新不表示所有 ComfyUI/PyTorch 組合皆已驗證。
|
||||
|
||||
程式碼可用於商業用途、修改與散布,須保留著作權與授權聲明。模型、輸入素材及第三方圖片須另外確認權利。
|
||||
(MIT) · [LICENSE](LICENSE)
|
||||
|
||||
## 詳細參考
|
||||
|
||||
- [English node reference](README.reference.md) · [中文节点参考](README_CN.reference.md)
|
||||
- [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md)
|
||||
- [Issues](https://github.com/jammyfu/ComfyUI_PaintingCoderUtils/issues)
|
||||
+34
-577
@@ -1,596 +1,53 @@
|
||||

|
||||
# ComfyUI画画的程序员工具集节点
|
||||
# ComfyUI Painting Coder Utilities
|
||||
|
||||
一个为 ComfyUI 设计的实用节点集合,旨在简化图像和文本处理工作流程。功能包括优化的分辨率调整、文本清理工具、动态图像/文本组合和蒙版预览工具。这个集合由一位喜欢绘画的程序员创建,非常适合希望提升 AI 艺术创作流程的艺术家和开发者。
|
||||

|
||||
|
||||
[English](./README.md) | [简体中文](./README_CN.md)
|
||||
用于图像尺寸、文本清理、遮罩处理和工作流修复的 ComfyUI 节点包。先按任务选入口,再查看原有节点详细说明。
|
||||
|
||||
[English](README.md) | [简体中文](README_CN.md) | [繁體中文(臺灣)](README.zh-TW.md) | [日本語](README.ja.md) | [한국어](README.ko.md)
|
||||
|
||||
# ⚠️ 重要更新说明
|
||||
## 按任务选择
|
||||
|
||||
**版本0.3.0重大更新:**
|
||||
- 修改了命名空间以提升兼容性
|
||||
- 此更新会导致旧的工作流无法使用
|
||||
- 请使用我们的工作流修复工具来修复现有工作流:
|
||||
| 任务 | 已有入口 |
|
||||
| --- | --- |
|
||||
| 调整图像分辨率 | `ImageResolutionAdjuster` |
|
||||
| 创建图像与 latent 尺寸 | `ImageSizeCreator`、`ImageLatentCreator` 及 Plus 版本 |
|
||||
| 组合或预览图像、遮罩 | `DynamicImageCombiner`、`DynamicMaskCombiner`、`MaskPreview` |
|
||||
| 清理、拼接或显示文本 | `RemoveEmptyLinesAndLeadingSpaces`、`TextCombiner`、`ShowTextPlus` |
|
||||
| 切换工作流数据 | 图像、文本、遮罩及 latent 切换节点 |
|
||||
| 读取网址图片或编码 | `WebImageLoader`、`ImageToBase64` |
|
||||
|
||||

|
||||

|
||||
|
||||
打开 [工作流修复工具](https://jammyfu.github.io/ComfyUI_PaintingCoderUtils/fix/workflow_fixer.html?lang=zh) 或者到目录 **ComfyUI_PaintingCoderUtils/docs/fix/** 寻找 **workflow_fixer.html** 并打开页面
|
||||
已有项目工作流截图,不是 AI 生成的产品效果图。
|
||||
|
||||
## 安装到 ComfyUI 环境
|
||||
|
||||
- 新增功能:支持Windows与Unix(Linux/Mac)格式之间的路径分隔符转换
|
||||
- 修复工具现在同时支持命名空间更新和路径格式转换
|
||||
使用实际运行 ComfyUI 的 Python,避免另装不兼容的 Torch。requirements.txt 声明了 NumPy、Pillow、Torch 和 Gradio,请先检查环境兼容性再安装依赖。克隆后重启 ComfyUI。
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
||||
## 🎯 功能节点
|
||||
|
||||
### 📐图像分辨率调整器 (Image Resolution Adjuster)
|
||||
一个用于按照 SDXL 最佳宽高比调整图像分辨率的实用节点。
|
||||
|
||||

|
||||
|
||||
图像分辨率调整,可自由设置填充背景颜色
|
||||

|
||||
|
||||
图像按比例批量重绘
|
||||

|
||||
|
||||
### Flux图像按比例批量重绘工作流下载
|
||||
<a href="https://raw.githubusercontent.com/jammyfu/ComfyUI_PaintingCoderUtils/refs/heads/main/workflow/Flux_Image_Resolution_Adjuster_scale_up_batch_workflow.json" download="Flux_Image_Resolution_Adjuster_batch_workflow.json">⬇️ 下载工作流JSON(右键另存为)</a>
|
||||
|
||||
特点:
|
||||
- 支持所有 SDXL 最佳分辨率:
|
||||
- 1:1 (1024x1024)
|
||||
- 9:7 (1152x896)
|
||||
- 7:9 (896x1152)
|
||||
- 3:2 (1216x832)
|
||||
- 2:3 (832x1216)
|
||||
- 7:4 (1344x768)
|
||||
- 4:7 (768x1344)
|
||||
- 12:5 (1536x640)
|
||||
- 5:12 (640x1536)
|
||||
- 多种延展模式:
|
||||
- contain: 保持比例缩放至目标尺寸内
|
||||
- cover: 保持比例缩放以覆盖目标尺寸
|
||||
- fill: 拉伸以填充目标尺寸
|
||||
- inside: 类似 contain,但只缩小不放大
|
||||
- outside: 类似 cover,但只放大不缩小
|
||||
- top/bottom/left/right/center: 在目标尺寸内定位图像
|
||||
- 可调节的缩放系数
|
||||
- 可配置的最大和最小分辨率限制
|
||||
- 背景颜色选择器
|
||||
- 调整时保持宽高比
|
||||
### 图像描边功能 (Image Outline)
|
||||
在图像分辨率调整器中新增了描边功能:
|
||||
- 一键添加 1 像素宽的描边
|
||||
- 描边颜色自动设置为背景色的反色
|
||||
- 适用于所有延展模式
|
||||
- 保持图像质量不变
|
||||
- 自动调整输出尺寸(每边增加 1 像素)
|
||||
|
||||
使用方法:
|
||||
1. 将节点添加到工作流
|
||||
2. 从 SDXL 预设中选择目标分辨率
|
||||
3. 根据需要选择延展模式
|
||||
4. 使用颜色选择器设置背景颜色
|
||||
5. 根据需要调整缩放系数和分辨率限制
|
||||
6. 在图像分辨率调整器中找到 `add_outline` 选项
|
||||
7. 设置为 `True` 启用描边
|
||||
8. 描边颜色会自动根据 `background_color` 设置的背景色计算反色
|
||||
9. 输出图像尺寸会自动调整(宽高各增加 2 像素)
|
||||
|
||||
### 🌐Web图像加载器 (Web Image Loader)
|
||||
一个用于从网络加载图像的节点。
|
||||
|
||||

|
||||

|
||||
|
||||
特点:
|
||||
- 支持从URL加载图像,支持Base64格式
|
||||
- 自动处理图像格式
|
||||
- 支持批量图像加载
|
||||
- 错误处理:
|
||||
- 无效URL时返回占位图像
|
||||
- 优雅处理异常,自动剔除错误图像
|
||||
|
||||
使用方法:
|
||||
1. 将节点添加到工作流
|
||||
2. 输入图像URL
|
||||
3. 节点将自动加载并处理图像
|
||||
4. 输出图像可连接到需要图像输入的其他节点
|
||||
|
||||
使用场景:
|
||||
- 从网络资源加载图像
|
||||
- 动态图像处理工作流
|
||||
- 批量图像下载和处理
|
||||
|
||||
### 🖼️图像转Base64编码器 (Image to Base64 Encoder)
|
||||
一个用于将图像转换为Base64编码的节点。
|
||||
|
||||

|
||||
|
||||
特点:
|
||||
- 支持多种图像格式(JPEG, PNG, BMP等)
|
||||
- 自动处理图像大小和格式
|
||||
- 支持批量图像编码
|
||||
- 错误处理:
|
||||
- 无效图像时返回错误信息
|
||||
- 优雅处理异常,确保工作流不中断
|
||||
|
||||
使用方法:
|
||||
1. 将节点添加到工作流
|
||||
2. 输入图像文件或图像路径
|
||||
3. 节点将自动将图像转换为Base64编码
|
||||
4. 输出Base64编码字符串可连接到需要Base64输入的其他节点
|
||||
|
||||
使用场景:
|
||||
- 图像数据传输
|
||||
- 图像嵌入HTML或JSON
|
||||
- 动态图像处理工作流
|
||||
- 批量图像编码和处理
|
||||
|
||||
### 🔀 Switch节点(Image Switch,Text Switch)
|
||||
Switch节点用于在工作流中动态切换不同的输入或输出路径。
|
||||
|
||||

|
||||
|
||||
特点:
|
||||
- 支持多种输入和输出类型
|
||||
- 可配置的切换条件
|
||||
- 自动处理输入输出连接
|
||||
|
||||
使用方法:
|
||||
1. 将Switch节点添加到工作流
|
||||
2. 配置切换条件(如布尔值、数值范围等)
|
||||
3. 连接不同的输入和输出路径
|
||||
4. 根据条件自动切换路径
|
||||
|
||||
使用场景:
|
||||
- 动态调整工作流
|
||||
- 条件分支处理
|
||||
- 多路径选择
|
||||
|
||||
|
||||
### 🖼️图像尺寸创建器 (Image Size Creator)
|
||||
一个用于创建图像尺寸的节点。
|
||||
|
||||

|
||||
|
||||
特点:
|
||||
- 支持所有SDXL最优分辨率:
|
||||
- 1:1 (1024x1024)
|
||||
- 9:7 (1152x896)
|
||||
- 7:9 (896x1152)
|
||||
- 3:2 (1216x832)
|
||||
- 2:3 (832x1216)
|
||||
- 7:4 (1344x768)
|
||||
- 4:7 (768x1344)
|
||||
- 12:5 (1536x640)
|
||||
- 5:12 (640x1536)
|
||||
- 可调节的缩放因子
|
||||
- 支持横向、纵向和方形模式
|
||||
- 自动计算最佳分辨率
|
||||
|
||||
使用方法:
|
||||
1. 将节点添加到工作流
|
||||
2. 选择图像模式(横向/纵向/方形)
|
||||
3. 选择目标分辨率
|
||||
4. 调整缩放因子(可选)
|
||||
|
||||
使用场景:
|
||||
- 创建特定尺寸的图像
|
||||
- SDXL图像生成优化
|
||||
- 批量图像处理工作流
|
||||
|
||||
### ✨图像尺寸创建器Plus (Image Size Creator Plus)
|
||||
|
||||

|
||||
|
||||
增强版图像尺寸创建器,支持SDXL和Midjourney的标准分辨率。主要特点:
|
||||
- 支持SDXL和Midjourney两种风格切换
|
||||
- 包含所有SDXL标准分辨率
|
||||
- 包含所有Midjourney标准分辨率
|
||||
- 横向、纵向、方形三种模式
|
||||
- 可调节的缩放系数
|
||||
|
||||
|
||||
### 🖼️图像潜空间创建器 (Image Latent Creator)
|
||||
一个用于创建空的图像潜空间的节点。
|
||||
|
||||

|
||||
|
||||
特点:
|
||||
- 继承图像尺寸创建器的所有功能
|
||||
- 支持批量大小设置
|
||||
- 自动创建优化的潜空间尺寸
|
||||
- 支持额外的PNG信息
|
||||
|
||||
使用方法:
|
||||
1. 将节点添加到工作流
|
||||
2. 设置所需的图像尺寸参数
|
||||
3. 设置批量大小
|
||||
4. 连接到需要潜空间输入的节点
|
||||
|
||||
使用场景:
|
||||
- 创建空白潜空间
|
||||
- SDXL工作流初始化
|
||||
- 批量图像生成
|
||||
- 自定义潜空间处理
|
||||
|
||||
### ✨图像潜空间创建器Plus (Image Latent Creator Plus)
|
||||
增强版潜空间创建器,继承了图像尺寸创建器Plus的所有功能,并支持批量创建潜空间。
|
||||
|
||||

|
||||
|
||||
|
||||
### ✂️空行和前导空格清理器 (Remove Empty Lines And Leading Spaces)
|
||||
一个用于清理文本中的空行和前导/尾随空格的文本处理节点。
|
||||
|
||||

|
||||
|
||||
特点:
|
||||
- 移除文本中的空行
|
||||
- 移除行首和行尾的空格
|
||||
- 可选择保留段落之间的单个空行
|
||||
- 可选择保留缩进
|
||||
- 支持批量文本处理
|
||||
|
||||
使用示例:
|
||||
```
|
||||
输入文本:
|
||||
你好世界
|
||||
|
||||
这是一个测试
|
||||
|
||||
|
||||
上面有多个空行
|
||||
|
||||
输出文本(使用默认设置):
|
||||
你好世界
|
||||
这是一个测试
|
||||
上面有多个空行
|
||||
```sh
|
||||
cd ComfyUI/custom_nodes
|
||||
git clone https://github.com/jammyfu/ComfyUI_PaintingCoderUtils.git
|
||||
# Run with the Python interpreter used by ComfyUI:
|
||||
python -m pip install -r ComfyUI_PaintingCoderUtils/requirements.txt
|
||||
```
|
||||
|
||||
参数说明:
|
||||
- `output type`:输出类型(文本、列表)
|
||||
- `remove empty line option`:移除空行
|
||||
- `remove loading space option`:移除空格
|
||||
## 迁移旧工作流与第一个示例
|
||||
|
||||
使用场景:
|
||||
- 清理提示词文本
|
||||
- 格式化 LoRA 训练文本
|
||||
- 准备文生图的输入文本
|
||||
- 标准化文本输入格式
|
||||
v0.3.0 调整了命名空间,旧工作流可能失效。先备份 JSON,再用本地浏览器修复工具更新节点名称和路径分隔符,最后在 ComfyUI 中重新打开。附带的 Flux 工作流可能依赖其他节点和模型文件,本仓库不包含这些模型。
|
||||
|
||||
清除多余的空行及空格生成文本:
|
||||

|
||||
- [Workflow fixer](docs/fix/workflow_fixer.html)
|
||||
- [Flux workflow JSON](workflow/Flux_Image_Resolution_Adjuster_scale_up_batch_workflow.json)
|
||||
|
||||
清除空行保留空格生成文本:
|
||||

|
||||
## 范围与使用条件
|
||||
|
||||
清除空格保留空号生成文本:
|
||||

|
||||
__init__.py 注册了 20 个节点类。五语导读不表示节点界面支持五语;完整历史参数说明仍在中英参考文档。这次文档更新不等于已验证所有 ComfyUI/PyTorch 组合。
|
||||
|
||||
清除空行、空格生成列表:
|
||||

|
||||
代码可商用、修改及分发,须保留版权和许可声明。模型、输入素材及第三方图片需另查权利。
|
||||
(MIT) · [LICENSE](LICENSE)
|
||||
|
||||
## 详细参考
|
||||
|
||||
|
||||
### 🔗文本组合器(TextCombiner)✨
|
||||
新增文本组合器节点,可以将多个文本输入组合成一个文本输出。
|
||||

|
||||
|
||||
功能特点:
|
||||
- 支持动态输入:连接输入时自动增加新的输入点
|
||||
- 灵活的分隔符:
|
||||
- 支持正则表达式
|
||||
- 支持转义字符(如 \n, \r)
|
||||
- 留空则使用空格连接
|
||||
- 智能换行:当分隔符包含换行符时,自动按行分割输出
|
||||
- 自动过滤:移除空行,保留纯空格内容
|
||||
|
||||
使用示例:
|
||||
1. 基本用法:
|
||||
- 使用逗号分隔:`,`
|
||||
- 输出:text1, text2, text3
|
||||
|
||||
2. 换行分隔:
|
||||
- 使用换行符:`\n`
|
||||
- 输出:
|
||||
```
|
||||
text1
|
||||
text2
|
||||
text3
|
||||
```
|
||||
|
||||
3. 混合分隔:
|
||||
- 使用逗号或换行:`,|\n`
|
||||
- 支持两种分隔方式
|
||||
|
||||
4. 空分隔符:
|
||||
- 留空
|
||||
- 直接用空格连接文本
|
||||
|
||||
|
||||
### 🖼️动态图像输入组合器 (Dynamic Image Input)
|
||||
一个用于动态组合多个图像输入的节点。
|
||||

|
||||
|
||||
特点:
|
||||
- 动态输入端口:连接时自动增加新的图像输入点
|
||||
- 智能图像处理:
|
||||
- 自动过滤空输入
|
||||
- 保持图像格式和质量
|
||||
- 支持批量图像处理
|
||||
- 错误处理:
|
||||
- 当没有有效输入时返回空白图像
|
||||
- 优雅处理异常情况
|
||||
- 输出格式:返回图像列表,便于后续处理
|
||||
|
||||
使用方法:
|
||||
1. 将节点添加到工作流
|
||||
2. 连接图像输入(会自动创建新的输入端口)
|
||||
3. 节点将自动组合所有非空图像输入
|
||||
4. 输出可以连接到需要图像列表的其他节点
|
||||
|
||||
使用场景:
|
||||
- 批量图像处理
|
||||
- 图像集合管理
|
||||
- 动态工作流构建
|
||||
- 图像列表生成
|
||||
|
||||
|
||||
|
||||
### 📝文本显示增强器 (Show Text Plus)
|
||||
一个增强型的文本显示节点,提供更多文本格式化和显示选项。
|
||||
|
||||

|
||||
|
||||
特点:
|
||||
- 关闭显示模式:
|
||||
- 普通模式:直接显示文本
|
||||
- 文本统计功能:
|
||||
- 字符数统计
|
||||
- 单词数统计
|
||||
- 行数统计
|
||||
- 支持长文本自动换行
|
||||
- 支持多语言文本
|
||||
|
||||
使用方法:
|
||||
1. 将节点添加到工作流
|
||||
2. 连接文本输入
|
||||
3. 选择显示模式
|
||||
|
||||
### 📝多行文本输入器 (Multiline Text)
|
||||
一个支持多行文本输入的节点,方便输入和编辑长文本内容。
|
||||
|
||||

|
||||
|
||||
特点:
|
||||
- 支持多行文本输入和编辑
|
||||
- 保留文本格式和换行
|
||||
- 兼容中英文输入
|
||||
- 方便的文本编辑界面
|
||||
- 支持复制粘贴操作
|
||||
|
||||
使用方法:
|
||||
1. 将节点添加到工作流
|
||||
2. 双击文本框进行编辑
|
||||
3. 支持直接粘贴多行文本
|
||||
4. 编辑完成后点击其他区域保存
|
||||
|
||||
使用场景:
|
||||
- 输入长篇提示词
|
||||
- 编辑多行描述文本
|
||||
- 批量文本处理
|
||||
- LoRA 训练文本准备
|
||||
|
||||
|
||||
|
||||
### 🎭蒙版预览器 (Mask Preview)
|
||||
一个用于预览和检查图像蒙版的实用节点。
|
||||
|
||||

|
||||
|
||||
特点:
|
||||
- 直观显示蒙版区域
|
||||
- 支持多种预览模式:
|
||||
- 原始蒙版
|
||||
- 轮廓高亮
|
||||
- 支持批量蒙版预览
|
||||
- 实时更新预览效果
|
||||
|
||||
使用方法:
|
||||
1. 将节点添加到工作流
|
||||
2. 连接蒙版输入
|
||||
3. 选择预览模式
|
||||
4. 调整显示参数
|
||||
|
||||
## 📦 安装方法
|
||||
|
||||
1. 进入 ComfyUI 的 `custom_nodes` 目录
|
||||
2. 克隆仓库:
|
||||
```bash
|
||||
cd custom_nodes
|
||||
git clone https://github.com/jammyfu/ComfyUI_PaintingCoderUtils.git
|
||||
```
|
||||
3. 重启 ComfyUI
|
||||
|
||||
|
||||
## 📝 许可证
|
||||
|
||||
MIT License
|
||||
|
||||
## 🤝 更新说明
|
||||
### 页面更新说明
|
||||
### v0.3.5 更新 (2025-01-25)
|
||||
- **新增:**
|
||||
- 新增了 Image Size Creator Plus 节点,支持 SDXL 和 Midjourney 尺寸
|
||||
- 新增了 Image Latent Creator Plus 节点,继承 Plus 节点的所有功能
|
||||
- 优化了 Plus 节点的用户界面和交互体验
|
||||
- 增加了更多的分辨率预设选项
|
||||
- 提升了节点的性能和稳定性
|
||||
|
||||
|
||||
### v0.3.4 更新 (2025-01-24)
|
||||
- **更新:**
|
||||
- 修改了ComfyUI工作流修复工具页面,提升了用户体验
|
||||
- 增加了更多的错误提示信息,帮助用户更快定位问题
|
||||
- 优化了文件上传和下载功能,支持更多文件的处理
|
||||
- 改进了路径分隔符转换功能,提升了跨平台兼容性
|
||||
- 增强了界面响应速度,减少了加载时间
|
||||
|
||||
|
||||
### v0.3.3 (2025-01-23)
|
||||
- **新增:**
|
||||
- Bug修复,新增了工作流修复工具,可以修复旧版本的工作流JSON文件
|
||||
- 新增了路径分隔符转换功能,可以在Windows和Unix格式之间转换路径分隔符
|
||||
- 新增了文件上传功能,可以上传JSON文件进行修复
|
||||
- 新增了文件下载功能,可以下载修复后的JSON文件或ZIP文件
|
||||
|
||||
### v0.3.2 (2025-01-22)
|
||||
- **改进:**
|
||||
- 完善了工作流修复工具,增加了更多的错误处理和提示信息
|
||||
- 优化了用户界面,使操作更加直观
|
||||
- 增加了对更多节点类型的支持
|
||||
- 提升了路径分隔符转换功能的稳定性
|
||||
- 修复了在某些情况下无法正确加载 JSON 文件的问题
|
||||
|
||||
### v0.3.1 (2025-01-22)
|
||||
- **Bug修复:**
|
||||
- 修复了文本组合器在处理特殊字符时的崩溃问题
|
||||
- 修复了动态图像输入节点在某些情况下未正确处理输入的问题
|
||||
- 修复了蒙版预览器在批量预览时的显示错误
|
||||
- 修复了路径分隔符转换功能在某些系统上的兼容性问题
|
||||
- 修复了图像分辨率调整器在特定分辨率下的处理错误
|
||||
|
||||
|
||||
### v0.3.0 (2025-01-21)
|
||||
- **重大变更:**
|
||||
- 修改了命名空间结构以提高兼容性
|
||||
- 添加了工作流修复工具以便迁移
|
||||
- 增加了路径分隔符转换功能
|
||||
- 增强了错误处理和用户反馈
|
||||
- 改善了跨平台兼容性
|
||||
|
||||
### v0.2.2 (2024-01-09)
|
||||
- 新增 Mask Switch 节点
|
||||
- 支持根据条件在两个蒙版之间切换
|
||||
- 提供默认空白蒙版处理
|
||||
- 优化异常处理机制
|
||||
- 保持蒙版格式和质量
|
||||
|
||||
### v0.2.1 (2024-01-07)
|
||||
- 新增 Web图像加载器 节点
|
||||
- 支持从 URL 和 Base64 加载图像
|
||||
- 自动处理图像格式
|
||||
- 支持批量图像加载
|
||||
- 错误处理:无效 URL 时返回占位图像,优雅处理异常
|
||||
- 支持缓存功能,提升加载效率
|
||||
- 预览功能:生成预览图像并保存
|
||||
|
||||
### v0.2.0 (2024-01-06)
|
||||
- 新增图像切换器节点
|
||||
- 支持根据条件在两个图像之间切换
|
||||
- 提供默认空白图像处理
|
||||
- 优化异常处理机制
|
||||
- 保持图像格式和质量
|
||||
|
||||
- 新增文本切换器节点
|
||||
- 支持根据条件在两个文本之间切换
|
||||
- 提供默认空白文本处理
|
||||
- 优化异常处理机制
|
||||
- 保持文本格式和内容
|
||||
|
||||
### v0.1.9 (2024-01-05)
|
||||
- 优化图像分辨率调整器
|
||||
- 新增蒙版羽化(feather)功能
|
||||
- 改进蒙版边缘处理算法
|
||||
- 提升蒙版处理性能
|
||||
- 优化边缘平滑效果
|
||||
|
||||
### v0.1.8 (2024-01-04)
|
||||
- 优化文本组合器
|
||||
- 改进文本拼接逻辑
|
||||
- 提升处理大量文本的性能
|
||||
- 修复特殊字符处理问题
|
||||
- 优化内存占用
|
||||
|
||||
### v0.1.7 (2024-01-03)
|
||||
- 优化图像分辨率调整器
|
||||
- 改进延展模式算法
|
||||
- 提升图像处理性能
|
||||
- 修复边缘处理问题
|
||||
- 优化内存使用
|
||||
|
||||
### v0.1.6 (2024-01-02)
|
||||
- 新增多行文本输入器节点
|
||||
- 支持多行文本输入和编辑
|
||||
- 保留文本格式和换行
|
||||
- 兼容中英文输入
|
||||
- 方便的文本编辑界面
|
||||
- 支持复制粘贴操作
|
||||
|
||||
|
||||
### v0.1.5 (2024-12-28)
|
||||
- 新增 Mask Preview 蒙版预览器节点
|
||||
- 实现实时预览功能
|
||||
- 支持批量蒙版处理
|
||||
|
||||
|
||||
### v0.1.4 (2024-12-27)
|
||||
- 新增 Show Text Plus 节点
|
||||
- 添加多种显示模式
|
||||
- 优化长文本显示效果
|
||||
|
||||
|
||||
### v0.1.3 (2024-12-26)
|
||||
- 新增动态图像输入组合器
|
||||
- 实现动态输入端口
|
||||
- 添加智能图像处理
|
||||
- 优化错误处理机制
|
||||
- 支持图像列表输出
|
||||
|
||||
|
||||
### v0.1.2 (2024-12-25)
|
||||
- 新增图像描边功能
|
||||
- 新增文本组合器节点
|
||||
|
||||
|
||||
### v0.1.1 (2024-12-25)
|
||||
- 新增 TextCombiner 节点
|
||||
- 实现动态输入连接点
|
||||
- 支持正则表达式分隔符
|
||||
- 支持换行符和转义字符
|
||||
- 添加空分隔符处理
|
||||
- 优化文本拼接逻辑
|
||||
|
||||
### v0.1.0 (2024-12-23)
|
||||
- 首次发布
|
||||
- 添加图像分辨率调整器:
|
||||
- 支持 SDXL 最佳分辨率
|
||||
- 多种延展模式
|
||||
- 背景颜色选择器
|
||||
- 缩放系数调整
|
||||
- 分辨率限制
|
||||
- 添加空行和前导空格清理器:
|
||||
- 文本清理功能
|
||||
- 可配置的保留选项
|
||||
- 批量处理支持
|
||||
|
||||
### 计划功能
|
||||
- 动态图像输入组合
|
||||
- 文本模板系统
|
||||
- 更多图像处理工具
|
||||
|
||||
## 🤝 贡献
|
||||
|
||||
欢迎提交 Issue 和 Pull Request!
|
||||
|
||||
## 🙏 致谢
|
||||
|
||||
- ComfyUI 团队
|
||||
- Impact-Pack 项目
|
||||
- [English node reference](README.reference.md) · [中文节点参考](README_CN.reference.md)
|
||||
- [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md)
|
||||
- [Issues](https://github.com/jammyfu/ComfyUI_PaintingCoderUtils/issues)
|
||||
|
||||
@@ -0,0 +1,596 @@
|
||||

|
||||
# ComfyUI画画的程序员工具集节点
|
||||
|
||||
一个为 ComfyUI 设计的实用节点集合,旨在简化图像和文本处理工作流程。功能包括优化的分辨率调整、文本清理工具、动态图像/文本组合和蒙版预览工具。这个集合由一位喜欢绘画的程序员创建,非常适合希望提升 AI 艺术创作流程的艺术家和开发者。
|
||||
|
||||
[English](./README.md) | [简体中文](./README_CN.md)
|
||||
|
||||
|
||||
# ⚠️ 重要更新说明
|
||||
|
||||
**版本0.3.0重大更新:**
|
||||
- 修改了命名空间以提升兼容性
|
||||
- 此更新会导致旧的工作流无法使用
|
||||
- 请使用我们的工作流修复工具来修复现有工作流:
|
||||
|
||||

|
||||
|
||||
打开 [工作流修复工具](https://jammyfu.github.io/ComfyUI_PaintingCoderUtils/fix/workflow_fixer.html?lang=zh) 或者到目录 **ComfyUI_PaintingCoderUtils/docs/fix/** 寻找 **workflow_fixer.html** 并打开页面
|
||||
|
||||
|
||||
- 新增功能:支持Windows与Unix(Linux/Mac)格式之间的路径分隔符转换
|
||||
- 修复工具现在同时支持命名空间更新和路径格式转换
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
||||
## 🎯 功能节点
|
||||
|
||||
### 📐图像分辨率调整器 (Image Resolution Adjuster)
|
||||
一个用于按照 SDXL 最佳宽高比调整图像分辨率的实用节点。
|
||||
|
||||

|
||||
|
||||
图像分辨率调整,可自由设置填充背景颜色
|
||||

|
||||
|
||||
图像按比例批量重绘
|
||||

|
||||
|
||||
### Flux图像按比例批量重绘工作流下载
|
||||
<a href="https://raw.githubusercontent.com/jammyfu/ComfyUI_PaintingCoderUtils/refs/heads/main/workflow/Flux_Image_Resolution_Adjuster_scale_up_batch_workflow.json" download="Flux_Image_Resolution_Adjuster_batch_workflow.json">⬇️ 下载工作流JSON(右键另存为)</a>
|
||||
|
||||
特点:
|
||||
- 支持所有 SDXL 最佳分辨率:
|
||||
- 1:1 (1024x1024)
|
||||
- 9:7 (1152x896)
|
||||
- 7:9 (896x1152)
|
||||
- 3:2 (1216x832)
|
||||
- 2:3 (832x1216)
|
||||
- 7:4 (1344x768)
|
||||
- 4:7 (768x1344)
|
||||
- 12:5 (1536x640)
|
||||
- 5:12 (640x1536)
|
||||
- 多种延展模式:
|
||||
- contain: 保持比例缩放至目标尺寸内
|
||||
- cover: 保持比例缩放以覆盖目标尺寸
|
||||
- fill: 拉伸以填充目标尺寸
|
||||
- inside: 类似 contain,但只缩小不放大
|
||||
- outside: 类似 cover,但只放大不缩小
|
||||
- top/bottom/left/right/center: 在目标尺寸内定位图像
|
||||
- 可调节的缩放系数
|
||||
- 可配置的最大和最小分辨率限制
|
||||
- 背景颜色选择器
|
||||
- 调整时保持宽高比
|
||||
### 图像描边功能 (Image Outline)
|
||||
在图像分辨率调整器中新增了描边功能:
|
||||
- 一键添加 1 像素宽的描边
|
||||
- 描边颜色自动设置为背景色的反色
|
||||
- 适用于所有延展模式
|
||||
- 保持图像质量不变
|
||||
- 自动调整输出尺寸(每边增加 1 像素)
|
||||
|
||||
使用方法:
|
||||
1. 将节点添加到工作流
|
||||
2. 从 SDXL 预设中选择目标分辨率
|
||||
3. 根据需要选择延展模式
|
||||
4. 使用颜色选择器设置背景颜色
|
||||
5. 根据需要调整缩放系数和分辨率限制
|
||||
6. 在图像分辨率调整器中找到 `add_outline` 选项
|
||||
7. 设置为 `True` 启用描边
|
||||
8. 描边颜色会自动根据 `background_color` 设置的背景色计算反色
|
||||
9. 输出图像尺寸会自动调整(宽高各增加 2 像素)
|
||||
|
||||
### 🌐Web图像加载器 (Web Image Loader)
|
||||
一个用于从网络加载图像的节点。
|
||||
|
||||

|
||||

|
||||
|
||||
特点:
|
||||
- 支持从URL加载图像,支持Base64格式
|
||||
- 自动处理图像格式
|
||||
- 支持批量图像加载
|
||||
- 错误处理:
|
||||
- 无效URL时返回占位图像
|
||||
- 优雅处理异常,自动剔除错误图像
|
||||
|
||||
使用方法:
|
||||
1. 将节点添加到工作流
|
||||
2. 输入图像URL
|
||||
3. 节点将自动加载并处理图像
|
||||
4. 输出图像可连接到需要图像输入的其他节点
|
||||
|
||||
使用场景:
|
||||
- 从网络资源加载图像
|
||||
- 动态图像处理工作流
|
||||
- 批量图像下载和处理
|
||||
|
||||
### 🖼️图像转Base64编码器 (Image to Base64 Encoder)
|
||||
一个用于将图像转换为Base64编码的节点。
|
||||
|
||||

|
||||
|
||||
特点:
|
||||
- 支持多种图像格式(JPEG, PNG, BMP等)
|
||||
- 自动处理图像大小和格式
|
||||
- 支持批量图像编码
|
||||
- 错误处理:
|
||||
- 无效图像时返回错误信息
|
||||
- 优雅处理异常,确保工作流不中断
|
||||
|
||||
使用方法:
|
||||
1. 将节点添加到工作流
|
||||
2. 输入图像文件或图像路径
|
||||
3. 节点将自动将图像转换为Base64编码
|
||||
4. 输出Base64编码字符串可连接到需要Base64输入的其他节点
|
||||
|
||||
使用场景:
|
||||
- 图像数据传输
|
||||
- 图像嵌入HTML或JSON
|
||||
- 动态图像处理工作流
|
||||
- 批量图像编码和处理
|
||||
|
||||
### 🔀 Switch节点(Image Switch,Text Switch)
|
||||
Switch节点用于在工作流中动态切换不同的输入或输出路径。
|
||||
|
||||

|
||||
|
||||
特点:
|
||||
- 支持多种输入和输出类型
|
||||
- 可配置的切换条件
|
||||
- 自动处理输入输出连接
|
||||
|
||||
使用方法:
|
||||
1. 将Switch节点添加到工作流
|
||||
2. 配置切换条件(如布尔值、数值范围等)
|
||||
3. 连接不同的输入和输出路径
|
||||
4. 根据条件自动切换路径
|
||||
|
||||
使用场景:
|
||||
- 动态调整工作流
|
||||
- 条件分支处理
|
||||
- 多路径选择
|
||||
|
||||
|
||||
### 🖼️图像尺寸创建器 (Image Size Creator)
|
||||
一个用于创建图像尺寸的节点。
|
||||
|
||||

|
||||
|
||||
特点:
|
||||
- 支持所有SDXL最优分辨率:
|
||||
- 1:1 (1024x1024)
|
||||
- 9:7 (1152x896)
|
||||
- 7:9 (896x1152)
|
||||
- 3:2 (1216x832)
|
||||
- 2:3 (832x1216)
|
||||
- 7:4 (1344x768)
|
||||
- 4:7 (768x1344)
|
||||
- 12:5 (1536x640)
|
||||
- 5:12 (640x1536)
|
||||
- 可调节的缩放因子
|
||||
- 支持横向、纵向和方形模式
|
||||
- 自动计算最佳分辨率
|
||||
|
||||
使用方法:
|
||||
1. 将节点添加到工作流
|
||||
2. 选择图像模式(横向/纵向/方形)
|
||||
3. 选择目标分辨率
|
||||
4. 调整缩放因子(可选)
|
||||
|
||||
使用场景:
|
||||
- 创建特定尺寸的图像
|
||||
- SDXL图像生成优化
|
||||
- 批量图像处理工作流
|
||||
|
||||
### ✨图像尺寸创建器Plus (Image Size Creator Plus)
|
||||
|
||||

|
||||
|
||||
增强版图像尺寸创建器,支持SDXL和Midjourney的标准分辨率。主要特点:
|
||||
- 支持SDXL和Midjourney两种风格切换
|
||||
- 包含所有SDXL标准分辨率
|
||||
- 包含所有Midjourney标准分辨率
|
||||
- 横向、纵向、方形三种模式
|
||||
- 可调节的缩放系数
|
||||
|
||||
|
||||
### 🖼️图像潜空间创建器 (Image Latent Creator)
|
||||
一个用于创建空的图像潜空间的节点。
|
||||
|
||||

|
||||
|
||||
特点:
|
||||
- 继承图像尺寸创建器的所有功能
|
||||
- 支持批量大小设置
|
||||
- 自动创建优化的潜空间尺寸
|
||||
- 支持额外的PNG信息
|
||||
|
||||
使用方法:
|
||||
1. 将节点添加到工作流
|
||||
2. 设置所需的图像尺寸参数
|
||||
3. 设置批量大小
|
||||
4. 连接到需要潜空间输入的节点
|
||||
|
||||
使用场景:
|
||||
- 创建空白潜空间
|
||||
- SDXL工作流初始化
|
||||
- 批量图像生成
|
||||
- 自定义潜空间处理
|
||||
|
||||
### ✨图像潜空间创建器Plus (Image Latent Creator Plus)
|
||||
增强版潜空间创建器,继承了图像尺寸创建器Plus的所有功能,并支持批量创建潜空间。
|
||||
|
||||

|
||||
|
||||
|
||||
### ✂️空行和前导空格清理器 (Remove Empty Lines And Leading Spaces)
|
||||
一个用于清理文本中的空行和前导/尾随空格的文本处理节点。
|
||||
|
||||

|
||||
|
||||
特点:
|
||||
- 移除文本中的空行
|
||||
- 移除行首和行尾的空格
|
||||
- 可选择保留段落之间的单个空行
|
||||
- 可选择保留缩进
|
||||
- 支持批量文本处理
|
||||
|
||||
使用示例:
|
||||
```
|
||||
输入文本:
|
||||
你好世界
|
||||
|
||||
这是一个测试
|
||||
|
||||
|
||||
上面有多个空行
|
||||
|
||||
输出文本(使用默认设置):
|
||||
你好世界
|
||||
这是一个测试
|
||||
上面有多个空行
|
||||
```
|
||||
|
||||
参数说明:
|
||||
- `output type`:输出类型(文本、列表)
|
||||
- `remove empty line option`:移除空行
|
||||
- `remove loading space option`:移除空格
|
||||
|
||||
使用场景:
|
||||
- 清理提示词文本
|
||||
- 格式化 LoRA 训练文本
|
||||
- 准备文生图的输入文本
|
||||
- 标准化文本输入格式
|
||||
|
||||
清除多余的空行及空格生成文本:
|
||||

|
||||
|
||||
清除空行保留空格生成文本:
|
||||

|
||||
|
||||
清除空格保留空号生成文本:
|
||||

|
||||
|
||||
清除空行、空格生成列表:
|
||||

|
||||
|
||||
|
||||
|
||||
### 🔗文本组合器(TextCombiner)✨
|
||||
新增文本组合器节点,可以将多个文本输入组合成一个文本输出。
|
||||

|
||||
|
||||
功能特点:
|
||||
- 支持动态输入:连接输入时自动增加新的输入点
|
||||
- 灵活的分隔符:
|
||||
- 支持正则表达式
|
||||
- 支持转义字符(如 \n, \r)
|
||||
- 留空则使用空格连接
|
||||
- 智能换行:当分隔符包含换行符时,自动按行分割输出
|
||||
- 自动过滤:移除空行,保留纯空格内容
|
||||
|
||||
使用示例:
|
||||
1. 基本用法:
|
||||
- 使用逗号分隔:`,`
|
||||
- 输出:text1, text2, text3
|
||||
|
||||
2. 换行分隔:
|
||||
- 使用换行符:`\n`
|
||||
- 输出:
|
||||
```
|
||||
text1
|
||||
text2
|
||||
text3
|
||||
```
|
||||
|
||||
3. 混合分隔:
|
||||
- 使用逗号或换行:`,|\n`
|
||||
- 支持两种分隔方式
|
||||
|
||||
4. 空分隔符:
|
||||
- 留空
|
||||
- 直接用空格连接文本
|
||||
|
||||
|
||||
### 🖼️动态图像输入组合器 (Dynamic Image Input)
|
||||
一个用于动态组合多个图像输入的节点。
|
||||

|
||||
|
||||
特点:
|
||||
- 动态输入端口:连接时自动增加新的图像输入点
|
||||
- 智能图像处理:
|
||||
- 自动过滤空输入
|
||||
- 保持图像格式和质量
|
||||
- 支持批量图像处理
|
||||
- 错误处理:
|
||||
- 当没有有效输入时返回空白图像
|
||||
- 优雅处理异常情况
|
||||
- 输出格式:返回图像列表,便于后续处理
|
||||
|
||||
使用方法:
|
||||
1. 将节点添加到工作流
|
||||
2. 连接图像输入(会自动创建新的输入端口)
|
||||
3. 节点将自动组合所有非空图像输入
|
||||
4. 输出可以连接到需要图像列表的其他节点
|
||||
|
||||
使用场景:
|
||||
- 批量图像处理
|
||||
- 图像集合管理
|
||||
- 动态工作流构建
|
||||
- 图像列表生成
|
||||
|
||||
|
||||
|
||||
### 📝文本显示增强器 (Show Text Plus)
|
||||
一个增强型的文本显示节点,提供更多文本格式化和显示选项。
|
||||
|
||||

|
||||
|
||||
特点:
|
||||
- 关闭显示模式:
|
||||
- 普通模式:直接显示文本
|
||||
- 文本统计功能:
|
||||
- 字符数统计
|
||||
- 单词数统计
|
||||
- 行数统计
|
||||
- 支持长文本自动换行
|
||||
- 支持多语言文本
|
||||
|
||||
使用方法:
|
||||
1. 将节点添加到工作流
|
||||
2. 连接文本输入
|
||||
3. 选择显示模式
|
||||
|
||||
### 📝多行文本输入器 (Multiline Text)
|
||||
一个支持多行文本输入的节点,方便输入和编辑长文本内容。
|
||||
|
||||

|
||||
|
||||
特点:
|
||||
- 支持多行文本输入和编辑
|
||||
- 保留文本格式和换行
|
||||
- 兼容中英文输入
|
||||
- 方便的文本编辑界面
|
||||
- 支持复制粘贴操作
|
||||
|
||||
使用方法:
|
||||
1. 将节点添加到工作流
|
||||
2. 双击文本框进行编辑
|
||||
3. 支持直接粘贴多行文本
|
||||
4. 编辑完成后点击其他区域保存
|
||||
|
||||
使用场景:
|
||||
- 输入长篇提示词
|
||||
- 编辑多行描述文本
|
||||
- 批量文本处理
|
||||
- LoRA 训练文本准备
|
||||
|
||||
|
||||
|
||||
### 🎭蒙版预览器 (Mask Preview)
|
||||
一个用于预览和检查图像蒙版的实用节点。
|
||||
|
||||

|
||||
|
||||
特点:
|
||||
- 直观显示蒙版区域
|
||||
- 支持多种预览模式:
|
||||
- 原始蒙版
|
||||
- 轮廓高亮
|
||||
- 支持批量蒙版预览
|
||||
- 实时更新预览效果
|
||||
|
||||
使用方法:
|
||||
1. 将节点添加到工作流
|
||||
2. 连接蒙版输入
|
||||
3. 选择预览模式
|
||||
4. 调整显示参数
|
||||
|
||||
## 📦 安装方法
|
||||
|
||||
1. 进入 ComfyUI 的 `custom_nodes` 目录
|
||||
2. 克隆仓库:
|
||||
```bash
|
||||
cd custom_nodes
|
||||
git clone https://github.com/jammyfu/ComfyUI_PaintingCoderUtils.git
|
||||
```
|
||||
3. 重启 ComfyUI
|
||||
|
||||
|
||||
## 📝 许可证
|
||||
|
||||
MIT License
|
||||
|
||||
## 🤝 更新说明
|
||||
### 页面更新说明
|
||||
### v0.3.5 更新 (2025-01-25)
|
||||
- **新增:**
|
||||
- 新增了 Image Size Creator Plus 节点,支持 SDXL 和 Midjourney 尺寸
|
||||
- 新增了 Image Latent Creator Plus 节点,继承 Plus 节点的所有功能
|
||||
- 优化了 Plus 节点的用户界面和交互体验
|
||||
- 增加了更多的分辨率预设选项
|
||||
- 提升了节点的性能和稳定性
|
||||
|
||||
|
||||
### v0.3.4 更新 (2025-01-24)
|
||||
- **更新:**
|
||||
- 修改了ComfyUI工作流修复工具页面,提升了用户体验
|
||||
- 增加了更多的错误提示信息,帮助用户更快定位问题
|
||||
- 优化了文件上传和下载功能,支持更多文件的处理
|
||||
- 改进了路径分隔符转换功能,提升了跨平台兼容性
|
||||
- 增强了界面响应速度,减少了加载时间
|
||||
|
||||
|
||||
### v0.3.3 (2025-01-23)
|
||||
- **新增:**
|
||||
- Bug修复,新增了工作流修复工具,可以修复旧版本的工作流JSON文件
|
||||
- 新增了路径分隔符转换功能,可以在Windows和Unix格式之间转换路径分隔符
|
||||
- 新增了文件上传功能,可以上传JSON文件进行修复
|
||||
- 新增了文件下载功能,可以下载修复后的JSON文件或ZIP文件
|
||||
|
||||
### v0.3.2 (2025-01-22)
|
||||
- **改进:**
|
||||
- 完善了工作流修复工具,增加了更多的错误处理和提示信息
|
||||
- 优化了用户界面,使操作更加直观
|
||||
- 增加了对更多节点类型的支持
|
||||
- 提升了路径分隔符转换功能的稳定性
|
||||
- 修复了在某些情况下无法正确加载 JSON 文件的问题
|
||||
|
||||
### v0.3.1 (2025-01-22)
|
||||
- **Bug修复:**
|
||||
- 修复了文本组合器在处理特殊字符时的崩溃问题
|
||||
- 修复了动态图像输入节点在某些情况下未正确处理输入的问题
|
||||
- 修复了蒙版预览器在批量预览时的显示错误
|
||||
- 修复了路径分隔符转换功能在某些系统上的兼容性问题
|
||||
- 修复了图像分辨率调整器在特定分辨率下的处理错误
|
||||
|
||||
|
||||
### v0.3.0 (2025-01-21)
|
||||
- **重大变更:**
|
||||
- 修改了命名空间结构以提高兼容性
|
||||
- 添加了工作流修复工具以便迁移
|
||||
- 增加了路径分隔符转换功能
|
||||
- 增强了错误处理和用户反馈
|
||||
- 改善了跨平台兼容性
|
||||
|
||||
### v0.2.2 (2024-01-09)
|
||||
- 新增 Mask Switch 节点
|
||||
- 支持根据条件在两个蒙版之间切换
|
||||
- 提供默认空白蒙版处理
|
||||
- 优化异常处理机制
|
||||
- 保持蒙版格式和质量
|
||||
|
||||
### v0.2.1 (2024-01-07)
|
||||
- 新增 Web图像加载器 节点
|
||||
- 支持从 URL 和 Base64 加载图像
|
||||
- 自动处理图像格式
|
||||
- 支持批量图像加载
|
||||
- 错误处理:无效 URL 时返回占位图像,优雅处理异常
|
||||
- 支持缓存功能,提升加载效率
|
||||
- 预览功能:生成预览图像并保存
|
||||
|
||||
### v0.2.0 (2024-01-06)
|
||||
- 新增图像切换器节点
|
||||
- 支持根据条件在两个图像之间切换
|
||||
- 提供默认空白图像处理
|
||||
- 优化异常处理机制
|
||||
- 保持图像格式和质量
|
||||
|
||||
- 新增文本切换器节点
|
||||
- 支持根据条件在两个文本之间切换
|
||||
- 提供默认空白文本处理
|
||||
- 优化异常处理机制
|
||||
- 保持文本格式和内容
|
||||
|
||||
### v0.1.9 (2024-01-05)
|
||||
- 优化图像分辨率调整器
|
||||
- 新增蒙版羽化(feather)功能
|
||||
- 改进蒙版边缘处理算法
|
||||
- 提升蒙版处理性能
|
||||
- 优化边缘平滑效果
|
||||
|
||||
### v0.1.8 (2024-01-04)
|
||||
- 优化文本组合器
|
||||
- 改进文本拼接逻辑
|
||||
- 提升处理大量文本的性能
|
||||
- 修复特殊字符处理问题
|
||||
- 优化内存占用
|
||||
|
||||
### v0.1.7 (2024-01-03)
|
||||
- 优化图像分辨率调整器
|
||||
- 改进延展模式算法
|
||||
- 提升图像处理性能
|
||||
- 修复边缘处理问题
|
||||
- 优化内存使用
|
||||
|
||||
### v0.1.6 (2024-01-02)
|
||||
- 新增多行文本输入器节点
|
||||
- 支持多行文本输入和编辑
|
||||
- 保留文本格式和换行
|
||||
- 兼容中英文输入
|
||||
- 方便的文本编辑界面
|
||||
- 支持复制粘贴操作
|
||||
|
||||
|
||||
### v0.1.5 (2024-12-28)
|
||||
- 新增 Mask Preview 蒙版预览器节点
|
||||
- 实现实时预览功能
|
||||
- 支持批量蒙版处理
|
||||
|
||||
|
||||
### v0.1.4 (2024-12-27)
|
||||
- 新增 Show Text Plus 节点
|
||||
- 添加多种显示模式
|
||||
- 优化长文本显示效果
|
||||
|
||||
|
||||
### v0.1.3 (2024-12-26)
|
||||
- 新增动态图像输入组合器
|
||||
- 实现动态输入端口
|
||||
- 添加智能图像处理
|
||||
- 优化错误处理机制
|
||||
- 支持图像列表输出
|
||||
|
||||
|
||||
### v0.1.2 (2024-12-25)
|
||||
- 新增图像描边功能
|
||||
- 新增文本组合器节点
|
||||
|
||||
|
||||
### v0.1.1 (2024-12-25)
|
||||
- 新增 TextCombiner 节点
|
||||
- 实现动态输入连接点
|
||||
- 支持正则表达式分隔符
|
||||
- 支持换行符和转义字符
|
||||
- 添加空分隔符处理
|
||||
- 优化文本拼接逻辑
|
||||
|
||||
### v0.1.0 (2024-12-23)
|
||||
- 首次发布
|
||||
- 添加图像分辨率调整器:
|
||||
- 支持 SDXL 最佳分辨率
|
||||
- 多种延展模式
|
||||
- 背景颜色选择器
|
||||
- 缩放系数调整
|
||||
- 分辨率限制
|
||||
- 添加空行和前导空格清理器:
|
||||
- 文本清理功能
|
||||
- 可配置的保留选项
|
||||
- 批量处理支持
|
||||
|
||||
### 计划功能
|
||||
- 动态图像输入组合
|
||||
- 文本模板系统
|
||||
- 更多图像处理工具
|
||||
|
||||
## 🤝 贡献
|
||||
|
||||
欢迎提交 Issue 和 Pull Request!
|
||||
|
||||
## 🙏 致谢
|
||||
|
||||
- ComfyUI 团队
|
||||
- Impact-Pack 项目
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"reviewed_at": "2026-11-12",
|
||||
"languages": [
|
||||
"en",
|
||||
"zh-CN",
|
||||
"zh-TW",
|
||||
"ja",
|
||||
"ko"
|
||||
],
|
||||
"scope": "localized entry guide; historical detailed references retain original languages",
|
||||
"reviewer": "AI fact and terminology review, not native human review",
|
||||
"rendered_github": "not_checked",
|
||||
"runtime_integration": "not_checked",
|
||||
"ordering": {
|
||||
"priority_basis": "editorial_priority",
|
||||
"heat_status": "unknown",
|
||||
"reason": "task selection before installation and details",
|
||||
"source": "repository source files",
|
||||
"metric": null,
|
||||
"value": null,
|
||||
"window": null,
|
||||
"group_order": "same tasks across languages",
|
||||
"tie_break": "stable task order"
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,11 @@
|
||||
# ComfyUI Painting Coder Utils
|
||||
# ComfyUI_PaintingCoderUtils
|
||||
|
||||
> A collection of ComfyUI custom nodes for image and text workflows: resolution adjustment (SDXL / Midjourney presets), image size & latent creators, web image loader, image-to-base64, image/text switches, text cleaning and combining, dynamic image input, mask preview, plus a browser-based workflow fixer for v0.3.0 namespace changes. MIT license.
|
||||
> ComfyUI nodes for image sizing, text cleanup, masks and workflow repair. Choose a task below, then open the original node reference.
|
||||
|
||||
- Repository: https://github.com/jammyfu/ComfyUI_PaintingCoderUtils
|
||||
- Docs site: https://jammyfu.github.io/ComfyUI_PaintingCoderUtils/
|
||||
- Workflow fixer: https://jammyfu.github.io/ComfyUI_PaintingCoderUtils/fix/workflow_fixer.html
|
||||
- Chinese README: https://github.com/jammyfu/ComfyUI_PaintingCoderUtils/blob/main/README_CN.md
|
||||
- [English](https://github.com/jammyfu/ComfyUI_PaintingCoderUtils/blob/main/README.md)
|
||||
- [简体中文](https://github.com/jammyfu/ComfyUI_PaintingCoderUtils/blob/main/README_CN.md)
|
||||
- [繁體中文(臺灣)](https://github.com/jammyfu/ComfyUI_PaintingCoderUtils/blob/main/README.zh-TW.md)
|
||||
- [日本語](https://github.com/jammyfu/ComfyUI_PaintingCoderUtils/blob/main/README.ja.md)
|
||||
- [한국어](https://github.com/jammyfu/ComfyUI_PaintingCoderUtils/blob/main/README.ko.md)
|
||||
|
||||
## Install
|
||||
Clone into `ComfyUI/custom_nodes` and restart ComfyUI. Also published to the Comfy Registry (publisher `jammyfu`).
|
||||
|
||||
## FAQ
|
||||
- Old workflows broke after v0.3.0? Use the workflow fixer page to update node namespaces and path separators.
|
||||
20 registered ComfyUI nodes. Code is MIT; model and input-media rights are separate. See __init__.py and LICENSE.
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python3
|
||||
from pathlib import Path
|
||||
import re
|
||||
ROOT=Path(__file__).resolve().parents[1]
|
||||
FILES=['README.md', 'README_CN.md', 'README.zh-TW.md', 'README.ja.md', 'README.ko.md']
|
||||
for name in FILES:
|
||||
body=(ROOT/name).read_text()
|
||||
visible=re.sub(r"```.*?```", "", body, flags=re.S)
|
||||
assert len(re.findall(r"^# ",visible,re.M))==1, name
|
||||
assert len(body)>1500, name
|
||||
for other in FILES:
|
||||
assert f"({other})" in body, (name,other)
|
||||
for dest in re.findall(r"\]\(([^)]+)\)",body):
|
||||
if "://" in dest or dest.startswith("#"): continue
|
||||
assert (ROOT/dest.split("#")[0]).exists(), (name,dest)
|
||||
assert "[License: MIT]" not in body
|
||||
print(f"{len(FILES)} localized guides: structure, language routes and relative links passed")
|
||||
Reference in New Issue
Block a user