AK CLIP Encode Multiple
Encode a whole list of prompts in one pass, skip the repeats
- str_list
- clip
- mask_list
- combined_con
- cond_0
- cond_1
- cond_2
- cond_3
- cond_4
- cond_5
- cond_6
- cond_7
- cond_8
- cond_9
- cond_10
- cond_11
- cond_12
- cond_13
- cond_14
- cond_15
- cond_16
- cond_17
- cond_18
- cond_19
AK CLIP Encode Multiple is the conditioning sibling of the pack's AK Index Multiple node: instead of pulling a slice out of a list of images or masks, it pulls a slice out of a list of prompt strings and CLIP-encodes each one into its own conditioning output. If you've ever built a workflow that sweeps prompts (XY-plot style, or batch testing a few variations), this is the node that stops you from stacking five separate CLIP Text Encode nodes and hand-wiring them.
The author's framing matters here: this pack was built for large, complex workflows where six to eight samplers run at once, and every wasted re-encode is time you feel. The node is honest about the caching it does. CLIP encoding isn't free - your text goes through the tokenizer and through the text encoder every time, and in a big workflow the same prompt can get encoded on every queue. This node encodes the empty (NONE) conditioning exactly once and reuses it, caches per-string encodings so unchanged prompts don't re-tokenize, and fingerprints the whole list so unchanged input skips the work entirely.
The inputs. Four required, one optional:
str_list- the list of strings to encode. This is a wildcard*input and it's list-mode, so the wire on it carries a list of prompts, not one prompt.clip- your CLIP model, same as any text encoder.starting_index- where in the list to start (default 0).length- how many entries to encode (default 1, max 20).mask_list(optional) - a matching list of masks, one per entry, so each conditioning can carry a region mask for inpainting or regional work.
The outputs. combined_con plus cond_0 through cond_19. The combined output concatenates every encoded conditioning in the window into a single bundle - that's the one you'll usually wire into the positive or negative input of a KSampler. The individual cond_0... outputs let you take entries out individually, e.g. to mix or reorder before sampling. Unused outputs just stay empty; you can leave them dangling.
How to install. ComfyUI Manager, search "AK Pack", or:
cd ComfyUI/custom_nodes
git clone https://github.com/akawana/ComfyUI-Utils-extra
Restart ComfyUI. No extra pip packages, no models to download - this pack has zero external dependencies beyond what ComfyUI already ships.
Where people get burned. The list input trips everyone up at first. This isn't a node where you type a prompt and click encode - str_list has to actually be a list, which means a node upstream that produces one (AK Index Multiple, a text-list node, a primitive feeding a batch). If you wire a single plain string, it wraps to a list of one and only encodes that one. Also remember length is capped at 20, so a 60-prompt sweep means three nodes (or chaining windows with starting_index). And because the caching is the whole point, it only helps if the prompt text actually stays the same between runs - change every prompt every queue and you've bought nothing but a prettier graph.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| str_list | * | — | |
| clip | CLIP | — | |
| starting_index | INT | 0 | — |
| length | INT | 11–20 | — |
| mask_listopt | MASK | — |
Outputs (21)
| Name | Type | Description |
|---|---|---|
| combined_con | CONDITIONING | — |
| cond_0 | CONDITIONING | — |
| cond_1 | CONDITIONING | — |
| cond_2 | CONDITIONING | — |
| cond_3 | CONDITIONING | — |
| cond_4 | CONDITIONING | — |
| cond_5 | CONDITIONING | — |
| cond_6 | CONDITIONING | — |
| cond_7 | CONDITIONING | — |
| cond_8 | CONDITIONING | — |
| cond_9 | CONDITIONING | — |
| cond_10 | CONDITIONING | — |
| cond_11 | CONDITIONING | — |
| cond_12 | CONDITIONING | — |
| cond_13 | CONDITIONING | — |
| cond_14 | CONDITIONING | — |
| cond_15 | CONDITIONING | — |
| cond_16 | CONDITIONING | — |
| cond_17 | CONDITIONING | — |
| cond_18 | CONDITIONING | — |
| cond_19 | CONDITIONING | — |