CLIP_Interrogator
Reverse-engineer a prompt from any image
- image
- full_prompt
- blip_caption
Somewhere between "describe this image" and "give me back the exact prompt that made it" sits the CLIP Interrogator - and it lands much closer to the first than the second, which is exactly the right expectation to have going in. It takes an image, runs CLIP and BLIP over it, and hands you back a text prompt that kind of describes it. It won't reconstruct the original seed words, but it's shockingly good at getting you 80% of the way to a matching style.
It's the ComfyUI wrapper around pharmapsychotic's excellent clip-interrogator library, packaged by the Eden.art team. Feed it a frame from a video, a screenshot, or an image you love, and it spits out a prompt you can drop into any checkpoint. This is the node for "I have no idea what prompt produced this, but I want more of it."
How it works
The mechanism is a two-part interrogation. First, a BLIP captioning model produces a plain-language description of the scene ("a woman in a red dress standing in front of a castle at sunset"). Then CLIP (ViT-L/14, OpenAI's) tokenizes the image and searches a big candidate-token space for words that maximize similarity to that image - that's the interrogation proper, and it's why you get weirdly specific stylistic tags like "photorealistic, cinematic lighting, masterpiece" appended to the caption.
On first use the node downloads its models into ComfyUI/models/: the CLIP model into models/clip and the BLIP captioner into models/blip. That's a chunky download - the BLIP large caption model alone runs about 1.9 GB - so the first run is slow and feels like a hang. It isn't; it's downloading.
Inputs and outputs that matter
- mode -
fastruns a short, quick interrogation;fulltakes longer but hunts deeper through the candidate tokens for a richer prompt. Start withfast, gofullwhen you want the kitchen sink. - prepend_blip_caption (default on) - the BLIP caption gets prepended to the CLIP token list, so the output reads like a natural sentence plus tags. Turn it off for pure token soup.
- keep_model_alive (default on) - holds the loaded models in memory between runs instead of reloading them every time. Keep it on unless RAM is tight.
- save_prompt_to_txt_file - set a filename and the node also writes the prompt to disk. Handy for batch workflows.
- Outputs: full_prompt (the combined caption+tags string - this is the one you wire into your Positive prompt) and blip_caption (just the plain-language description).
Installing
It ships in edenartlab/eden_comfy_pipelines (Eden.art nodesuite). Install the pack once - ComfyUI Manager, search "Eden", or:
cd ComfyUI/custom_nodes
git clone https://github.com/edenartlab/eden_comfy_pipelines.git
cd eden_comfy_pipelines
pip install -r requirements.txt
The requirements pin clip-interrogator==0.6.0 and open_clip_torch==2.26.1, which is where the whole "it's downloading 2 GB on first run" thing comes from.
Where people get burned
The number one complaint, and it's a real one on Reddit: the first-run model download breaks on slow or flaky connections. People hit a partial model.safetensors and every subsequent run dies with a cryptic load error. Fix: delete the partial file from ComfyUI/models/blip (and models/clip if needed) and re-run so it starts fresh. Use a download manager or just be patient - it's one big file, not many.
Second gotcha: the output prompt will contain nonsense the models hallucinate. The Eden code actually scrubs one of the classics - "arafed," which BLIP emits for no reason anyone's pinned down - but it won't catch everything. Read the output before pasting it into a generation; treat it as a strong starting point, not scripture. And note this node only interrogates the first image if you feed it a batch - it prints a warning and uses frame 0.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | β | |
| mode | COMBO | 2 options: fast, full | |
| keep_model_alive | BOOLEAN | true | β |
| prepend_blip_caption | BOOLEAN | true | β |
| save_prompt_to_txt_file | STRING | clip_interrogator_prompt.txt | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| full_prompt | STRING | β |
| blip_caption | STRING | β |