Nodes/Tikpan Official Nodes/工具|异步查询图片结果
ComfyUI Node

工具|异步查询图片结果

Pick up an async image job by ID — now, or after a polite wait

By htrert·Created 5 months ago·Updated 2 months ago· 1
工具|异步查询图片结果
    • Images
    • Stage_Log
    • Task_JSON
    • Image_Paths
    Task_ID
    Wait_Modereturn_now
    Max_Wait_Seconds600
    Poll_Interval_Seconds3

    You submitted a job with TikpanAsyncImageSubmitNode and walked away. Now you want the picture. This is the node that goes back for it: give it a Task_ID, and it queries the local task pool and returns whatever stage the job is in - either instantly, or after blocking until the render actually finishes. It's the "get the result" half of the async pair, and it's the node you'll wire into the output end of your workflow.

    It comes from ComfyUI-Tikpan-Pro, the official plugin for the Tikpan.com API aggregator. Like every node in that pack it runs nothing locally - your key, your prompt, your credits do the work on Tikpan's cloud, and this node is just the messenger picking up the delivery.

    How it works

    The task table lives in-process (with JSON backups in output/TikpanAsync/ so IDs survive restarts). Given a Task_ID, the node looks up the job and, depending on your Wait_Mode, either reports its current status or loops - sleeping Poll_Interval_Seconds between checks - until the task reaches success, error, or cancelled, or until Max_Wait_Seconds runs out.

    The two modes exist for a reason. return_now is for workflows where you don't want to hold the queue: run it, get a status snapshot, re-run later when it's done. wait_until_done is for the normal "I just want the picture in this graph" flow - it blocks the queue until the image lands, which is usually what a beginner actually wants.

    The inputs that matter

    • Task_ID - paste it from the Submit node's output. It's a long tikpan_async_… string, not the server's ID.
    • Wait_Mode - return_now (default) or wait_until_done.
    • Max_Wait_Seconds - 600 by default, up to 3600. If the job isn't done by then you get a timeout status and a black image.
    • Poll_Interval_Seconds - 3 by default. Every poll is a lightweight local lookup; you don't need to touch this.

    Outputs

    • Images - an IMAGE tensor when the job succeeded, ready to drop into any Save Image or preview node. If the task isn't finished, this comes back as a black image - the node always returns something, because ComfyUI needs a tensor. That's the one trap to remember: don't wire this to a critical downstream node and assume a black frame means success.
    • Image_Paths - the saved file paths on disk, one per line.
    • Stage_Log / Task_JSON - status, progress, error text, and the raw task record. These are your debugging window when a job errors.

    Install

    It ships with the whole pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/htrert/ComfyUI-Tikpan-Pro
    

    or use ComfyUI Manager (search Tikpan) and restart. No extra dependencies for this node - it's stock torch/PIL/json.

    Gotchas

    The black-image behavior is the thing that bites people: a job that's still running, or that errored, gives you a black IMAGE plus a log telling you why. Read the Stage_Log before you blame the node. And remember task IDs are local to your ComfyUI instance - losing the output/TikpanAsync folder orphans every in-flight job. Also worth keeping in mind as a general property of this pack's category: per-call metering and a key that leaves your machine, which is the standing trade for calling closed models like GPT-Image or Grok that you could never run locally anyway.

    Category👑 Tikpan 官方独家节点/06 任务与并发 Tools/异步任务池 Async Engine

    Inputs (4)

    NameTypeDefaultDescription
    Task_IDSTRING上一步『异步提交』返回的任务 ID
    Wait_ModeCOMBOreturn_nowreturn_now=立刻返回当前状态;wait_until_done=阻塞等待出片
    Max_Wait_SecondsINT6000–3600wait_until_done 模式的最长等待秒数
    Poll_Interval_SecondsINT31–60轮询任务状态的间隔秒数

    Outputs (4)

    NameTypeDescription
    ImagesIMAGE
    Stage_LogSTRING
    Task_JSONSTRING
    Image_PathsSTRING