MinusZone - CLIPTextEncode(ImageInterrogator)
Image in, ready-to-use prompt out
- image_interrogator_model
- image
- clip
- llama_cpp_options
- customize_instruct
- captioner_config
- text
- conditioning
CLIPTextEncode(ImageInterrogator) is the pack's current, non-deprecated answer to CLIP Interrogator: you feed it an image, it runs a LLaVA vision model locally, and it hands back a text prompt describing what's in the picture - then, if you wire in a clip, it encodes that prompt into ready-to-use conditioning. It's the modern replacement for the old ImageInterrogator(LLava) v1 node and the whole reason this pack exists, per the README ("image recognition similar to clip-interrogator").
Where would you actually use this? Reverse-engineering a prompt from an image you like. Re-captioning training images. Feeding an image's description straight into a re-generation loop. The mechanism is the standard two-file vision setup: a base LLM plus an mmproj projector, loaded through llama.cpp, describing the image with the same structured schema as the pack's text beautifier.
The inputs that matter
image_interrogator_model(optional) - a config fromModelConfigManualSelect(ImageInterrogator)orModelConfigDownloaderSelect(ImageInterrogator). Leave it unplugged and the node falls back to a default LLaVA 1.5 7B model, auto-downloaded.image(optional) - the IMAGE to describe. Without it, there's nothing to interrogate.resolution- default 512. The image is resized to this before the vision model sees it; higher captures more detail but costs more tokens and VRAM. 512 is a good starting point; push to 768 if descriptions miss fine details.post_processing- defaultTrue. Runs the pack's cleanup pass on the raw model output (newline stripping, punctuation normalization) so the prompt is A1111-ready. Turn it off if you want the model's raw phrasing.keep_device/seed- keep the vision model resident between runs (faster, more VRAM) and seed the LLM generation.
Optional extras shared with the rest of the pack: clip (to get CONDITIONING out), llama_cpp_options, customize_instruct (swap in your own captioning instructions - very useful for making dataset captions follow your format), and captioner_config (flips this node into batch-captioning a folder - see ImageCaptionerConfig).
Outputs: text (the description) and conditioning (only non-null when clip is wired).
How it works
The image becomes a tensor, gets resized, and is passed to the vision model as pixels + a chat prompt built from the pack's schema (or your customize_instruct). The model's JSON response is parsed and flattened into parenthesized keyword groups, then encoded with A1111-style weight scaling (the ADV_CLIP_emb approach the pack credits). It's local, free, and - this is the pitch - runs entirely in ComfyUI.
Installing
Same pack:
cd ComfyUI/custom_nodes
git clone https://github.com/MinusZoneAI/ComfyUI-Prompt-MZ
Restart. Depends on llama-cpp-python + diskcache; the default vision model is a multi-GB download on first run (into ComfyUI/models/gguf). The README's three FAQ items are all relevant: upgrade llama-cpp-python if you see LLAMA_SPLIT_MODE_LAYER, use CUDA 12.1 PyTorch if LLama.dll fails to load, and sort your network if the wheel build dies.
Troubleshooting
Empty or boilerplate captions are usually the model, not you - a Q4 vision model describes worse than a Q5/Q6, and small int4 models miss fine detail. If post_processing garbles something you liked, that's the toggle. And the two-file setup is where people get burned: a mismatched mmproj produces garbage or an outright Failed to automatically find the corresponding mmproj file error - pick the projector explicitly if auto-match fails. Also remember this node is a generator, not a training-data shortcut that needs zero review - captions land on your dataset exactly as generated, so eyeball a few before you train a LoRA on them.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| resolution | INT | 512128–18446744073709550000 | — |
| post_processing | COMBO | true | 2 options: false, true |
| keep_device | COMBO | false | 2 options: false, true |
| seed | INT | 00–18446744073709550000 | — |
| image_interrogator_modelopt | ImageInterrogatorModelConfig | — | |
| imageopt | IMAGE | — | |
| clipopt | CLIP | — | |
| llama_cpp_optionsopt | LLamaCPPOptions | — | |
| customize_instructopt | CustomizeInstruct | — | |
| captioner_configopt | ImageCaptionerConfig | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| conditioning | CONDITIONING | — |