Default usage source to comfyui-api for direct API calls

This commit is contained in:
Robin Huang 2026-06-11 12:30:29 -07:00
parent b58af4279b
commit ee2cdaee5f

View File

@ -37,8 +37,12 @@ def get_auth_header(node_cls: type[IO.ComfyNode]) -> dict[str, str]:
def get_usage_source(node_cls: type[IO.ComfyNode]) -> str: def get_usage_source(node_cls: type[IO.ComfyNode]) -> str:
"""Source of the prompt that triggered this API node, defaulting to this server itself.""" """Source of the prompt that triggered this API node.
return node_cls.hidden.comfy_usage_source or "comfyui-server"
Defaults to "comfyui-api" when the submitting client didn't identify itself,
i.e. a direct API call to this server.
"""
return node_cls.hidden.comfy_usage_source or "comfyui-api"
def get_comfy_api_headers(node_cls: type[IO.ComfyNode]) -> dict[str, str]: def get_comfy_api_headers(node_cls: type[IO.ComfyNode]) -> dict[str, str]: