Nodes/Eden.art nodesuite/CLIP_Interrogator
ComfyUI Node Runs on cloud

CLIP_Interrogator

Reverse-engineer a prompt from any image

By edenartlabΒ·Created 3 years agoΒ·Updated 6 months agoΒ· 119
CLIP_Interrogator
  • image
  • full_prompt
  • blip_caption
β—„modeβ–Ύβ–Ί
β—„keep_model_alivetrueβ–Ί
β—„prepend_blip_captiontrueβ–Ί
β—„save_prompt_to_txt_fileclip_interrogator_prompt.txtβ–Ί

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 - fast runs a short, quick interrogation; full takes longer but hunts deeper through the candidate tokens for a richer prompt. Start with fast, go full when 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.

CategoryEden 🌱

Inputs (5)

NameTypeDefaultDescription
imageIMAGEβ€”
modeCOMBO2 options: fast, full
keep_model_aliveBOOLEANtrueβ€”
prepend_blip_captionBOOLEANtrueβ€”
save_prompt_to_txt_fileSTRINGclip_interrogator_prompt.txtβ€”

Outputs (2)

NameTypeDescription
full_promptSTRINGβ€”
blip_captionSTRINGβ€”