Nodes/Comfyui_PDuse/PD_Image to Text V1
ComfyUI Node

PD_Image to Text V1

It does NOT caption your image

By 7BEII·Created 2 years ago·Updated 15 days ago· 53
PD_Image to Text V1
  • image
  • text_output
prompt请在此输入提示词

I need to be blunt about this one: PD_image_to_text_v1 ("PD_Image to Text V1") does not do what its name says. You'd reasonably assume "image to text" means image captioning - you feed it a picture, it writes a description. That's what WD14 taggers and BLIP and the Joy Caption nodes do. This node does the exact opposite: it takes your prompt string and hands it back to you unchanged. The image input is only there for show - the code reads the tensor's shape, prints it to the console, and then returns the prompt you typed.

So if you added this node because you wanted automatic captions, delete it now. It will not help. This is a text pass-through with an image port bolted on.

What it actually does

The mechanism is five lines: validate the image tensor, print a "received image Batch=1, Height=..., Width=..." debug line to the ComfyUI terminal, then return (prompt,). That's it. The prompt field is a multiline string box, and text_output is that same string, verbatim.

The one thing it's arguably useful for is as a documentation/annotation device: you can stash a note in the multiline box, wire an image in so the note travels with a picture, and read the note back out of the graph. But you can do that with any string primitive and a Show Text node, without importing a pack. There's no hidden behavior, no OCR, no VLM call, no API - the name is just wrong, or aspirational.

I'd normally say "this is a trap from a pack that's otherwise trying hard," and it is - but it's a friendly trap: it won't hurt anything, it just wastes your time if you expected real image-to-text.

The inputs and output

  • image - IMAGE in. Ignored except for the console log.
  • prompt - STRING, multiline. The thing that actually comes out.
  • text_output - STRING out. Your prompt, exactly as typed.

No lists, no optional inputs, no surprises beyond the big one.

Installing

Same as every node in this pack - ComfyUI Manager (search Comfyui_PDuse), or:

cd ComfyUI/custom_nodes
git clone https://github.com/7BEII/Comfyui_PDuse
cd Comfyui_PDuse
pip install -r requirements.txt

Restart ComfyUI. No models, no API keys, no caption models are installed by this pack - which should tell you everything about what this node can't do.

What to use instead

If you actually want image-to-text in ComfyUI, the honest options are: WD14 Tagger nodes (local, fast, tag-based), the Joy Caption / Florence-2 style nodes for natural-language descriptions, or a Show Text-based setup if you just wanted a labeled string. The KB's image-I/O and prompt-engineering docs cover the metadata-reading path - an embedded workflow in a PNG is text you can extract, which is a different and legitimate "image to text." This node's job, such as it is, is just being a labeled string holder. Set your expectations accordingly and it won't bite you.

CategoryPD_Nodes/ImageToText

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
promptSTRING请在此输入提示词

Outputs (1)

NameTypeDescription
text_outputSTRING