mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-06-26 17:59:54 +08:00
Default usage source to comfyui-api for direct API calls
This commit is contained in:
parent
b58af4279b
commit
ee2cdaee5f
@ -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]:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user