Text Image Filter
Read the Image, Then Type the Prompt It Deserves
- image
- mask
- images
- text
- extra1
- extra2
- extra3
The Text Image Filter is the sibling of the Mask Image Filter with typing instead of painting. It shows you an image and an editable text field, pauses the workflow while you look at the picture and fix the words, and then sends both onward. It exists because "type the prompt before you see the result" is a terrible way to work. This node lets you see what you got and respond to it in the same breath.
The natural home for it is captioning. Generate an image, let a captioner draft the tag list, and route it through this node - you read the image, trim the junk tags, and save a caption that's actually right instead of trusting the model's first guess. Its other classic use is inpainting: generate, mask the bad bit, then type the repair prompt at the moment you're looking at the exact region that needs fixing. The pack's example workflow does precisely that, chaining this after the mask editor.
How it works
Mechanically it's the same pause-and-wait server dance as the rest of the pack: the image goes to the frontend, the editor window pops, and the workflow sits until you hit send, cancel, or the timeout runs out. Inputs: image (one at a time), text for the initial contents of the field, timeout, and textareaheight (30–500 px, default 150) so the box fits your screen instead of dominating it. There's an optional mask input too, and the three extra fields plus tip behave like the other filters.
Outputs are images, text, and extra1–extra3 - the edited string comes out of text, ready to feed a CLIP text encode or a caption saver.
One trick the README is rightly proud of: triple-click inside the text area to replace its contents with whatever you sent last run. If you're iterating on an img2img prompt and only want to tweak a couple of words, that saves you from retyping the whole thing.
Installing it
Same as the rest of the pack - ComfyUI Manager, search "cg-image-filter" or "Image Filter":
cd ComfyUI/custom_nodes
git clone https://github.com/chrisgoringe/cg-image-filter
Restart ComfyUI and you're done. No pip requirements, no model files; the popup UI is plain JavaScript shipped in the pack. Since the pack uses ComfyUI's newer node API, a stale ComfyUI install will simply not show the nodes - update ComfyUI first if that happens.
Gotchas
Single image at a time, remember. Feed it a whole batch and it'll just show the first frame (the node takes one image input); if you're iterating over many, run Image List From Batch first and let the filters walk through them. And the tip field supports a {{text}} insert: put {{0.5, 20}} in the tip and it renders as a clickable link that drops those characters into the text field - a tidy way to offer yourself preset denoise/steps combos without opening the string-parsing toolbox.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| text | STRING | — | |
| timeout | INT | 6001–1000000 | timeout in seconds |
| textareaheight | INT | 15030–500 | — |
| graph_id | STRING | — | |
| maskopt | MASK | optional | |
| tipopt | STRING | — | |
| extra1opt | STRING | — | |
| extra2opt | STRING | — | |
| extra3opt | STRING | — | |
| audiofileopt | STRING | Path or URL for the audiofile to use, or name of the file in the default audio folder |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| text | STRING | — |
| extra1 | STRING | — |
| extra2 | STRING | — |
| extra3 | STRING | — |