Nodes/ComfyUI_EmAySee_CustomNodes/EmAySee Submit to Oobabooga API Node
ComfyUI Node

EmAySee Submit to Oobabooga API Node

Call your local text-generation-webui from inside a workflow — no API key needed

By EmAySee·Created about a year ago·Updated 4 months ago· 2
EmAySee Submit to Oobabooga API Node
    • api_response
    text_inputEnter your prompt for text-generation-webui here
    api_endpointhttp://127.0.0.1:5000/v1/completions
    temperature0.70
    top_p0.90
    top_k0
    typical_p1.00
    repetition_penalty1.10
    max_new_tokens200
    seed-1
    delay_seconds1.0
    show_api_responsefalse

    Run an LLM on your own machine and have ComfyUI talk to it - that's what this node is for. It sends your prompt to an Oobabooga text-generation-webui instance running the /v1/completions API, waits for the full reply, and hands the generated text back as a string. The classic use: a prompt-expansion step where an LLM takes your short idea and writes a rich prompt that then flows into your CLIP Text Encode. It's the same trick people do with hosted LLM APIs, except the model lives on your box and nobody's watching your prompt history.

    This is the no-key variant - it just POSTs and expects an open API. If your text-generation-webui runs with --api and no key requirement, this is your node.

    How it works

    Plain JSON over HTTP, non-streaming. The node builds a payload for the completions endpoint with your text_input as the prompt, plus the sampling knobs, sets stream: false explicitly, and does a requests.post after a small sleep (delay_seconds, default 1 - the author uses this as a polite throttle, and honestly it's a good habit with a local server that's also busy generating). The response is parsed for choices[0].text (with a couple of fallbacks), stripped, and returned as api_response.

    The inputs that matter

    • text_input - the prompt you send to the LLM. This is usually wired from another node rather than typed.
    • api_endpoint - change this. The default is http://127.0.0.1:5000/v1/completions, which is the conventional text-generation-webui API port on localhost. If your server runs elsewhere or on another port, this is the first thing to fix.
    • max_new_tokens - a dropdown from 50 to 800, default 200. Generation length, not input length.
    • temperature / top_p / top_k / typical_p / repetition_penalty - standard sampler knobs; the defaults (0.7 / 0.9 / 0 / 1.0 / 1.1) are the common oobabooga-safe starting points. top_k 0 means disabled.
    • seed - -1 for random.
    • show_api_response - prints the raw API JSON to the ComfyUI console. Turn it on once while debugging, off otherwise.

    The single output, api_response (STRING), goes into your prompt encoder or a text-combining node. Note this node is marked as an output node - it runs as a terminal in the graph, which is what you want for a "generate text here" step.

    Installing it

    Part of ComfyUI_EmAySee_CustomNodes - search Manager for the pack title, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/EmAySee/ComfyUI_EmAySee_CustomNodes
    

    Restart. There's no requirements.txt beyond what ComfyUI already has (requests is a standard dependency) and no model files - the LLM lives in text-generation-webui, not here.

    Where people get burned

    The node has no key, so it only works if your text-generation-webui API is open. In text-generation-webui, open the Server section of settings and make sure the API is enabled (--api flag, or enable in the UI), and if you're binding to localhost make sure ComfyUI can actually reach it. The classic failures: connection refused (server not started, or wrong port), and a 404 (endpoint path wrong - it must be /v1/completions, not /). One quirk from the source worth knowing: errors are returned as the string output rather than raising, so if your prompt node suddenly contains "Oobabooga API Request Error: …", read that string - it's the node telling you what broke.

    Categorysd

    Inputs (11)

    NameTypeDefaultDescription
    text_inputSTRINGEnter your prompt for text-generation-webui here
    api_endpointSTRINGhttp://127.0.0.1:5000/v1/completions
    temperatureFLOAT0.700.01–2
    top_pFLOAT0.900–1
    top_kINT00–200
    typical_pFLOAT1.000–1
    repetition_penaltyFLOAT1.100–2
    max_new_tokensCOMBO20016 options: 50, 100, 150, 200, 250, 300, +10
    seedINT-1
    delay_secondsFLOAT1.00–10
    show_api_responseBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    api_responseSTRING