Nodes/WAS Node Suite v3/Dataset Filter
ComfyUI Node Runs on cloud

Dataset Filter

Split a dataset into the items to keep and the rest: by a list of names, such as the pictures Dataset Health flagged, by whether a caption is there, or by words the caption holds. Both halves are datasets, so each can be edited, saved or checked on its own.

By WASasquatch·Created 4 years ago·Updated 3 days ago· 1,900
Dataset Filter
  • dataset
  • names
  • dataset
  • removed
  • count
  • removed_count
◄keepcaptioned►
◄find[trigger]►
CategoryWAS Suite/Dataset

Inputs (4)

NameTypeDefaultDescription
datasetWAS_DATASETThe dataset to split, from Load Dataset or any node that hands one on. It is left as it is for every other node reading it.
keepCOMBOcaptioned`named` / `not named` = the items names lists, or the rest; `captioned` / `uncaptioned` = items with a caption, or without; `caption matches` / `caption does not match` = captions holding a find term, or the rest, uncaptioned items among them.
findSTRING[trigger]For the caption keeps: words or phrases separated by commas, any of which matches, as `[trigger], red hair`. Whole words, case ignored; `[trigger]` is matched as written.
namesoptARRAY,STRINGFor named and not named: the item names to pick, as Dataset Health's flagged or Text List Filter's names. `cat`, `cat.png` and `set_b/cat` all work; several lines are several names.

Outputs (4)

NameTypeDescription
datasetWAS_DATASETThe items kept, in their order, for Save Dataset, Dataset to Lists or another filter. May hold no item.
removedWAS_DATASETThe items not kept, in their order: the flagged pictures, or the captions still missing the trigger, to fix on their own.
countINTHow many items were kept.
removed_countINTHow many items were removed. 0 = every item was kept.