From c5e00c130b07ab4fb49c7d99cfddbe78c383f950 Mon Sep 17 00:00:00 2001 From: Vito Sansevero Date: Fri, 16 Oct 2026 08:08:00 -0700 Subject: [PATCH 1/5] feat(xyz_helpers): add Checkpoint Folder Iterator and Model Compare Sheet - Checkpoint Folder Iterator loads one checkpoint per queued run from a folder (relative to models/checkpoints or absolute), so a whole folder can be swept with only one model in memory at a time - Model Compare Sheet saves each run's image as a tile under output/model_compare// and rebuilds a labeled contact sheet from disk every run, so the grid survives between independent prompts - Starting a sweep at index 0 archives stale tiles to a timestamped folder - Running past the last checkpoint raises a clear error instead of wrapping, so an over-queued batch never restarts and archives a finished sweep - Checkpoints load from the scanned absolute path, so folders outside the configured roots work as the tooltip promises - Extract the LoRA Folder Batch folder-scanning, natural-sort and regex filter helpers into kikotools/base/model_folders.py so both tools share one implementation --- README.md | 22 +++ kikotools/__init__.py | 6 + kikotools/base/model_folders.py | 106 ++++++++++++++ .../checkpoint_folder_iterator/__init__.py | 5 + .../tools/checkpoint_folder_iterator/logic.py | 52 +++++++ .../tools/checkpoint_folder_iterator/node.py | 80 +++++++++++ .../tools/model_compare_sheet/__init__.py | 5 + kikotools/tools/model_compare_sheet/logic.py | 119 ++++++++++++++++ kikotools/tools/model_compare_sheet/node.py | 110 ++++++++++++++ .../xyz_helpers/lora_folder_batch/logic.py | 134 ++---------------- tests/unit/base/__init__.py | 0 tests/unit/base/test_model_folders.py | 57 ++++++++ .../checkpoint_folder_iterator/__init__.py | 0 .../checkpoint_folder_iterator/test_logic.py | 99 +++++++++++++ .../checkpoint_folder_iterator/test_node.py | 71 ++++++++++ .../tools/model_compare_sheet/__init__.py | 0 .../tools/model_compare_sheet/test_logic.py | 79 +++++++++++ .../tools/model_compare_sheet/test_node.py | 125 ++++++++++++++++ 18 files changed, 948 insertions(+), 122 deletions(-) create mode 100644 kikotools/base/model_folders.py create mode 100644 kikotools/tools/checkpoint_folder_iterator/__init__.py create mode 100644 kikotools/tools/checkpoint_folder_iterator/logic.py create mode 100644 kikotools/tools/checkpoint_folder_iterator/node.py create mode 100644 kikotools/tools/model_compare_sheet/__init__.py create mode 100644 kikotools/tools/model_compare_sheet/logic.py create mode 100644 kikotools/tools/model_compare_sheet/node.py create mode 100644 tests/unit/base/__init__.py create mode 100644 tests/unit/base/test_model_folders.py create mode 100644 tests/unit/tools/checkpoint_folder_iterator/__init__.py create mode 100644 tests/unit/tools/checkpoint_folder_iterator/test_logic.py create mode 100644 tests/unit/tools/checkpoint_folder_iterator/test_node.py create mode 100644 tests/unit/tools/model_compare_sheet/__init__.py create mode 100644 tests/unit/tools/model_compare_sheet/test_logic.py create mode 100644 tests/unit/tools/model_compare_sheet/test_node.py diff --git a/README.md b/README.md index afeb975..a1da383 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,8 @@ Advanced parameter management tools adapted from [comfyui-essentials-nodes](http |------|-------------|----------| | [🎛️ Flux Sampler Params](#️-flux-sampler-params) | FLUX-optimized parameter generator with batch support | 🧰 xyz-helpers | | [📁 LoRA Folder Batch](#-lora-folder-batch) | Batch process multiple LoRAs from folders | 🧰 xyz-helpers | +| [🔁 Checkpoint Folder Iterator](#-checkpoint-folder-iterator) | Load one checkpoint per queued run from a folder | 🧰 xyz-helpers | +| [🧩 Model Compare Sheet](#-model-compare-sheet) | Save each run's image and rebuild a labeled contact sheet | 🧰 xyz-helpers | | [📊 Plot Parameters](#-plot-parameters) | Visualize parameter effects with graphs | 🧰 xyz-helpers | | [🎯 Sampler Select Helper](#-sampler-select-helper) | Intelligent sampler selection with recommendations | 🧰 xyz-helpers | | [📅 Scheduler Select Helper](#-scheduler-select-helper) | Optimal scheduler selection for samplers | 🧰 xyz-helpers | @@ -301,6 +303,26 @@ Automated batch processing for multiple LoRA models from folders. ![LoRA Folder Batch Example](examples/workflows/xyz_helpers_lora_testing.png) +#### 🔁 Checkpoint Folder Iterator +Run the same prompt through every checkpoint in a folder, one model per queued run. + +- **folder**: relative to `models/checkpoints`, or an absolute path anywhere on disk; regex include/exclude filters +- **index** with `control_after_generate`: set 0 + *increment*, then queue a batch count equal to the checkpoint count +- Queuing past the last checkpoint fails that run with a clear message instead of wrapping around, so the finished sweep is never restarted or archived by accident +- Outputs MODEL/CLIP/VAE for the indexed file plus `ckpt_name`, `label`, `index`, `count` +- Only one checkpoint is loaded at a time, so large folders do not exhaust RAM + +#### 🧩 Model Compare Sheet +Output node that pairs with Checkpoint Folder Iterator. + +- Saves each run's image(s) to `output/model_compare//_