Commit Graph
5 Commits
Author SHA1 Message Date
MarxMitX 4afb60c921 Image Folder: "start over" fixed
With "Run" -> "one per run", "After a run" -> "next" and "At the end" -> "start over", Picture
stopped at count + 1 after the last picture. The backend maps that to
picture 1, but nextPosition() capped it at count + 1 again, so every
following run loaded picture 1.

nextPosition() now takes at_the_end and correctly wraps the number around after
the last picture.
2026-10-30 23:38:34 +01:00
ausboss b1cbceb42d Image Folder: a node keeps the size it was saved at
A new node opens at its smallest size plus one more row of tiles
(340 x 602). That size was set a moment after the node was made, on any
node that sat at its smallest height. A workflow that loads has put the
saved size on the node by then, so a node saved at its smallest size
looked new and was grown: saved 320 x 506 came back 340 x 602, and saved
400 x 506 came back 400 x 602. A copy, a paste, an undo and Recreate node
grew the node the same way. A node saved 2 px taller kept its size.

The opening size is now set as the node joins the graph. The card is in
place by then, and a size put on the node afterwards wins: a loaded
workflow, an undo, Recreate node. A copy gets its size before it joins
the graph, so a node that is configured with a size is marked and left
alone. A node saved under its smallest size is lifted to it, and one
saved with no size opens like a new node, as before.

tests/image_folder.test.mjs fails when the opening size is set anywhere
but as the node joins the graph, or when a node that comes with a size is
no longer marked.
2026-10-06 15:57:51 -05:00
ausboss 107e4af407 Image Folder: say the pictures are copied into the ComfyUI input folder
Choosing a folder in the file explorer makes the browser ask its own
question ("Upload 74 files to this site?"). A page can neither word that
question nor skip it, and it does not say where the files go.

- While the file explorer is open, the node shows a note: all the folder's
  pictures are copied into your ComfyUI input folder, and the browser's
  upload question is this copy.
- While it copies, the node names the folder and where its pictures go,
  and how far the copy is.
- The big-folder question, the message afterwards and the Browse and
  empty-gallery entries say "copy" too.
- Help page: what the browser's question means, and that a dropped folder
  is copied without it.
2026-10-06 14:55:23 -05:00
ausboss f4a230ccec Image Folder: bring a folder in from anywhere on the computer
A folder dropped on the node, or chosen in the file explorer from Browse or
Add, is copied into ComfyUI's input folder by the browser through ComfyUI's
own upload, and the node moves to the copy. A folder with more than 300
pictures or more than 1 GB asks first. Bringing the same folder in again
writes over its copies.

A whole path pasted into Folder is read as the folder it names when it lies
inside ComfyUI's input or output folder. Any other path is still refused,
and the node now says what to do instead, with a button that opens the file
explorer. The server reads nothing outside those two folders.
2026-10-06 14:06:45 -05:00
ausboss 36d6905477 Add Image Folder: pick a folder, tick its pictures, run the workflow on each
A loader for many pictures. The card chooses the folder inside ComfyUI's
input or output folder, and a thumbnail gallery under it ticks the pictures
to use. All in one run sends every picked picture through as a list; one
per run loads one picture each run and moves on when a run is queued. It
gives image, mask, filename, index and count. Pictures dropped on the node
or added with Add are uploaded into the input folder.

Folder names and picked names are attacker-controlled: a folder is only
read as a path below the input or output folder, links that lead out are
refused, and picked names are compared with what the folder holds, never
opened.
2026-10-06 13:28:51 -05:00