Nodes/PoYo AI/PoYo Await Job
ComfyUI Node

PoYo Await Job

The polite way to wait for a job that's running on someone else's server

By PoyoAPI·Created about a month ago·Updated about a month ago· 0
PoYo Await Job
    • status
    • files_json
    • output_json
    • response_json
    task_id
    poll_interval3
    timeout3600

    Here's the situation: you submitted a job to PoYo's API, you've got a task_id in hand, and the work is happening on their servers - a video render, a long image job, whatever. Your ComfyUI graph has nothing left to do but stand around. PoYo_AwaitJob is the node that does the standing around for you, and it does it properly: it polls until the task finishes, fails, or you call it off.

    You'll wire this in after PoYo_SubmitJob or PoYo_RunModel (with wait_for_result off), feeding its task_id output into this node's task_id input. It's a waiter, not a generator - no pixels ever pass through it, which puts it firmly in the plumbing layer of your graph. The job statuses it watches come straight from PoYo with no translation: not_started, running, finished, or failed.

    Mechanism. Give it a task_id and it starts polling PoYo's status endpoint every poll_interval seconds (default 3, min 1, max 60). While the task is not_started or running it keeps sleeping and checking; the moment it sees finished it returns; the moment it sees failed it raises, so your workflow stops loudly instead of silently feeding garbage downstream. If nothing resolves within timeout seconds (default 3600, max 86400 - set lower if you want a dead job to trip the workflow quickly), it raises a timeout error. One nice touch: it drives ComfyUI's progress bar while it waits, so a long job looks like it's working instead of frozen.

    Inputs and outputs. Three inputs, all you'll touch: task_id (STRING), poll_interval, timeout. Outputs are four STRINGs straight out of the status response: status (the final state), files_json (the list of result files), output_json (the model's structured output), and response_json (the whole raw response, which is your escape hatch when you need to inspect something the other two don't cover). In practice most people just check status == "finished" and hand files_json to a loader or the Save Result File node.

    Install. Part of the poyo-comfyui pack, which needs ComfyUI 0.32.0+ (it uses the newer native node system). ComfyUI Manager (search "PoYo"), comfy node install poyo-nodes, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/PoyoAPI/poyo-comfyui.git
    

    then restart. No models, no heavy dependencies.

    Where people get burned. The obvious one is setting poll_interval to 1 on a long job - you're hammering an API that has a 429-and-backoff policy for a reason. The default 3 is fine. Bigger: if the task was submitted in a previous run and is already finished, this node returns instantly - that's correct, just don't expect it to re-run anything. And because the node is marked non-idempotent, ComfyUI won't cache it, so every workflow run does hit the API. Cheap, but it's per-call, and "waiting" isn't free forever when a model is metered by usage.

    CategoryPoYo AI/Jobs

    Inputs (3)

    NameTypeDefaultDescription
    task_idSTRING
    poll_intervalFLOAT31–60
    timeoutINT36001–86400

    Outputs (4)

    NameTypeDescription
    statusSTRING
    files_jsonSTRING
    output_jsonSTRING
    response_jsonSTRING