Nodes/Image Filter/Text Image Filter
ComfyUI Node

Text Image Filter

Read the Image, Then Type the Prompt It Deserves

By chrisgoringe·Created 2 years ago·Updated 2 months ago· 132
Text Image Filter
  • image
  • mask
  • images
  • text
  • extra1
  • extra2
  • extra3
text
timeout600
textareaheight150
graph_id
tip
extra1
extra2
extra3
audiofile

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 extra1extra3 - 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.

Categoryimage_filter

Inputs (11)

NameTypeDefaultDescription
imageIMAGE
textSTRING
timeoutINT6001–1000000timeout in seconds
textareaheightINT15030–500
graph_idSTRING
maskoptMASKoptional
tipoptSTRING
extra1optSTRING
extra2optSTRING
extra3optSTRING
audiofileoptSTRINGPath or URL for the audiofile to use, or name of the file in the default audio folder

Outputs (5)

NameTypeDescription
imagesIMAGE
textSTRING
extra1STRING
extra2STRING
extra3STRING