ComfyUI Node

Task List

A dropdown so you don't have to type a Hugging Face task string by hand

By mediocreatmybest·Created about a year ago·Updated 12 months ago· 3
Task List
    • selected_task
    task_listimage-to-text

    This node doesn't do any real work - it's a dropdown that outputs a string. The reason it exists at all is that Model Loader's task field is free-text, and Hugging Face's pipeline() API (which this whole pack wraps) is picky about that string being an exact match. Type image-to-text with a trailing space, or img-to-text, and loading fails in a way that isn't obviously about the typo. Task List sidesteps that by giving you the pack's three anticipated tasks as an actual menu.

    How it works

    Pick one of three choices, get it back as selected_task, wire that straight into Model Loader's task input instead of typing it yourself.

    The inputs and outputs that matter

    • task_list (enum, default image-to-text) - the whole node. Three choices: image-to-text (a straightforward picture-in, caption-out task - what this pack's Caption Generator and the default BLIP model are built for), image-text-to-text (a model that takes both an image and some text input together), and visual-question-answering (ask a question about an image, get an answer back).

    Output is selected_task (STRING) - feed it into Model Loader.

    The honest caveat

    Picking image-text-to-text or visual-question-answering here doesn't mean the rest of this pack knows what to do with the result. Caption Generator's inputs - model_pipeline, image_batches, prepend_text/append_text, max_new_tokens - are shaped for plain image-to-text captioning. There's no field anywhere in it for a question to ask or a text prompt to pair with the image. So if you load a VQA-capable model via Model Loader with this task selected, you're loading the model correctly, but you'll need your own downstream logic to actually make use of the question-answering capability - Caption Generator as shipped isn't built to drive it. Stick with image-to-text unless you're extending the graph yourself.

    Installing it

    Through ComfyUI Manager: search ComfyUI-Transformers-Pipeline, install, restart. By hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/mediocreatmybest/ComfyUI-Transformers-Pipeline
    

    then restart. No downloads - it's a hardcoded list of three strings.

    Common issues & troubleshooting

    There isn't much that goes wrong with this node specifically - it's a dropdown. The trouble it prevents is upstream typos in Model Loader's task field, so the main mistake left is picking a task this pack's other nodes don't actually support end to end. If you selected image-text-to-text or visual-question-answering and Caption Generator isn't behaving the way you expected, that's the caveat above, not a bug - the model loaded, the pipeline just isn't wired to drive it the way a captioning-only setup is.

    CategoryTransformers Pipeline

    Inputs (1)

    NameTypeDefaultDescription
    task_listCOMBOimage-to-textList of available tasks.

    Outputs (1)

    NameTypeDescription
    selected_taskSTRING