Extensions/ComfyUI-ImageSequencer
ComfyUI Extension

ComfyUI-ImageSequencer

A modular image sequence toolkit for ComfyUI with five nodes to scan, schedule, preview, time, and save batch images.

By hermankwan·Created 29 days ago·Updated a day ago· 0
hermankwan/ComfyUI-ImageSequencer
Nodes—
On cloudLocal install
Stars0
Updateda day ago
Readme

🎞️ ComfyUI ImageSequencer

Version License ComfyUI Platform Status

A modular batch image sequence toolkit for ComfyUI. ComfyUI ImageSequencer brings together five dedicated nodes—Loader, Queuer, Viewer, Timer, and Saver—so you can scan, step through, inspect, time, and save image sequences smoothly within a single workflow.

📌 Where to Find It

Right-click on the ComfyUI canvas → image/sequencer, or search for ImageSeq.


📦 Installation

Note: This toolkit relies strictly on native web standard components and ComfyUI API events. No external Python dependencies or requirements.txt are required.

Method 1: Via ComfyUI-Manager (Recommended)

  1. Open ComfyUI and click on Manager in the menu.
  2. Select Custom Nodes Manager.
  3. Search for ComfyUI-ImageSequencer.
  4. Click Install and restart your ComfyUI.

Method 2: Manual Installation (Git Clone)

  1. Navigate to your ComfyUI custom_nodes directory:
    cd ComfyUI/custom_nodes
    
  2. Clone this repository:
    git clone https://github.com/hermankwan/ComfyUI-ImageSequencer
    
  3. Restart your ComfyUI instance.

🧠 Architecture & How It Works

ComfyUI ImageSequencer separates sequence metadata/scheduling from heavy tensor processing and uses a lightweight event bus (iseq:queue-start, iseq:queue-tick, iseq:queue-stopping, iseq:queue-end, iseq:queue-interrupt) alongside ComfyUI's native execution lifecycle:

  • Sequence-First, On-Demand Loading: ImageSeq Loader scans directories or isolates dragged/uploaded files into a structured sequence (SEQUENCE JSON by default, with optional IMAGE output via output_method when image dimensions are consistent) rather than loading every image into memory up front.

  • Three-Slot Alignment & Sequential Driver: ImageSeq Queuer aligns up to three sequence/image slots to the longest slot (MAX_TOTAL), wraps shorter slots automatically, applies optional sizing (SizePolicy), and advances index step-by-step across Queue all runs with checkpoint persistence (💾 / 🚩, anchored at 0% when saved before running), Hold last / Hold next, and mismatch protection.

  • Decoupled Observability & Dual-Tab Feedback: ImageSeq Viewer provides filmstrip navigation, A/B comparison (Wipe / Toggle), review flags (Keep / Rework / Reject), Follow / Locked states, and a hover tooltip combining full path, resolution, and file size; ImageSeq Timer tracks ETA, COMPUTE, and TOTAL across both queue-driven and standalone runs; ImageSeq Saver writes files under output with template tokens and updates live Image / Status tabs while passing IMAGE through.

  • Shared Panel Shell & Persistence: Custom DOM panels (createNodeUIDOMBox) and local/backend state stores keep UI controls responsive while isolating per-node state.

✨ Key Features

  • 📂 ImageSeq Loader: Scan folders, browse directories, or drag-and-drop images into isolated upload batches, with natural sorting, subfolder recursion, file-type filtering, @ path composition, and output_method (SEQUENCE default or IMAGE with resolution consistency checks).

  • 🎛️ ImageSeq Queuer: Three-slot equal-priority sequence driver (1–3) featuring interactive progress scrubbing, step controls (‹ Prev / Next ›), Queue all / Stop, Hold last / Hold next, checkpoint save/restore (💾 / 🚩), and optional max-side sizing.

  • 🖼️ ImageSeq Viewer: Built-in preview stage with image_a / image_b A/B comparison (Wipe & Toggle), bottom filmstrip with review flags (Keep / Rework / Reject), Follow / Locked view modes, and combined path/resolution/size hover tooltips.

  • ⏱️ ImageSeq Timer: Crisp 7-segment LED readout with ETA, COMPUTE, and TOTAL modes, selectable LED colors, and live progress indicators for both queued and standalone runs.

  • 💾 ImageSeq Saver: Flexible batch saving with path prefixes, suffixes, filename templates, date overrides, format/quality controls, workflow embedding, conflict modes (unique / overwrite / skip), live parameter-to-panel preview, and customizable display fields.

🚀 Quick Start

A typical pipeline connects directly from input to output:

[Loader] → [Queuer] → [Your Processing Nodes] → [Viewer] → [Saver]

(Place Timer in your workflow whenever you want live timing and progress feedback—whether driven by Queuer or running a standalone img2img/batch graph.)

  1. Load your sequence (ImageSeq Loader): Pick a folder or drag files/folders onto the node. Adjust include_subdirs, file_types, sort_order, or output_method, and use Rescan or Clear whenever needed.

  2. Drive steps (ImageSeq Queuer): Wire SEQUENCE and/or image inputs into slots 1–3. Step manually with ‹ Prev / Next ›, scrub the progress bar during active runs, hold a frame with Hold last / Hold next, pin a checkpoint (💾 / 🚩) for long batches, or run with Queue all / Stop.

  3. Inspect results (ImageSeq Viewer): Connect image_a, image_b, and image_path to review sequence frames, flag candidates on the filmstrip, hover for full path/resolution/size details, or compare before-and-after results in A/B mode.

  4. Save cleanly (ImageSeq Saver): Connect images, image_path, and index, configure your path prefix, filename template, format, quality, and overwrite policy, and inspect the Image and Status tabs as files are saved.

