Load Image Sequence (mtb)
Reading a numbered folder of frames into ComfyUI
- image
- mask
- current_frame
- total_frames
If you've done any work in Nuke, After Effects, or Blender, the #### in this node's default path (videos/####.png) will look familiar - it's the standard frame-number placeholder convention, where each # stands for one digit of a zero-padded frame number. videos/####.png matches videos/0001.png, videos/0002.png, and so on. This node's whole job is loading one image at a time out of that kind of numbered sequence, driven by which frame you ask for.
The author's own note in the pack is honest about the UX: "needs improvements." It works, but it's not the most polished input node in the pack - the interaction between current_frame and range in particular is worth reading carefully before you rely on it.
How the three modes work
Straight from the node's own documentation:
current_frameset to a specific number (0 and up) loads exactly that one frame from the sequence.current_frameset to -1 loads every frame matching the pattern, all at once.- If
pathcontains a*, the node globs using it - useful when your filenames don't follow strict zero-padding. - If
rangeis set (something like0-10to load frames 0 through 10), it takes over entirely andcurrent_frameis ignored.
Inputs and outputs that matter
path(defaultvideos/####.png) - the pattern pointing at your sequence.current_frame(default 0, range -1 to a very large number) - which frame to load, or -1 for "all of them."range(optional, default empty) - a frame range string that overridescurrent_framewhen set.
Four outputs: image, mask (same as any core image loader), plus current_frame and total_frames as INTs - handy for wiring straight into a counter-driven graph, since you get back both what frame you actually loaded and how many exist in total without a separate lookup.
Installing it
- ComfyUI Manager - search "MTB Nodes", install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/melMass/comfy_mtb, restart. A manual clone needspip install -r requirements.txtrun inside thecomfy_mtbfolder first.
No models needed - it's reading files off disk. Just make sure path is relative to wherever ComfyUI expects it (typically the input directory, same as other load nodes), not an arbitrary absolute path you're assuming will resolve.
Common issues & troubleshooting
Nothing loads, or it errors on startup. Double-check your actual filenames match the # padding exactly - #### means exactly four digits, so a file named videos/1.png won't match it. Either rename to videos/0001.png or switch path to use a * glob instead.
Frame count looks off, or current_frame doesn't do what you expect. Check whether range is set - if it is, current_frame is silently ignored, per the node's own documented behavior, which is an easy thing to forget after you've been tweaking range for a different test.
Loading feels slow with current_frame = -1 on a big sequence. That's expected - pulling every frame from a folder at once is inherently heavier than loading one, and there's no lazy-loading option exposed here. For large sequences, prefer range to pull a manageable slice, or drive current_frame per-queue if you're processing one frame at a time anyway.
Some mtb nodes fail to load at startup. Standard for this pack - check the console for [comfy_mtb] STATUS and http://127.0.0.1:8188/mtb for what didn't load. This node has no optional dependencies, so it's rarely the one missing.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | videos/####.png | — |
| current_frame | INT | 0-1–9999999 | — |
| rangeopt | STRING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| current_frame | INT | — |
| total_frames | INT | — |