The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
chore(api-nodes): increase default timeout for partner API node tasks (#13663)
Alexander Piskuncf758bd2566a
diff --git a/comfy_api_nodes/nodes_bytedance.py b/comfy_api_nodes/nodes_bytedance.pyindex fee0ab888..2f241a775 100644--- a/comfy_api_nodes/nodes_bytedance.py+++ b/comfy_api_nodes/nodes_bytedance.py@@ -1403,7 +1403,6 @@ class ByteDance2TextToVideoNode(IO.ComfyNode):status_extractor=lambda r: r.status,price_extractor=_seedance2_price_extractor(model_id, has_video_input=False),poll_interval=9,- max_poll_attempts=180,)return IO.NodeOutput(await download_url_to_video_output(response.content.video_url))@@ -1585,7 +1584,6 @@ class ByteDance2FirstLastFrameNode(IO.ComfyNode):status_extractor=lambda r: r.status,price_extractor=_seedance2_price_extractor(model_id, has_video_input=False),poll_interval=9,- max_poll_attempts=180,)return IO.NodeOutput(await download_url_to_video_output(response.content.video_url))@@ -1907,7 +1905,6 @@ class ByteDance2ReferenceNode(IO.ComfyNode):status_extractor=lambda r: r.status,price_extractor=_seedance2_price_extractor(model_id, has_video_input=has_video_input),poll_interval=9,- max_poll_attempts=180,)return IO.NodeOutput(await download_url_to_video_output(response.content.video_url))diff --git a/comfy_api_nodes/nodes_hitpaw.py b/comfy_api_nodes/nodes_hitpaw.pyindex 488080a74..bca5170e4 100644--- a/comfy_api_nodes/nodes_hitpaw.py+++ b/comfy_api_nodes/nodes_hitpaw.py@@ -178,7 +178,6 @@ class HitPawGeneralImageEnhance(IO.ComfyNode):status_extractor=lambda x: x.data.status,price_extractor=lambda x: request_price,poll_interval=10.0,- max_poll_attempts=480,)return IO.NodeOutput(await download_url_to_image_tensor(final_response.data.res_url))@@ -324,7 +323,6 @@ class HitPawVideoEnhance(IO.ComfyNode):status_extractor=lambda x: x.data.status,price_extractor=lambda x: request_price,poll_interval=10.0,- max_poll_attempts=320,)return IO.NodeOutput(await download_url_to_video_output(final_response.data.res_url))diff --git a/comfy_api_nodes/nodes_kling.py b/comfy_api_nodes/nodes_kling.pyindex 709b3726c..efd58fac3 100644--- a/comfy_api_nodes/nodes_kling.py+++ b/comfy_api_nodes/nodes_kling.py@@ -276,7 +276,6 @@ async def finish_omni_video_task(cls: type[IO.ComfyNode], response: TaskStatusRecls,ApiEndpoint(path=f"/proxy/kling/v1/videos/omni-video/{response.data.task_id}"),response_model=TaskStatusResponse,- max_poll_attempts=280,status_extractor=lambda r: (r.data.task_status if r.data else None),)return IO.NodeOutput(await download_url_to_video_output(final_response.data.task_result.videos[0].url))@@ -3062,7 +3061,6 @@ class KlingVideoNode(IO.ComfyNode):cls,ApiEndpoint(path=poll_path),response_model=TaskStatusResponse,- max_poll_attempts=280,status_extractor=lambda r: (r.data.task_status if r.data else None),)return IO.NodeOutput(await download_url_to_video_output(final_response.data.task_result.videos[0].url))@@ -3188,7 +3186,6 @@ class KlingFirstLastFrameNode(IO.ComfyNode):cls,ApiEndpoint(path=f"/proxy/kling/v1/videos/image2video/{response.data.task_id}"),response_model=TaskStatusResponse,- max_poll_attempts=280,status_extractor=lambda r: (r.data.task_status if r.data else None),)return IO.NodeOutput(await download_url_to_video_output(final_response.data.task_result.videos[0].url))diff --git a/comfy_api_nodes/nodes_magnific.py b/comfy_api_nodes/nodes_magnific.pyindex 0f53208d4..38b881fea 100644--- a/comfy_api_nodes/nodes_magnific.py+++ b/comfy_api_nodes/nodes_magnific.py@@ -230,7 +230,6 @@ class MagnificImageUpscalerCreativeNode(IO.ComfyNode):status_extractor=lambda x: x.status,price_extractor=lambda _: price_usd,poll_interval=10.0,- max_poll_attempts=480,)return IO.NodeOutput(await download_url_to_image_tensor(final_response.generated[0]))@@ -391,7 +390,6 @@ class MagnificImageUpscalerPreciseV2Node(IO.ComfyNode):status_extractor=lambda x: x.status,price_extractor=lambda _: price_usd,poll_interval=10.0,- max_poll_attempts=480,)return IO.NodeOutput(await download_url_to_image_tensor(final_response.generated[0]))@@ -541,7 +539,6 @@ class MagnificImageStyleTransferNode(IO.ComfyNode):response_model=TaskResponse,status_extractor=lambda x: x.status,poll_interval=10.0,- max_poll_attempts=480,)return IO.NodeOutput(await download_url_to_image_tensor(final_response.generated[0]))@@ -782,7 +779,6 @@ class MagnificImageRelightNode(IO.ComfyNode):response_model=TaskResponse,status_extractor=lambda x: x.status,poll_interval=10.0,- max_poll_attempts=480,)return IO.NodeOutput(await download_url_to_image_tensor(final_response.generated[0]))@@ -924,7 +920,6 @@ class MagnificImageSkinEnhancerNode(IO.ComfyNode):response_model=TaskResponse,status_extractor=lambda x: x.status,poll_interval=10.0,- max_poll_attempts=480,)return IO.NodeOutput(await download_url_to_image_tensor(final_response.generated[0]))diff --git a/comfy_api_nodes/nodes_topaz.py b/comfy_api_nodes/nodes_topaz.pyindex b18b31af1..fe3666ec9 100644--- a/comfy_api_nodes/nodes_topaz.py+++ b/comfy_api_nodes/nodes_topaz.py@@ -453,7 +453,6 @@ class TopazVideoEnhance(IO.ComfyNode):progress_extractor=lambda x: getattr(x, "progress", 0),price_extractor=lambda x: (x.estimates.cost[0] * 0.08 if x.estimates and x.estimates.cost[0] else None),poll_interval=10.0,- max_poll_attempts=320,)return IO.NodeOutput(await download_url_to_video_output(final_response.download.url))diff --git a/comfy_api_nodes/nodes_vidu.py b/comfy_api_nodes/nodes_vidu.pyindex f04407eb5..8d90cefeb 100644--- a/comfy_api_nodes/nodes_vidu.py+++ b/comfy_api_nodes/nodes_vidu.py@@ -38,7 +38,7 @@ async def execute_task(cls: type[IO.ComfyNode],vidu_endpoint: str,payload: TaskCreationRequest | TaskExtendCreationRequest | TaskMultiFrameCreationRequest,- max_poll_attempts: int = 320,+ max_poll_attempts: int = 480,) -> list[TaskResult]:task_creation_response = await sync_op(cls,@@ -1097,7 +1097,6 @@ class ViduExtendVideoNode(IO.ComfyNode):video_url=await upload_video_to_comfyapi(cls, video, wait_label="Uploading video"),images=[image_url] if image_url else None,),- max_poll_attempts=480,)return IO.NodeOutput(await download_url_to_video_output(results[0].url))diff --git a/comfy_api_nodes/nodes_wan.py b/comfy_api_nodes/nodes_wan.pyindex 7d7466fb6..68061bb5c 100644--- a/comfy_api_nodes/nodes_wan.py+++ b/comfy_api_nodes/nodes_wan.py@@ -818,7 +818,6 @@ class WanReferenceVideoApi(IO.ComfyNode):response_model=VideoTaskStatusResponse,status_extractor=lambda x: x.output.task_status,poll_interval=6,- max_poll_attempts=280,)return IO.NodeOutput(await download_url_to_video_output(response.output.video_url))diff --git a/comfy_api_nodes/nodes_wavespeed.py b/comfy_api_nodes/nodes_wavespeed.pyindex c59fafd3b..65e45f60a 100644--- a/comfy_api_nodes/nodes_wavespeed.py+++ b/comfy_api_nodes/nodes_wavespeed.py@@ -84,7 +84,6 @@ class WavespeedFlashVSRNode(IO.ComfyNode):response_model=TaskResultResponse,status_extractor=lambda x: "failed" if x.data is None else x.data.status,poll_interval=10.0,- max_poll_attempts=480,)if final_response.code != 200:raise ValueError(@@ -156,7 +155,6 @@ class WavespeedImageUpscaleNode(IO.ComfyNode):response_model=TaskResultResponse,status_extractor=lambda x: "failed" if x.data is None else x.data.status,poll_interval=10.0,- max_poll_attempts=480,)if final_response.code != 200:raise ValueError(diff --git a/comfy_api_nodes/util/client.py b/comfy_api_nodes/util/client.pyindex b0cf97ae4..a0b8d35e1 100644--- a/comfy_api_nodes/util/client.py+++ b/comfy_api_nodes/util/client.py@@ -148,7 +148,7 @@ async def poll_op(queued_statuses: list[str | int] | None = None,data: BaseModel | None = None,poll_interval: float = 5.0,- max_poll_attempts: int = 160,+ max_poll_attempts: int = 480,timeout_per_poll: float = 120.0,max_retries_per_poll: int = 10,retry_delay_per_poll: float = 1.0,@@ -254,7 +254,7 @@ async def poll_op_raw(queued_statuses: list[str | int] | None = None,data: dict[str, Any] | BaseModel | None = None,poll_interval: float = 5.0,- max_poll_attempts: int = 160,+ max_poll_attempts: int = 480,timeout_per_poll: float = 120.0,max_retries_per_poll: int = 10,retry_delay_per_poll: float = 1.0,