ComfyUI Node

Batch Multi-Folder Processor

Point it at a folder of folders and walk away — batch animations, no babysitting

By lucasgattas·Created 11 months ago·Updated 7 months ago· 2
Batch Multi-Folder Processor
      input_type
      path
      source_type
      file_filterpng,jpg,jpeg,webp
      sort_method
      max_frames_per_batch0
      frame_step1
      interpolation
      interpolation_frames0
      fps12
      final_output_fps0
      output_mode
      loop_mode
      loop_duration_seconds10.0
      loop_count3
      output_directory
      output_format
      random_seed0
      quality90

      The rest of this pack is one-sequence-at-a-time. Batch Multi-Folder Processor is the "now do it for all of them" node. You give it a parent directory full of animation sequences - each in its own subfolder or its own ZIP - and it loads, reorders, interpolates, loops, and encodes each one into an animation file without you touching the graph again. It's a batch job wearing a ComfyUI node costume.

      If you've got a render farm spitting out 40 scene passes, or a hundred sprite sheets that all need the same GIF treatment, this is the reason to install the pack at all. It's also the one node here where the README and the shipped code disagree in a way that matters: the README lists graph outputs (all_batches, batch_info, total_batches), but the real node has no outputs. It's a terminal node - it writes files directly to disk and returns nothing. Don't go looking for wires coming out of it.

      How it works

      Pick input_type (local_directory or zip_url) and a path. Then source_type decides what counts as a "batch": subfolders, zip_files, or both. The node walks the parent, finds every source, and for each one runs the same machinery as the rest of the pack - filter by file_filter, sort, frame_step, cap at max_frames_per_batch, apply interpolation + interpolation_frames (same stub situation as Batch Animation Processor: RIFE/FILM fall back to OpenCV optical flow), then looping.

      Two output_mode options, and they behave very differently:

      • separate_files - one animation per source, named after the folder/ZIP. This is the "process my whole project" mode.
      • combined_video - streams every batch into a single file (combined_animation.mp4, auto-incremented to avoid clobbering). Watch out: in combined mode with gif output, the node buffers every frame in RAM before writing - it can't stream GIFs. Big sequences plus GIF equals memory pressure.

      final_output_fps (0 = keep fps) re-times the animation by duplicating/removing frames while preserving duration - handy for matching 60fps social platforms from a 24fps source.

      The inputs that matter

      • path + source_type - the shape of your whole project. both picks up subfolders and loose ZIPS in the same parent.
      • output_mode - separate files vs. one combined video. Decide before you queue it; it's the difference between "40 files" and "1 file."
      • output_directory - leave empty to drop into ComfyUI's default output folder, or set an absolute path.
      • output_format - one format per run (unlike the encoder, which does several at once).
      • quality (optional, default 90) - dial it down if the files are ballooning.

      No outputs - it's a sink. Check the console log to see each source's status as it processes.

      Install

      Same as the pack's other nodes: ComfyUI Manager → "Egregora Frames Animation", or

      cd ComfyUI/custom_nodes
      git clone https://github.com/lucasgattas/ComfyUI-Egregora-Frames-Animation-Nodes.git
      cd ComfyUI-Egregora-Frames-Animation-Nodes
      pip install -r requirements.txt
      

      Then restart. opencv-python and imageio-ffmpeg (for video encoding) come with the requirements - the only thing you might add is system ffmpeg if you plan to eyeball the results in another tool.

      Where people get burned

      • Zero sources found - the classic mistake is pointing path inside the folder you think is the parent. It needs to be the directory whose children are the batches.
      • zip_url + source_type - if the URL resolves to one ZIP that itself contains the batch folders, the node extracts it first and then looks for subfolders/ZIPs inside. Layer your structure to match.
      • Name collisions - duplicate filenames get _001, _002 suffixes, but a folder and a ZIP with the same stem can both fire and you end up with confusing names. Rename your sources.
      • It's all CPU - every frame is numpy/PIL work. Long combined videos with interpolation are a "run it overnight" job, not a "wait five minutes" job.
      CategoryEgregora/animation

      Inputs (19)

      NameTypeDefaultDescription
      input_typeCOMBO2 options: local_directory, zip_url
      pathSTRING
      source_typeCOMBO3 options: subfolders, zip_files, both
      file_filterSTRINGpng,jpg,jpeg,webp
      sort_methodCOMBO3 options: alphabetical, random, modified_date
      max_frames_per_batchINT00–10000
      frame_stepINT11–100
      interpolationCOMBO5 options: none, crossfade, optical_flow, rife, film
      interpolation_framesINT00–10
      fpsINT121–60
      final_output_fpsINT00–120
      output_modeCOMBO2 options: separate_files, combined_video
      loop_modeCOMBO3 options: no_loop, loop_duration, loop_count
      loop_duration_secondsFLOAT10.00.1–300
      loop_countINT31–100
      output_directorySTRING
      output_formatCOMBO6 options: gif, mp4, webm, avi, mov, mkv
      random_seedoptINT00–18446744073709550000
      qualityoptINT901–100

      Outputs (0)

      No outputs