SwarmUI
SwarmUI copied to clipboard
Not adding "Text Match" in Auto-Segment And Refine generates broken syntax
Expected Behavior
If you leave "Text Match" empty in the Segment popup what's inserted is:
<segment:,0.6,0.5>
I didn't catch this at first, and when I tried to view the ComfyUI workflow it generated a broken thing:
Will want to add validation:
- prevent clicking "add" button unless required fields are populated, or
- do not add to prompt unless required fields are populated, or
- have a default value in the "Text Match" text field
Additionally, add something to the UI that flags a field as required (Bootstrap has something, or can just use * character)
Actual Behavior
When "Text Match" is left blank, ComfyUI generates a broken workflow.
Steps to Reproduce
Click "Auto Segment Refinement", then click "add" button. See broken prompt:
<segment:,0.6,0.5>
Debug Logs
None necessary
Other
No response
I think this needs two fixes:
- Disable the 'Add' button when there's not valid inputs
- Handle the bad segment input properly serverside (probably just let it emit the empty matching node)