TS Prompt Library
51 edit prompts someone already tested, free to copy
- prompt
Wording is the conditioning
With an instruction editor - Qwen Image 2.1, FLUX.2 Klein - the prompt is the parameter. Change three words and "remove the sign" turns into "replace the sign with a different sign", or the model invents a person to read it aloud. And the wording is model-specific, which is the part that wastes afternoons.
Qwen Image's edit line takes inputs named <image1>, <image2> per the official PE-I2I instructions. Klein - the 9B distilled editor that quietly became a lot of people's default local editor through 2026 - wants inputs named in plain words ("image 1", "image 2"), has no negative prompt at all, and reacts to anything you name in the text by drawing it, so its prompts are written without prohibitions and with an explicit list of what should stay unchanged. Same task, opposite phrasing.
TS Prompt Library is a catalog of those prompts, in a node. Pick a section, a model and a prompt; the node shows the text with a Copy button and sends the same string down the graph.
The first section is context editing: 51 tasks across restoration and colorization, removing and adding objects, background removal, face/head/hair swaps, clothing and pose, relighting, camera angle, framing and outpainting, background, time of day and weather, colour, material, style, lettering, hands. Each one carries a short explanation, the number of input images it expects, and a note on its limits. Task codes match across the two models, so switching from Qwen to Klein keeps you on the same task - which is the right way to find out which of them handles your case better.
How it works, and what the two inputs do
The library is plain JSON under nodes/text/prompt_library/<section>/<model>/. A new model, or a whole new section, is a new folder - not a code change. Prompts that need specifics use fields in braces, and the node replaces them on the way out, so what leaves the node is finished text, not a template.
- preset - a
COMBOofsection/model/code, defaulting tocontext_edit/qwen_image_2_1/R01. If you read the JSON and hand-edit wording, ComfyUI reruns the node: the library's version is hashed together with the preset name and the field values. - fields - a
STRINGof JSON, default{}, and deliberately socketless: the node's own panel writes it.{"TARGET": "the red suitcase"}. Each{TARGET},{POSITION},{LIGHTING}shows up as an input row with an explanation and a one-click example.
One output: prompt, a STRING - into the text encoder, an LLM node, or anywhere else that wants text.
An empty field is not an error. It stays in braces, gets named under the prompt, and is logged. That's friendly if you intend to patch the text further downstream, and a trap if you don't: a model handed a literal {TARGET} answers with noise. If you see a brace in your output, go fill the field.
There's a search box right on the node that looks through code, title, group, description and the prompt text in both languages - every word must match, in any order, and ё counts as е. While you type, matches replace the card; ↑/↓ walk them, Enter or a click picks one, Esc clears. The Open interface button turns the node into a full-screen catalog with the whole model's prompt list on the left and a large preview on the right. Thumbnails only load there, so the compact node never fetches them.
One prompt worth knowing about
Code O13 is background removal with real transparency. It doesn't ask you to describe anything - the model finds the main subject itself. Qwen Image 2.1 works in RGBA natively: its VAE decodes four channels and stock Save Image writes a PNG with alpha, so the cut-out lands transparent with no matting step, as long as nothing between VAE Decode and Save Image drops the fourth channel. And if your input already has transparency, Load Image splits it into IMAGE + MASK - join it back with Join Image with Alpha before the text encoder, or the model sees it as opaque. Klein has no alpha channel at all, so its O13 puts the subject on white and you cut it out with TS Remove Background.
For a chosen object rather than the obvious subject, that's O12, where you name it.
Installing it
Part of the Timesaver pack. This node is pure data - no model downloads, no extra dependencies.
ComfyUI Manager → Custom Nodes Manager → search Timesaver → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/AlexYez/comfyui-timesaver
cd comfyui-timesaver
python -m pip install -r requirements.txt
Because the library is data, git pull brings new prompts with it.
Where it goes wrong
The preset dropdown says "(library is empty)". The library folder couldn't be read - usually an incomplete copy or an interrupted git pull. Re-check that nodes/text/prompt_library/context_edit/ exists under the pack, then restart.
A preset you saw in someone else's workflow isn't in your list. pip install -r requirements.txt does not update the JSON - pull the pack. The node also validates the preset and tells you it's not in the library rather than failing obscurely.
Your hand-edited JSON vanished from the dropdown. A preset that uses an undeclared field, or a preview pointing outside its collection, is skipped with a line in the log instead of breaking the node. Check the terminal after editing.
The output still has braces in it. The fields value wasn't valid JSON, so the node treated it as {}. Don't hand-write that widget anyway - fill the rows on the node.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| preset | COMBO | context_edit/qwen_image_2_1/R01 | Which prompt to use, as section/model/code. The library is plain JSON in nodes/text/prompt_library — a new section or model is a new folder, not a code change. |
| fields | STRING | {} | Values for the fields in braces, as JSON: {"TARGET": "the red suitcase"}. The node's own panel fills this in; an empty field stays in braces. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | The finished prompt, fields filled in. Feed it to the text encoder. |