Comfy-Org / Comfy-Org/ComfyUI

[BUG] String input doing weird things with {}

Open
#679 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 10h
Merged PRs (30d)
153

Description

given the input string "{apple|pizza}"
```
return {
"required": {
"text": ("STRING", {"default": "",})
}
}
```
will return: "{apple|pizza}"
```
return {
"required": {
"text": ("STRING", {"default": "", "multiline": True,})
}
}
```
will return "apple" or "pizza"

What I would expect to happen is for both to return "{apple|pizza}" with a potential optional bool argument "parse_dynamic_prompt" (or something) for when we want to do the parsing that "multiline" = True is currently doing. I wouldn't actually have any problems with multiline text input parsing this if it did it the same as dynamic prompts, but it doesn't. Given the input "{1-2$$apple|pizza}" multiline returns "1-2$$apple" or "pizza". If someone would point me to the relevant lines I would be willing to fix it and create a pull request.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.