20 lines
904 B
Markdown
20 lines
904 B
Markdown
# ComfyUI Escape Brackets Node
|
|
|
|
A simple custom node for [ComfyUI](https://github.com/comfyanonymous/ComfyUI) that escapes parentheses in strings.
|
|
|
|
## Functionality
|
|
This node takes a string as input, replaces all occurrences of `(` with `\(` and `)` with `\)`, and outputs the modified string. This is particularly useful when you need to pass text containing brackets to specific prompts or processes that interpret brackets as syntax (e.g., prompt weighting) and you want them to be treated as literal characters.
|
|
|
|
## Installation
|
|
1. Navigate to your ComfyUI `custom_nodes` directory.
|
|
2. Clone this repository into it:
|
|
```bash
|
|
git clone <your_github_repo_url>
|
|
```
|
|
3. Restart ComfyUI.
|
|
|
|
## Usage
|
|
- You can find the node under the **text** category, named **Escape Brackets Node**.
|
|
- Connect a string to the `text` input.
|
|
- Connect the `STRING` output to whatever node requires the escaped text.
|