🍖Fetch Filter
Strip 'anime' and 'cartoon' out of a live prompt before it hits the sampler
- codex_1
- codex_2
- codex_3
- codex_4
- codex_5
- text
The workflow it exists for
If you've been around r/comfyui for a week, you've seen it: a vision model describes your image, that description gets reused as the prompt for a generation, and the result comes out "anime"-flavored when you wanted photographic. 🍖Fetch Filter is the valve between the two. Feed it text plus one or more codex dictionaries, and it rewrites the text on the fly before it ever reaches the text encoder.
It's genuinely useful and a little addictive once it's set up: the captioning model keeps churning out "digital art, soft shading", and the filter keeps turning that into "photography, natural skin texture" without you touching anything.
How it works
fetch_filter.py does two things, in order:
- Merges up to five
codexdictionaries into one - later codexes win if two define the same key. - For every key, does a case-insensitive replacement of that key with its value in the input text.
The replacement uses re.IGNORECASE, so matching is forgiving: anime catches ANIME and Anime, and multi-word keys like digital art work as a phrase. But it's substring-based, which cuts both ways. It's permissive - anime will also hit inside animecore or anime style - so keep keys short and specific rather than broad.
One ordering trap worth knowing: replacements apply sequentially. If you map cartoon → photo and also map photo → photograph, the output is photograph, because the first replacement's result gets re-replaced by the later rule. Keep your replacement values free of anything you're also replacing and you'll never feel it.
Inputs and output
text- required, and here's the gotcha: it's markedforceInput, meaning you can't type in it. You have to wire text in from upstream - the output of your vision/LLM node, or a text node from another pack if you want a typeable box.codex_1…codex_5- the dictionaries from Fetch Codex. Leave unused ones disconnected; empty inputs are skipped.- Output:
text(STRING), which you wire straight into a CLIP Text Encode positive or wherever your prompt string goes.
The pack's JS relabels the five codex inputs as codex_I through codex_V and paints both FetchMe nodes its trademark purple - small touches, but they make a busy graph readable.
Installing it
The FetchMe pack is pure Python with no requirements.txt and no model downloads. Install once via ComfyUI Manager (search "FetchMe"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/vladgohn/ComfyUI-FetchMe.git
Restart ComfyUI, then Add Node → FetchMe/Text → 🍖Fetch Filter. If you're here you also want 🍖Fetch Codex - the filter is only as useful as the dictionaries you feed it, and the two are designed as a pair.
Troubleshooting
- Nothing changes. Check that
textis actually wired (it'sforceInput- an empty field isn't a bug, it's the UI telling you to plug something in), and that at least onecodex_Xis connected. - A word you expect to be replaced isn't. Matching is substring + case-insensitive, so it's hard to miss with. Re-check the exact spelling of the codex key - spaces and punctuation count, and a trailing space in a key means a miss.
- Matching too much. Substring replacement means short keys over-match. A key of
artwill replace the middle ofpartyandstarteras easily asdigital art. Use longer, specific keys.
That last one is the real takeaway: FetchMe is a text filter, not a tokenizer. For quick, opinionated prompt cleanup between a captioning model and the sampler, it's the smallest thing that works - and it needs nothing installed but itself.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| codex_1opt | DICT | — | |
| codex_2opt | DICT | — | |
| codex_3opt | DICT | — | |
| codex_4opt | DICT | — | |
| codex_5opt | DICT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |