Add bidirectional autoscaling index switch

This commit is contained in:
2026-06-25 08:33:35 +02:00
parent a60258dc4c
commit 55477bd826
3 changed files with 294 additions and 0 deletions
+10
View File
@@ -127,6 +127,12 @@ COMMON_INPUT_TOOLTIPS = {
"save_path": "Folder to save the accumulator batch. Relative paths are inside ComfyUI output; absolute paths are used directly.",
"filename_prefix": "Filename prefix for saved accumulator images.",
"clear_after_save": "Clear the accumulator store after a successful batch save.",
"mode": "Switch direction: pick_input selects one input to value, route_output sends route_value to one output.",
"index": "Index used by SxCP Index Switch. For Loop Start outputs one_based indexes by default.",
"index_base": "one_based means index 1 selects input_1. zero_based means index 0 selects input_1.",
"missing_behavior": "What to do when the requested switch input is not connected: use fallback, output none, clamp, or wrap.",
"fallback": "Optional value used by SxCP Index Switch when the requested input is missing and missing_behavior is fallback.",
"route_value": "Value routed to output_N when mode is route_output.",
"clothing": "Built-in clothing density for legacy direct generation. Category/profile nodes can override this.",
"poses": "Built-in pose pool for legacy direct generation.",
"backside_bias": "Legacy bias toward rear/backside poses where that category supports it.",
@@ -281,6 +287,10 @@ def _tooltip_for_input(node_name: str, input_name: str) -> str:
return f"Include {value} in this random pool."
if input_name.startswith("initial_value"):
return "Carry value passed into the loop body and returned on the matching output."
if re.match(r"^input_\d+$", input_name):
return "Autoscaling switch input. Connect the last visible input to reveal the next one."
if re.match(r"^output_\d+$", input_name):
return "Autoscaling routed output. Connect the last visible output to reveal the next one."
if input_name.startswith("override_"):
return "Optional loaded-profile override. Leave empty or keep_profile to preserve the profile value."
return ""