Nodes/Image to Text Node/Image URL to Text
ComfyUI Node

Image URL to Text

Paste a link, get a caption — no API key required

By yolanother·Created 3 years ago·Updated 2 years ago· 20
Image URL to Text
    • STRING
    urlhttps://doubtech.ai/img/logo.png

    The remote-image version of the pack's caption node

    This is the URL-fed sibling of the pack's DTAIImageToTextNode. Paste a link, get a caption back. And despite the name, there's no API call anywhere in it - no key, no account, no server round-trip beyond fetching the image itself. The node grabs the file at the URL with requests, runs the same local BLIP captioning model as its sibling, and hands you a STRING describing what's in the picture.

    Why would you bother when the IMAGE-input version exists? Mostly workflow ergonomics. If your source images live on the web - a CivitAI page, a Discord CDN, your own host - this lets you skip the Load Image + save-to-disk detour and caption the thing directly from its URL.

    How it works

    requests.get(url, stream=True).raw feeds a PIL image into BLIP-large on CUDA, which generates an unconditional caption. Same import-time model load as the pack's other node: the first startup after install downloads roughly a gigabyte of weights from HuggingFace and pins them to the GPU with a hardcoded .to("cuda").

    The one code difference worth knowing: this node defines IS_CHANGED by comparing the stored URL, so re-running a workflow with the same URL actually re-runs the captioning instead of returning ComfyUI's cached result. That's deliberate - with a remote image, the content behind a URL can change even when the string doesn't.

    Inputs and outputs

    Everything you can set, from the schema:

    • url - a STRING, the image URL. Defaults to https://doubtech.ai/img/logo.png, which is not something you want to forget to replace. Single-line field.

    Output: one STRING - the caption, same as the IMAGE-input node.

    Installing it

    It ships in the same pack, so it installs in one go: ComfyUI Manager, search "Image to Text" (pack title "Image to Text Node"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/yolanother/DTAIImageToTextNode
    

    Restart, and don't trust the README's "Dependencies: ComfyUI" line - requirements.txt lists only requests, so if the pack won't load with a No module named 'transformers' error, fix it:

    pip install transformers
    

    First startup downloads the BLIP model.

    The catches

    • No HTTP status check. The code opens whatever comes back and hands it to PIL as an image. A dead link or a 404 page doesn't raise a clean error - it gets passed along as a "picture" and the whole thing throws downstream.
    • Internet required, obviously, and the hardcoded CUDA dependency means no CPU or Mac path.
    • The eager model load - same gigabyte download and VRAM footprint at startup as the sibling node, whether you use it or not.

    Should you use it?

    It's a niche utility - basically invisible in search (zero impressions), and honestly it only earns its keep if you caption remote images constantly. If you mostly work with local files, the IMAGE-input node plus Load Image covers you. And whichever you pick, know the caption quality is 2023-era BLIP; for serious captioning work, Florence-2 or WD14 taggers produce more usable output.

    CategoryDoubTech/Image/Image To Text

    Inputs (1)

    NameTypeDefaultDescription
    urlSTRINGhttps://doubtech.ai/img/logo.png

    Outputs (1)

    NameTypeDescription
    STRINGSTRING