mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-08 21:27:06 +08:00
Change to api.comfy.org
This commit is contained in:
parent
79c85a9452
commit
9bf1fc71d7
2
.github/workflows/update-api-stubs.yml
vendored
2
.github/workflows/update-api-stubs.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
||||
|
||||
- name: Generate API models
|
||||
run: |
|
||||
datamodel-codegen --use-subclass-enum --url https://stagingapi.comfy.org/openapi --output comfy_api_nodes/apis --output-model-type pydantic_v2.BaseModel
|
||||
datamodel-codegen --use-subclass-enum --url https://api.comfy.org/openapi --output comfy_api_nodes/apis --output-model-type pydantic_v2.BaseModel
|
||||
|
||||
- name: Check for changes
|
||||
id: git-check
|
||||
|
||||
@ -147,7 +147,7 @@ class ApiClient:
|
||||
logging.debug(f"[DEBUG] Files: {files}")
|
||||
logging.debug(f"[DEBUG] Params: {params}")
|
||||
logging.debug(f"[DEBUG] Json: {json}")
|
||||
|
||||
|
||||
try:
|
||||
# If files are present, use data parameter instead of json
|
||||
if files:
|
||||
@ -212,6 +212,8 @@ class ApiClient:
|
||||
error_message = "Unauthorized: Please login first to use this node."
|
||||
if status_code == 402:
|
||||
error_message = "Payment Required: Please add credits to your account to use this node."
|
||||
if status_code == 429:
|
||||
error_message = "Rate Limit Exceeded: Please try again later."
|
||||
raise Exception(error_message)
|
||||
|
||||
# Parse and return JSON response
|
||||
@ -263,7 +265,7 @@ class SynchronousOperation(Generic[T, R]):
|
||||
endpoint: ApiEndpoint[T, R],
|
||||
request: T,
|
||||
files: Optional[Dict[str, Any]] = None,
|
||||
api_base: str = "https://stagingapi.comfy.org",
|
||||
api_base: str = "https://api.comfy.org",
|
||||
auth_token: Optional[str] = None,
|
||||
timeout: float = 60.0,
|
||||
verify_ssl: bool = True,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user