Nodes/comfy-ovum/Map Start Ovum
ComfyUI Node

Map Start Ovum

The loop node that also collects the results — Map Start Ovum explained

By sfinktah·Created about a year ago·Updated 10 months ago· 7
Map Start Ovum
  • py_list
  • init_accum
  • flow_control
  • remaining_list
  • accum
  • value
  • index
  • array

Map Start is the opening half of a map loop, and "map" here is doing real work: like Python's map(), it runs the same subgraph once per item in a list, and - this is the trick - it collects every per-iteration result into an accumulator automatically. You get the loop and the output gathering in one shot, instead of having to bolt together counters and list append nodes yourself.

If you've wrestled with Comfy's "no cycles allowed" rule, this is the standard escape hatch: you can't draw a loop in the graph, so loop nodes like this one expand the subgraph recursively at execution time - one copy of your inner nodes per iteration, wired together behind the scenes. sfinktah is upfront that this family is inherited from easyUse (the README's exact words: "I think I just stole these from easyUse to learn how they worked"), so if you've seen easyUse's Foreach nodes, the mental model carries over.

How it works

Map Start is a subclass of ForeachListBeginOvum - same iteration engine, same flow-control plumbing - with one extra idea: it carries an accumulator alongside the iteration. You wire the list you want to process into py_list, the node ticks through it one item at a time, and each pass outputs the current item plus the running accumulator. Your per-iteration subgraph does its thing and hands its result to the paired MapEndOvum, which merges it into the accumulator and triggers the next iteration.

The inputs and outputs that matter

Inputs:

  • py_list (required) - the list to iterate over, as an ITEM_LIST. This is what you flatten a pile of images or prompts into before connecting.
  • init_accum (optional) - a starting value for the accumulator, if you want to seed it (e.g., an empty list, or a dict you're building into).

Outputs - you'll mostly use four of the six:

  • flow_control and remaining_list - wire these to the matching inputs on MapEndOvum. They're the bookkeeping that keeps the loop honest.
  • value - the current item for this iteration; feed it into whatever your subgraph does.
  • index - the iteration number, starting at 0. Handy for filenames or seeding.
  • accum - the running accumulated results; you can read it mid-loop for progress-style logic.
  • array - an immutable copy of the original list, safe to pass around.

Installing it

In the comfy-ovum pack (sfinktah). Install via ComfyUI Manager by searching "comfy-ovum", or:

cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum

Restart after either. No models to download; dependencies are the pack's usual light set (pillow, numpy, requests, aiohttp, etc.).

Common issues

Loops that run forever usually mean the flow-control wires between Map Start and Map End are wrong - both flow_control and remaining_list must come straight from the same Map Start, no detours. And the graph-expansion machinery means big loops (hundreds of iterations) can get slow or memory-heavy; keep per-iteration subgraphs lean. One more: accum grows by whatever Map End appends, so if your result type changes between iterations, the accumulated list becomes a mixed bag - keep the result shape consistent.

Categoryovum/loop

Inputs (2)

NameTypeDefaultDescription
py_listITEM_LISTA list containing items to be processed iteratively.
init_accumopt*Initial value for the accumulator (accum) before processing items.

Outputs (6)

NameTypeDescription
flow_controlFOREACH_LIST_CONTROLPass ForeachListEndOvum as is to indicate the end of the iteration.
remaining_listITEM_LISTOutput the ITEM_LIST containing the remaining items during the iteration, passing ForeachListEndOvum as is to indicate the end of the iteration.
accum*Output the accumulated results during the iteration.
value*Output the current item during the iteration.
indexINTThe index of the current item (starting at 0).
arrayITEM_LISTAn immutable copy of the input list.