Commit Graph
12 Commits
Author SHA1 Message Date
ausboss b5bce60c22 Workflow Switches: + Choice, and a guide for AI agents
Two named settings used to take about 20 clicks through a menu and
Settings. + Choice saves how a node is set under a name, and the second
one turns the card into a pill. What a choice changes is what it holds
differently from the other choices, so it needs no off side. A choice can
also hold the nodes only it needs, so a missing model in the branch nobody
picked no longer stops the run.

js/docs/agents/workflow_switches.md tells an AI agent how to write a card
into a workflow file. It sits under js/docs because that ships with the
pack. A test holds its examples to what the card really stores.
2026-10-31 21:01:07 -05:00
ausboss 39da7a3931 Workflow Switches: One at a time holds for new switches and the setting
A new switch read on beside the rows already on, and turning the setting
on left every row on. A new switch now gives way to the rows that were
there, and turning the setting on keeps one row on.

Fixes #256
2026-10-31 08:49:11 -05:00
ausboss e4b9a08cec Release 2.20.4: Workflow Switches explain "empty"
The paste fix in 2.20.3 works when the paste happens, so a workflow pasted
and saved on an older version keeps its old numbers and still reads
"empty" after an update. The word's hover text now says what happened and
what to do: open the original file again, or add nodes from the switch's
menu. The help page says the same.
2026-10-30 13:17:56 -05:00
ausboss d0658ea8b2 Workflow Switches and Callout: follow the copies after a paste
Copy and paste give every pasted node and group a new id, and so do
duplicate, Alt + drag and dragging a saved workflow onto the canvas. A
Workflow Switches card remembers its parts by id, so a whole workflow
pasted into a new tab read "empty" on every row and nothing could be
switched on; pasted into another workflow it could switch unrelated nodes
that had the old numbers. A Callout's links to a node or group broke the
same way.

The frontend's paste (LGraphCanvas._deserializeItems) returns which new
node each old id became. js/shared/paste_ids.mjs hands that on after every
paste, and a pasted card or note points at the copies of what it names.
An id the paste did not copy is kept, so a card pasted on its own still
switches the original parts.
2026-10-29 11:05:44 -05:00
ausboss 812a22c070 LoRA Loader: groups get their own switch; Workflow Switches can own a group
Turning a group off stops its LoRAs and keeps each row's own on/off for when
the group comes back on. A switch saved with a group on and off now moves only
the group, shows one lock on the group's header, and leaves the rows inside to
the person. Renaming the group keeps the switch; clicking the lock takes the
group back.
2026-10-24 15:18:36 -05:00
ausboss a10064393b Workflow Switches: a switch keeps the strength you give a LoRA row
A switch that turns LoRA Loader rows on and off compared and wrote each
row's strength as well as whether it is on. A row turned down to 0.6 by
hand read "changed" (a pill went amber, "only partly on"), and the next
click set its model strength back to the saved one and left its CLIP
strength behind.

A LoRA row pair now carries whether the row is on, and a strength (model
or CLIP) only where the switch's saved on and off differ. pairNow compares
only what the pair carries and pairValue writes only that, so the strength
and triggers someone set stay, and the card reads on or off. A switch
saved with one strength for on and another for off still sets it, now
with the CLIP strength too. How switches are saved does not change.
2026-10-18 19:45:09 -05:00
ausboss 067f5e21c8 LoRA Loader: rows on a subgraph box, and a lock on rows a switch sets
A LoRA Loader inside a subgraph gets a first gear item, Rows on the box.
Show brings its rows up the frontend's own way (a subgraph input linked to
the loras input), and the box then shows the loader's row card on its face,
bound to the box's copy of the rows, which is what runs. Each copy of the
box keeps its own rows. On the box the card keeps the rows, the master pill
and Re-check; templates and the gear stay inside. The card also appears
when loras is brought up from the frontend's Edit subgraph widgets list.

Inside, the loader says where its rows are set and shows and edits the
copy of the box it was entered through (or the only box); with several
boxes and no known way in it is read only. Take back removes the subgraph
input and keeps the rows of that box.

Workflow Switches needs no change to set rows on a box: the box's copy is
an ordinary widget value. A row that a switch sets shows a lock in place
of its grip, naming the switch on hover; a click on the lock removes that
row from the switch's saved sides (releaseStackRow), and the row still
drags. Pure helpers live in js/shared/lora_box.mjs and
js/shared/workflow_switches.mjs, with tests.
2026-10-15 10:36:10 -05:00
ausboss de58c86ba2 Workflow Switches: a card can show its switches as one pill, where one is always picked
One at a time already made switching a row on switch the other rows off,
but every row kept its own off | on, so all of them could be off. For
choices such as masking by words or by a click, the card can now show its
rows as one control.

- A new card setting, Show as (rows | one pill), is there while One at a
  time is on. Rows is the default and looks as before.
- As one pill, each row is a segment of the pack's segmented pill, the row
  that is on is the filled one, and a click on another segment switches to
  it. A click on the picked one changes nothing, so one is always picked.
- Two to four rows whose names fit are a pill, and the card's minimum width
  follows the names so none is cut short. More rows, or longer names, are a
  list to pick from.
- A graph with none or several rows on, or a row only partly on, is drawn
  as it is, with an amber edge, and the next click leaves exactly one on.
- In the edit view the pill sits above the rows, which keep their frame
  button and menu. Switch everything off is left out of the node's menu
  while the card shows as one pill.

The stored settings grow by one key, show, which reads "rows" when it is
missing, so a workflow saved by an earlier version opens as it did. A click
on a choice uses the same plans as One at a time, for rows that hold nodes,
rows that change settings and rows with an off side.
2026-10-13 21:23:35 -05:00
ausboss 2c4276829b Workflow Switches: a row can run one part and switch another off
A row only turned its own nodes off and on. A choice that means "use this
and leave that out" needed two rows and two clicks, and the two could be
set against each other. An edit, say, takes its size from its picture, so
the node that sets the size has to sit out while the picture loader runs.

A made switch can now have an off side: nodes and groups that run only
while the row is off. Switching the row on turns them off, switching it
off turns them on, in the same click and the same undo step as the row's
own nodes.

- The row's menu gets "The selected run only while this is off" and "Take
  the selected off that side". A node is on one side only: putting it on
  one side takes it off the other.
- A row with an off side shows a small sign of two arrows in the edit
  view; its tooltip names the nodes. The frame button and "Select its
  nodes" take in both sides.
- The row reads on when its own nodes run and its off side does not, off
  when it is the reverse, and mixed otherwise.
- One at a time and "Switch everything on / off" follow each row's off
  side.

Stored as nodes_off and groups_off beside nodes and groups, and left out
while empty, so a switch that does not use it is saved exactly as before.
2026-10-11 18:00:40 -05:00
ausboss 3007140cd6 Workflow Switches: a click anywhere on a pill flips the switch 2026-10-06 07:34:28 -05:00
ausboss a0d47535e3 Workflow Switches: describe the settings switch 2026-10-06 00:25:43 -05:00
ausboss 164233c0df Workflow Switches: help page, README, changelog, guards and API snapshot 2026-10-06 00:01:23 -05:00