Nodes/ComfyUI-HttpRequestNodes/Retry Settings Node
ComfyUI Node

Retry Settings Node

Build your retry policy on the canvas

By ahkimkoo·Created 3 months ago·Updated 3 months ago· 1
Retry Settings Node
  • RETRY_SETTING
  • RETRY_SETTING
key
value3

APIs fail. Servers restart mid-request, jobs take longer than your patience, and a workflow that worked at 2pm is a wall of red at 2am. The Retry Settings Node is this pack's answer: a small node that builds a retry policy object, which you feed into a request node so it keeps trying on its own instead of dying on the first hiccup.

It works with the two retry-capable nodes in ComfyUI-HttpRequestNodes: the Rest Api Node and the Binary Post Request Node. (The plain Get Request Node and Post Request Node don't take a retry setting - if you need retries there, swap in Rest Api instead.)

What you set

  • key - a dropdown with four options:
    • max_retry - how many times to retry (default 3).
    • retry_interval - milliseconds between attempts (default 1000).
    • retry_until_status_code - keep retrying until the response has this status code (e.g. 200).
    • retry_until_not_status_code - keep retrying until the response isn't this code.
  • value - an integer. Note it's typed INT, so the default 3 reads as "retry three times" on max_retry and "3 ms" if you're not careful with retry_interval - set intervals in the thousands.
  • RETRY_SETTING - optional merge input, exactly like the Key/Value Node. Chain several Retry Settings nodes together and each one layers a key onto the policy: one for max_retry, one for retry_interval, one for the stop condition.

The output is a single RETRY_SETTING socket into whichever request node you're driving.

How the behavior actually plays out

Read the source in rest_api_node.py and the retry logic is pleasantly honest. Set only max_retry and it retries any non-2xx response. Set a specific status condition and it retries only while that condition isn't met. The trap in the docs: max_retry = 0 with a specific condition means retry forever - the code uses Python's maxint as the cap. That's the right choice for long-polling a job that you know will eventually finish, and a great way to hang a workflow if you attach it by accident.

Install

ComfyUI Manager → search ComfyUI-HttpRequestNodes → Install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/ahkimkoo/ComfyUI-HttpRequestNodes
pip install soundfile imageio imageio-ffmpeg

Category: RequestNode/KeyValue. Zero dependencies beyond ComfyUI itself. Start with two of these - max_retry = 3 and retry_interval = 1000 - wired into Rest Api, and you've got a polling-friendly request node you can stop worrying about.

CategoryRequestNode/KeyValue

Inputs (3)

NameTypeDefaultDescription
keyCOMBO4 options: max_retry, retry_interval, retry_until_status_code, retry_until_not_status_code
valueINT30–99999
RETRY_SETTINGoptRETRY_SETTING

Outputs (1)

NameTypeDescription
RETRY_SETTINGRETRY_SETTING