ComfyUI Node

Banana Endpoint Tester

A ping button for your Nano Banana gateway

By qianchi7·Created about a month ago·Updated about a month ago· 0
Banana Endpoint Tester
    • text
    api_base_url
    ping次数4

    The name does exactly what it says: this node tests whether a Nano Banana API gateway is worth talking to, before you spend a paid API call finding out. It generates nothing and needs no API key - it's the diagnostic sidekick to the pack's main generator node (Banana-API-3), and it exists because the whole point of this pack is pointing at third-party "OpenAI/Gemini-compatible" gateways, some of which are flaky, far away, or both.

    Mechanically, it runs your operating system's actual ping command against the host parsed out of the base URL, parses the output (Windows, macOS, and Linux formats, including localized output - the author's clearly been burned by a Chinese-locale Windows box), and returns a text summary. You get packets sent/received, packet-loss percentage, and min/avg/max latency. All of that from two inputs:

    • api_base_url - the endpoint to test; leave blank and it falls back to the config.ini default.
    • ping次数 (1–10, default 4) - the label is in Chinese, it means ping count. More pings, more stable averages, slower wait.

    One output, text, which you wire into a Show Text node to actually read. Don't wire it into anything else; it's a dead end by design.

    The honest caveat

    This is ICMP, not HTTP. It tells you the host answers pings and roughly how far away it is - it does not measure the API round trip. A gateway can silently drop ICMP while serving requests perfectly well, or accept pings and still hand you 502s. Treat it as a first-pass sanity check on a candidate endpoint, not a benchmark. If you want the same check inline with generation, the main generator node has a 测试延迟 toggle that runs this identical ping and prepends the results to its text output.

    Install

    It ships in the same pack as the generator, so there's no separate install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/qianchi7/ComfyUI-SillyDream-Banana.git
    pip install requests
    

    or ComfyUI Manager → Install via Git URL with that repo, then Restart. The only dependency is requests; no models, no config needed for the tester itself.

    When it lets you down

    • Some minimal Docker/container setups have no ping binary - the node reports exactly that, and there's no fallback.
    • Targets that block ICMP will show 100% loss or timeouts even when the API works. Don't assume the gateway is dead.
    • Because it's raw ICMP, 绕过代理 from the generator node doesn't apply here; there's no proxy to bypass.

    It's a thin little utility, but it's the right tool for the one problem every gateway user hits: "is it slow, or is it them?" If the ping looks fine and you still get timeouts, the problem is upstream - move on to the HTTP 4xx/5xx checklist in the pack README.

    CategoryBanana/tools

    Inputs (2)

    NameTypeDefaultDescription
    api_base_urlSTRING要测试的 API Base URL;留空则使用 config.ini 中的默认配置
    ping次数INT41–10ping 探测次数,次数越多结果越稳定,但会增加等待时间

    Outputs (1)

    NameTypeDescription
    textSTRING