📋 Nodes & Detailed Guides

1. ImageSeq Loader

Scans local directories or handles file/folder picking and drag-and-drop uploads with natural sorting, file-type filters, optional subdirectory recursion, and @ path support, outputting SEQUENCE (default), TOTAL, DIRECTORY, and optional IMAGE.

2. ImageSeq Queuer

Three-slot sequence scheduler and multi-reference loader (sequence_1..3 and fallback image inputs) with modulo wrapping, optional SizePolicy scaling/cropping, Queue all / Stop, Hold last / Hold next, progress scrubbing, and persistent checkpoints (💾 / 🚩).

3. ImageSeq Viewer

Output preview and inspection node passing through IMAGE and IMAGE_PATH, featuring a centered stage, horizontal filmstrip with K / RW / X review flags, Follow / Locked tracking, combined path/resolution/size hover tooltips, and Off / Wipe / Toggle A/B comparison when both image_a and image_b are connected.

4. ImageSeq Timer

7-segment LED execution timer with ETA, COMPUTE, and TOTAL modes, five LED colors, click/double-click interactions, and total_images progress tracking that works both with ImageSeq Queuer and standalone/general img2img workflows.

5. ImageSeq Saver

Batch image saver writing to ComfyUI's output directory using %filename, %suffix, %index, %date, %time, and %counter / %counter<N> tokens, supporting original / png / jpg / webp, unique / overwrite / skip, IMAGE pass-through, and customizable Image / Status tabs.

🔌 Compatibility & Workflow Notes

  • Within ComfyUI ImageSequencer: Loader → Queuer → Saver / Viewer / Timer share sequence metadata, path tracking, sizing policies, and queue lifecycle events for end-to-end batch automation.

  • With Standard Img2Img & Third-Party Nodes: All image and primitive ports use standard ComfyUI types (IMAGE, STRING, INT), allowing standalone use of Viewer (A/B preview), Saver (templated saving), and Timer (standalone or batch timing) in general workflows.

⚙️ Customizing Saver Display Fields

ImageSeq Saver automatically creates and maintains config/saver_infofields.json per node when needed without overwriting your manual edits afterward.

  • Toggle visible fields using true / false (or // comments) in config/saver_infofields.json, with quality and save_workflow enabled by default alongside core file and batch status fields.

  • Changing parameter controls updates previewable values in the node panel right away, and right-clicking the node → Refresh Info Fields Config reloads updated field visibility settings immediately without re-running the workflow.

📋 Changelog

1.0.0-rc (Public Release Candidate)

  • Checkpoint Start Alignment & Refined Tooltips: Fixed Queuer checkpoint start position so saving at [ 0 / N ] before running places the checkpoint triangle at 0% (far left), streamlined progress-bar and checkpoint tooltips, and cleaned up slot summary formatting.

  • Viewer Combined Metadata Tooltip: Enhanced ImageSeq Viewer hover tooltips (title) to display path | resolution | size together for quick inspection of truncated filenames.

  • Loader Output Mode & Path Composition: Documented output_method (SEQUENCE default vs. IMAGE output with resolution consistency warnings) and @ path syntax support alongside updated node user guides.

  • Architecture Refactoring & Clean Re-Code: Reorganized the codebase into modular backend scanning/sorting/sizing layers (ImageScanner, ImageSorter, ImageValidator, ImageLoader, ImageTransformer, SizePolicy) and decoupled frontend state engines (ViewerPlaylistEngine, SaverStateEngine, ComputeClock / TotalClock / EtaClock / ProgressEngine / RunLifecycleEngine) with a shared createNodeUIDOMBox panel shell.

  • Queuer Scheduling, Checkpoints & Sizing Policy: Added persistent checkpoints (💾 / 🚩 synced to local storage and config/queuer_checkpoints.json) with sequence-mismatch protection, Hold last / Hold next inspection locks, live progress-bar scrubbing during runs, and SizePolicy proportional max-side scaling (allow_upscale=false by default) plus non-proportional crop/pad support.

  • Viewer A/B Inspection & Review Flags: Added Off / Wipe (draggable split handle & percentage) / Toggle A/B comparison for image_a and image_b, Follow / Locked tracking with New frame ↓ jump indicator, filmstrip scrolling, and Keep (K) / Rework (RW) / Reject (X) review flags.

  • Timer Lifecycle & ETA Smoothing: Added FINALIZING tail-step handling for downstream nodes, checkpoint-aware step/ETA tracking, click/double-click controls on the 7-segment display, and compatibility with both Queuer-driven runs and standalone/general workflows.

  • Saver Template Engine & Configurable Info Tabs: Added %filename, %suffix, %index, %date, %time, and %counter / %counter<N> template rendering, unique / overwrite / skip collision policies, IMAGE pass-through, and customizable Image / Status tabs backed by config/saver_infofields.json with comment preservation and live widget sync.

0.2.5-beta

  • Saver Live Sync & Field Config: Added real-time panel updates when adjusting saver parameters, expanded available image/status display fields (with quality and save_workflow enabled by default), and added right-click Refresh Info Fields Config for instant config reloading.

  • Unified Node Panels & Sizing: Refined shared upper/lower panel layout and sizing behavior across nodes for cleaner visual consistency.

  • Queuer & Loader Polish: Streamlined multi-slot queuing controls, progress scrubbing, and folder/file selection interactions.

0.2.2-beta

  • Integrated Loader, Queuer, Saver, and Viewer into an end-to-end sequence workflow.

  • Added LED Timer display modes (ETA, COMPUTE, TOTAL) and subfolder-aware saving with filename templates.

0.1.0-beta

  • Initial sequence loading, natural sorting, previewing, and core backend/frontend scaffolding.

📄 License

Released under the MIT License.