Pic2Story
Turn any image into a story caption in a single node
- image
- text
You've got an image and you want a sentence - or a few sentences - about what's in it. Pic2Story is the all-in-one node that does exactly that: feed it an image, it returns natural-language prose describing it. The same pack also splits this into a Loader plus Sampler pair, but this node bundles load-and-run into a single box, which is what you want when you just need the text and don't care about reusing a loaded model across a graph.
It's built on BLIP, Salesforce's image-captioning model, fine-tuned into a "story" variant (the default checkpoint is abhijit2111/Pic2Story). The mechanic is conditional image captioning: the model looks at the image, then generates text. If you give it a prompt, the caption continues from it. If you give it nothing, it just describes what it sees. That's a real feature, not an accident - the README explicitly notes the prompt isn't necessary (in both English and Chinese).
The inputs that matter
image- theIMAGEtensor from any image source node (a Load Image, or anything upstream that produces an image).prompt- a text string, defaulta photography of, multiline. This is the seed the caption grows from. Leave it blank and the model does pure image description.repo_id- which checkpoint to use. Defaultabhijit2111/Pic2Storygives you story-style prose. Point it atgoogle/paligemma2-3b-pt-896for a PaliGemma backend instead, though that one needs the model already downloaded.inference_mode-gpu_float16(the one you want on a normal consumer GPU),gpu(full precision, hungrier), orcpu(works, but slow - a caption isn't instant).get_model_online- on by default. When off, it forces use of whatever's already cached locally instead of hitting Hugging Face.
The output
A single text output, a STRING with the caption. Wire it into a Save Text node, feed it into a prompt box, log it - it's just a string, so it plays anywhere.
A word about expectations, because BLIP has a reputation. In the training world, BLIP is widely considered unusable for captioning LoRA datasets - the KB's captioning guidance basically says "anything but BLIP." That's a different job, though. BLIP is weak at tagging every detail for training data; it's perfectly fine at what this node does, which is producing readable, story-flavored sentences about an image. Don't expect a terse tag list. Expect prose.
How to install
Install the pack once and all four of its nodes show up. ComfyUI Manager - search "Pic2Story", install, restart - or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/smthemex/ComfyUI_Pic2Story.git
then restart ComfyUI. There's no requirements.txt, so make sure transformers is installed in the Python that runs ComfyUI (pip install transformers) or the import will fail.
Common issues
First run is the slow one - the checkpoint downloads on load, so give it a minute and watch your disk fill a bit. On CPU it's genuinely sluggish; use gpu_float16 if you have any kind of NVIDIA card. And if you've toggled get_model_online off but never downloaded the model, you'll get an error about not finding it - turn it back on for the first run. The model is written by the same author (smthemex) as several other well-known ComfyUI packs, so you're not dealing with a one-off throwaway - but it's still a small, low-traffic utility pack. It does one thing, and it does it fine.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| prompt | STRING | a photography of | — |
| repo_id | STRING | abhijit2111/Pic2Story | — |
| inference_mode | COMBO | 3 options: gpu_float16, gpu, cpu | |
| get_model_online | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |