GR BLIP 2 Text Expander
Turn a bare-bones prompt into something with actual detail
- expanded_text
This one's easy to confuse with the pack's BLIP-2 captioner, but it does the opposite job: no image input at all, just text in and richer text out. The author's own framing, from when they first shared it, is the clearest description you'll get - it's for people who write bland, short prompts and want them expanded into something with actual detail, and it can take your own short prompt and build on it or generate something from close to nothing.
That matters for how you should think about it. BLIP-2's usual job is turning an image into a caption; here it's being run purely as a text-to-text expander, using the language side of the model without any vision input. This isn't the "BLIP is weak for captioning" conversation that shows up elsewhere in this community - that critique is about describing images for training data, which is a different job than taking a phrase you already wrote and fleshing it out. Whether the expanded result reads as an improvement over your original is going to depend a lot on what you fed it; treat it as a starting point to edit, not a finished prompt.
How it works
Text goes in, gets tokenized and run through BLIP-2's language decoder with standard beam-search generation, and a longer piece of text comes back out. There's no captioning step here - the vision encoder isn't in the loop at all for this node.
The inputs and outputs that matter
text_input- your starting text. Leave it empty and the node has less to build from; give it a short phrase and it has something to expand.max_new_tokens(default 50, up to 100) - hard cap on how much gets generated. This is a modest ceiling, so don't expect paragraph-length output; think "expanded sentence" rather than "expanded essay."num_beams(default 5),do_sample(default true),temperature(default 1) andtop_p(default 0.9) - the standard sampling knobs. Withdo_sampleon, temperature and top_p actually do something; turndo_sampleoff and you're back to deterministic beam search regardless of what those are set to.seed- for reproducible expansions whendo_sampleis on.
One output: expanded_text, a plain string ready to feed into a CLIP text encode or another prompt node.
How to install it
ComfyUI Manager, search GraftingRayman. Manual install:
cd ComfyUI/custom_nodes
git clone https://github.com/GraftingRayman/ComfyUI_GraftingRayman
Restart. As with every node in this pack, you need OpenAI's CLIP installed separately or the pack fails to import - portable installs run .\python_embeded\python.exe -m pip install git+https://github.com/openai/CLIP.git, system Python runs pip install git+https://github.com/openai/CLIP.git.
Common issues & troubleshooting
Pack doesn't load. Same root cause as every other node here - check your console for the CLIP import failure and run the pip install above.
Output feels short or cuts off mid-thought. max_new_tokens caps at 100, which isn't a lot of room. If you need a genuinely long, elaborate prompt, this node's ceiling is going to be the limit, not the model's ability.
Results are inconsistent between runs on the same input. That's do_sample doing its job - it's on by default, so temperature and top_p introduce real variation. Turn do_sample off if you want the same input to reliably produce the same expansion.
Expansion doesn't build on your text the way you expected. This is a small, general-purpose language model, not an instruction-tuned assistant - it won't reliably follow explicit instructions embedded in your prompt the way a chat-tuned LLM would. Treat the output as raw material to edit rather than a finished result.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| text_input | STRING | — | |
| max_new_tokens | INT | 501–100 | — |
| num_beams | INT | 51–10 | — |
| do_sample | BOOLEAN | true | — |
| temperature | FLOAT | 1.000.1–2 | — |
| top_p | FLOAT | 0.900.1–1 | — |
| seed | INT | 11–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| expanded_text | STRING | — |