SwarmUI icon indicating copy to clipboard operation
SwarmUI copied to clipboard

Not adding "Text Match" in Auto-Segment And Refine generates broken syntax

Open jtreminio opened this issue 1 month ago • 1 comments

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:

Image

Will want to add validation:

  1. prevent clicking "add" button unless required fields are populated, or
  2. do not add to prompt unless required fields are populated, or
  3. 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

jtreminio avatar Nov 07 '25 23:11 jtreminio

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)

mcmonkey4eva avatar Nov 09 '25 15:11 mcmonkey4eva