SK Prompt Matrix Sampler V3
Exact line selection for the control freaks
- string
V1 and V2 sample your prompt grid by count - "take the first N lines" or "grab N random lines." V3 is the version that lets you point at exact rows. SK Prompt Matrix Sampler V3 keeps the same one-line-one-dimension sampling logic but adds pick_ids, so you say precisely which lines participate, in the order you want them, and everything else gets ignored.
That's the feature worth understanding, because it changes how you use the node. In V2, "test this grid" means picking a count and accepting whatever lines come out. With V3 you can carve a specific subset out of a bigger grid: keep lines 1, 3, and 5 for a run, flip to 2 and 4 for the next, without deleting anything from the shared text block. If your grid is a reference library and your tests are "this LoRA against these three prompts," exact selection is the natural fit.
How it works. Same core as its siblings: raw_text is the built-in multiline grid, each line is split on input_sep (default |) into options, one option is picked per selected line, and the results are joined with output_sep (default , ) into a single string. The difference is pick_ids - a string like 1,3,5. Lines are 1-based (line 1 is the first line), and entering 0 selects everything. The parser is forgiving: it regex-extracts digits, so 1, 3, 5, 1;3;5, even Chinese-format separators all work. In Sequential mode the output follows your pick_ids order; in Random mode the selected lines get shuffled first. seed keeps a given draw reproducible, as in the other two.
Inputs that matter.
pick_ids(default"0") - the line numbers to use. This is the whole point of V3.raw_text- the grid, typed on the node.sort_mode,input_sep,output_sep,seed- same as V1/V2.
Output. One string, the sampled prompt, into your CLIPTextEncode.
Installing. ComfyUI Manager (search "SK LoRA Manager") or:
cd ComfyUI/custom_nodes
git clone https://github.com/sinvks/ComfyUI-SKLora-Manager.git
pip install -r requirements.txt
Restart and it's there.
Two honest caveats. If you enter line numbers that don't exist (say, line 9 in a 4-line grid), it silently drops them - and if all of them are invalid it falls back to selecting everything, which can surprise you mid-run. And like every node in this family, it samples one prompt per execution rather than emitting the full matrix at once. Within those limits, V3 is the one you graduate to when you've stopped wanting randomness and started wanting rows.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| pick_ids | STRING | 0 | 所选行/段序号,格式为“1,2,3”,输入0表示所有行/段 |
| sort_mode | COMBO | Sequential (顺序) | 默认为Sequential(按pick_ids顺序组合),Random表示按随机顺序组合 |
| input_sep | STRING | | | 输入文本的分隔符 |
| output_sep | STRING | , | 输出文本的分隔符 |
| seed | INT | 00–18446744073709550000 | — |
| raw_text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | — |