Nodes/EcoHash/EcoHash Dedicated LLM
ComfyUI Node

EcoHash Dedicated LLM

A Prompt Rewriter That Doesn't Eat Your VRAM

By ecohash-ai·Created 3 months ago·Updated 23 days ago· 1
EcoHash Dedicated LLM
    • STRING
    ◄model►
    ◄modeprompt_enhance►
    ◄text►
    ◄system_prompt►
    ◄temperature0.70►
    ◄max_tokens1024►
    ◄connection►

    A language model in the graph is now routine plumbing: type a rough idea, get a structured prompt back, feed that into the image node. The usual way to do it is a small local model - an 8B abliterated Llama or Qwen sitting behind a GGUF loader - and the reason is that a local model is free per call, uncensored, and offline.

    EcoHash Dedicated LLM is the other branch of that decision. It calls a chat-completion endpoint you've configured and returns one STRING. No GGUF, no second model competing with your diffusion checkpoint for VRAM, no unloading dance. What it buys you is quality you don't have to host. What it costs you is a network round-trip per run, per-call billing, and a filter you can't strip.

    If your job is "rewrite this into a better prompt," ask whether the API's gain over an 8B local model is worth those three things. For short structured rewriting it often isn't. For turning a paragraph of intent into something with real compositional detail - especially if your card can't hold two models at once - it's a clean trade.

    Four modes, one of which is a preset prompt

    mode is the input that does most of the work, and it defaults to prompt_enhance - which will surprise you if you expected chat.

    prompt_enhance prepends a fixed system instruction telling the model it's an expert prompt engineer for diffusion models and to rewrite your idea as one vivid, detailed English prompt covering subject, style, lighting, composition and quality tags, output only the prompt. translate_to_english does the same idea for non-English text. chat sends no system message at all, so you get the model's default personality and habits. custom is the only mode where your system_prompt field is actually read - in every other mode it's ignored, which the tooltip says plainly and people still miss.

    The preset prompts matter because they're the pack's opinion about the shape of a good prompt, and they include "output only the prompt" - the one guardrail that stops a chat model from replying "Here's your enhanced prompt:" and feeding that preamble into your conditioning. It's the failure mode that makes a badly-built enhancer worse than no enhancer.

    Inputs and outputs

    Beyond mode: text is your input, multi-line. temperature runs 0 to 2, default 0.7 - drop it toward 0.3 when you want the same prompt back rather than a different poem. max_tokens defaults to 1024, caps at 16384.

    model is free text again: the exact model ID your endpoint serves, not a catalogue pick. connection selects which saved endpoint to hit, which means you can run a language deployment and an image deployment on different URLs in the same workflow.

    Output is a single STRING. Convert the prompt widget on your image node to an input and wire this into it - that's the whole point of the node, and it works just as well feeding a local sampler as an API one.

    Install

    Manager → search EcoHash → install → restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ecohash-ai/ComfyUI-EcoHash.git
    cd ComfyUI-EcoHash
    pip install -r requirements.txt
    

    One dependency: requests. No weights, no CUDA, nothing that can break your torch install. Windows Portable users should install with the embedded interpreter (.\python_embeded\python.exe -m pip install -r ...) because that's the Python ComfyUI actually runs.

    Then the key, which is deliberately not a widget. Sidebar EcoHash → Connections → save the key → Add connection with a name and the API URL including its prefix. Or set ECOHASH_API_KEY and ECOHASH_DEDICATED_BASE_URL in the server process environment. Don't paste a key into a node field; it would be saved in the workflow JSON and handed to everyone you share it with.

    The errors this node gives you, and what they mean

    "Inference API returned no completion." The node treats an empty answer as an error rather than passing "" downstream, which is the right call - an empty string silently becomes an empty prompt and you get a nonsense image twenty seconds later with no clue why. The usual cause is a reasoning model: GLM and the newer Qwen thinking variants spend the whole max_tokens budget on internal reasoning and return nothing with finish_reason: length. The error message tells you to raise max_tokens (1024+). Take the advice, though the deeper fix is not using a reasoner for this job at all - prompt rewriting selects for small and obedient, and a model that thinks out loud is more likely to leak its scratch-work into your prompt.

    Same output every run. ComfyUI cached it. Change the text.

    A refusal in the middle of your workflow. API models filter. There's no abliterated weight you can swap to. If your workflow needs something the host won't produce, keep the rewrite local.

    401 / 402. Key or credit, in that order. Check whether an environment variable is overriding the key you thought you saved, because the precedence is env → saved settings → config.ini.

    One last observation, and treat it as calibration rather than warning: EcoHash is a vendor pack serving its own API, and I can find almost no third-party discussion of it anywhere. The code is short and readable - the preset prompts are five lines - so the responsible move is to look before you point it at a key.

    CategoryEcoHash/DedicatedModels

    Inputs (7)

    NameTypeDefaultDescription
    modelSTRINGExact model ID served by your dedicated endpoint; it need not appear in the public EcoHash catalog.
    modeCOMBOprompt_enhance4 options: chat, prompt_enhance, translate_to_english, custom
    textSTRING—
    system_promptSTRINGUsed when mode = custom
    temperatureFLOAT0.700–2—
    max_tokensINT10241–16384—
    connectionoptCOMBO1 options:

    Outputs (1)

    NameTypeDescription
    STRINGSTRING—