Literal
Hand-type a sequence — but it has to be real Python, not free text
- sequence
Most of comfyui-job-iterator's sequence nodes generate values programmatically - a numeric range, every combination of something else. Literal is the escape hatch: you just type the sequence yourself. It's the node you reach for when you want to sweep over a specific, hand-picked list of seeds, prompt fragments, or filenames that don't follow any pattern worth generating.
How it works
This is the one detail that actually matters here, and it's easy to miss: the text box isn't free-form. Under the hood, whatever you type gets passed straight to Python's ast.literal_eval(). That function only accepts real Python literal syntax - lists, tuples, dicts, strings, numbers, booleans - and nothing that looks like a function call or an expression. So you write [1, 2, 3], not 1, 2, 3. You write ["cat", "dog", "fox"], not cat, dog, fox. Get the syntax wrong and you get a Python error at queue time, not a best-effort guess at what you meant.
The upside of that restriction: literal_eval deliberately can't execute arbitrary code, unlike, say, eval(). Whatever you type into this box, it can only ever become a literal value - a list, a string, a number - never a function call or an import. It's the safe way to type structured data into ComfyUI.
The inputs and outputs that matter
literal(STRING, multiline) - the only input. Type a Python literal:[1, 5, 12]for a list of ints,["portrait", "landscape"]for strings, even[(1, "a"), (2, "b")]for a list of tuples if you need that shape downstream.
Output is a single sequence, the parsed Python object, ready to feed into MakeJob, CombineJobs, Reorder, Slice, or anything else in the pack expecting a SEQUENCE.
How to install it
Via ComfyUI Manager: search comfyui-job-iterator, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ali1234/comfyui-job-iterator
then restart ComfyUI. No dependencies - this node is pure Python standard library.
Common issues & troubleshooting
Forgetting quotes around strings. [cat, dog] fails, because Python reads cat and dog as undefined variable names, not text. You need ["cat", "dog"]. This is the single most common way this node breaks for a beginner typing what feels like a normal comma-separated list.
Typing a bare comma-separated list without brackets. 1, 2, 3 actually parses fine as a tuple (1, 2, 3) under ast.literal_eval - Python treats a bare comma sequence as a tuple literal - but it's easy to accidentally type something that isn't valid at all, like a trailing comma inside the wrong bracket, or mixed quote styles. If you get a SyntaxError, wrap it explicitly in [...] and check your quotes.
A single value with no brackets. Literal typed just 5 parses fine and gives you the number 5 - but that's not a sequence you can iterate over with a JOB node the way [5] (a one-item list) is. If a downstream node complains it can't iterate an int, wrap the value in brackets even when there's only one of it.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| literal | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| sequence | SEQUENCE | — |