ComfyUI Node

Shrug Connection

The one node that makes the whole pack work

By fblissjr·Created about a year ago·Updated 4 months ago· 25
Shrug Connection
    • connection
    base_urlhttp://localhost:8080
    model
    api_key
    admin_token
    timeout300

    Here's the thing about Shrug-Prompter that surprises people: it's not a standalone thing. The pack is a client for a local inference server called heylookitsanllm - an OpenAI-compatible, single-user LLM/VLM server built on Apple's MLX stack, usually running on a Mac somewhere on your network. This node is the plug that connects your graph to that server. Every other Shrug node that talks to the network (ShrugVLM, Shrug VLM Batch, Shrug ASR, Shrug Embeddings, Shrug Cache Control) takes the SHRUG_CONN object this one emits.

    The name makes it sound like a network doodad, but the important bit is what it isn't: it's not a cloud API. No key, no per-token bill, no data leaving your LAN. You're talking to your own model.

    How it works

    ShrugConnection builds a small client object (base URL + model + optional auth) and passes it downstream as a single SHRUG_CONN wire. Under the hood it uses httpx with a persistent connection reused across all the inference nodes in one workflow run, which is why a 10-node graph doesn't pay a fresh TLS handshake ten times.

    The fields, from the schema:

    • base_url - where the server lives. http://localhost:8080 by default; use https://your-llm-host when ComfyUI and the server are on different machines.
    • model - the model id. This one's special: a JS widget fetches the server's /v1/models endpoint and turns it into a dropdown (vision-capable models sorted first). If the server is unreachable, it falls back to plain free-text entry, which is how you'll first see it.
    • api_key (optional) - sent as Authorization: Bearer <key>. Vanilla heylookitsanllm ignores it; it's there for OpenAI-compatible targets.
    • admin_token (optional) - sent as X-Heylook-Admin-Token on admin endpoints only (currently just cache clear). Must match the server's HEYLOOK_ADMIN_TOKEN env var.
    • timeout (default 300s) - request timeout. If you're running long thinking-enabled generations on a small Mac, leave it high.

    The model field is mandatory - an empty one raises an error rather than guessing.

    The server bit you'll actually trip on

    The README points you at github.com/fbjr/heylookitsanllm, but the repo actually lives under github.com/fblissjr/heylookitsanllm - a stale-link typo. Get the server running first (it's the model side of this whole arrangement; the nodes here are just the client), then come back and set base_url. Same host: localhost works. Separate boxes: any reverse proxy (the author suggests Caddy) will do the TLS.

    How to install

    The pack installs once, and all ten nodes appear under the shrug category. In ComfyUI Manager, search for Shrug-Prompter and hit Install, then restart ComfyUI. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/fblissjr/shrug-prompter
    # then restart ComfyUI
    

    Dependencies are declared in pyproject.toml but are already present in any modern ComfyUI - httpx, orjson, pillow, torch, numpy. There's no heavy install and nothing to download into ComfyUI; the models live on the server. One real requirement: the pack registers through ComfyUI's V3 extension API (comfy_api.latest), so you need a reasonably current ComfyUI build. An old one just won't show the nodes.

    Common issues

    • The model dropdown is empty. That's the server not answering - check base_url, confirm heylookitsanllm is actually up, then type the model id manually if you're impatient.
    • "ShrugConnection: model is required." You cleared the model field. Pick one.
    • "Event loop is closed" on alternating runs. This was a real bug in early versions (ComfyUI spins up a fresh asyncio loop per run, which killed the pooled HTTP client). It's fixed upstream - update the pack if you see it.
    • Stale workflow after updating the pack. Schema changes don't migrate saved graphs; delete and re-add the node once.
    Categoryshrug

    Inputs (5)

    NameTypeDefaultDescription
    base_urlSTRINGhttp://localhost:8080Base URL of the heylookitsanllm server. Localhost by default; set to https://your-host for LAN use.
    modelSTRINGModel id. JS widget populates a dropdown via /shrug/get_models.
    api_keySTRINGOptional. Sent as `Authorization: Bearer <key>`. Ignored by vanilla heylookitsanllm.
    admin_tokenSTRINGOptional. Sent as `X-Heylook-Admin-Token` on admin endpoints only.
    timeoutINT3005–1800Request timeout in seconds.

    Outputs (1)

    NameTypeDescription
    connectionSHRUG_CONN