Merge branch 'master' into feat/api-nodes/heygen
This commit is contained in:
commit
0909f6c293
|
|
@ -274,6 +274,10 @@ def calculate_tokens_price(response: GeminiGenerateContentResponse) -> float | N
|
||||||
input_tokens_price = 0.25
|
input_tokens_price = 0.25
|
||||||
output_text_tokens_price = 1.50
|
output_text_tokens_price = 1.50
|
||||||
output_image_tokens_price = 0.0
|
output_image_tokens_price = 0.0
|
||||||
|
elif response.modelVersion == "gemini-3.5-flash":
|
||||||
|
input_tokens_price = 1.50
|
||||||
|
output_text_tokens_price = 9.0
|
||||||
|
output_image_tokens_price = 0.0
|
||||||
elif response.modelVersion in ("gemini-3-pro-image-preview", "gemini-3-pro-image"):
|
elif response.modelVersion in ("gemini-3-pro-image-preview", "gemini-3-pro-image"):
|
||||||
input_tokens_price = 2
|
input_tokens_price = 2
|
||||||
output_text_tokens_price = 12.0
|
output_text_tokens_price = 12.0
|
||||||
|
|
@ -619,11 +623,12 @@ class GeminiNode(IO.ComfyNode):
|
||||||
|
|
||||||
GEMINI_V2_MODELS: dict[str, str] = {
|
GEMINI_V2_MODELS: dict[str, str] = {
|
||||||
"Gemini 3.1 Pro": "gemini-3.1-pro-preview",
|
"Gemini 3.1 Pro": "gemini-3.1-pro-preview",
|
||||||
|
"Gemini 3.5 Flash": "gemini-3.5-flash",
|
||||||
"Gemini 3.1 Flash-Lite": "gemini-3.1-flash-lite-preview",
|
"Gemini 3.1 Flash-Lite": "gemini-3.1-flash-lite-preview",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _gemini_text_model_inputs(thinking_default: str) -> list[Input]:
|
def _gemini_text_model_inputs(thinking_default: str, thinking_options: list[str] | None = None) -> list[Input]:
|
||||||
"""Per-model inputs revealed by the model DynamicCombo (shared media + sampling controls)."""
|
"""Per-model inputs revealed by the model DynamicCombo (shared media + sampling controls)."""
|
||||||
return [
|
return [
|
||||||
IO.Autogrow.Input(
|
IO.Autogrow.Input(
|
||||||
|
|
@ -661,7 +666,7 @@ def _gemini_text_model_inputs(thinking_default: str) -> list[Input]:
|
||||||
),
|
),
|
||||||
IO.Combo.Input(
|
IO.Combo.Input(
|
||||||
"thinking_level",
|
"thinking_level",
|
||||||
options=["LOW", "HIGH"],
|
options=thinking_options or ["LOW", "HIGH"],
|
||||||
default=thinking_default,
|
default=thinking_default,
|
||||||
tooltip="How hard the model reasons internally before answering. "
|
tooltip="How hard the model reasons internally before answering. "
|
||||||
"HIGH improves quality on difficult tasks but costs more (thinking) tokens and is slower.",
|
"HIGH improves quality on difficult tasks but costs more (thinking) tokens and is slower.",
|
||||||
|
|
@ -719,6 +724,10 @@ class GeminiNodeV2(IO.ComfyNode):
|
||||||
IO.DynamicCombo.Input(
|
IO.DynamicCombo.Input(
|
||||||
"model",
|
"model",
|
||||||
options=[
|
options=[
|
||||||
|
IO.DynamicCombo.Option(
|
||||||
|
"Gemini 3.5 Flash",
|
||||||
|
_gemini_text_model_inputs("MEDIUM", ["MINIMAL", "LOW", "MEDIUM", "HIGH"]),
|
||||||
|
),
|
||||||
IO.DynamicCombo.Option("Gemini 3.1 Pro", _gemini_text_model_inputs("HIGH")),
|
IO.DynamicCombo.Option("Gemini 3.1 Pro", _gemini_text_model_inputs("HIGH")),
|
||||||
IO.DynamicCombo.Option("Gemini 3.1 Flash-Lite", _gemini_text_model_inputs("LOW")),
|
IO.DynamicCombo.Option("Gemini 3.1 Flash-Lite", _gemini_text_model_inputs("LOW")),
|
||||||
],
|
],
|
||||||
|
|
@ -759,7 +768,13 @@ class GeminiNodeV2(IO.ComfyNode):
|
||||||
"type": "list_usd",
|
"type": "list_usd",
|
||||||
"usd": [0.00025, 0.0015],
|
"usd": [0.00025, 0.0015],
|
||||||
"format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
|
"format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
|
||||||
} : {
|
}
|
||||||
|
: $contains($m, "3.5 flash") ? {
|
||||||
|
"type": "list_usd",
|
||||||
|
"usd": [0.0015, 0.009],
|
||||||
|
"format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
|
||||||
|
}
|
||||||
|
: {
|
||||||
"type": "list_usd",
|
"type": "list_usd",
|
||||||
"usd": [0.002, 0.012],
|
"usd": [0.002, 0.012],
|
||||||
"format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
|
"format": { "approximate": true, "separator": "-", "suffix": " per 1K tokens" }
|
||||||
|
|
|
||||||
51
openapi.yaml
51
openapi.yaml
|
|
@ -530,6 +530,10 @@ components:
|
||||||
description: Job creation timestamp (Unix timestamp in milliseconds)
|
description: Job creation timestamp (Unix timestamp in milliseconds)
|
||||||
format: int64
|
format: int64
|
||||||
type: integer
|
type: integer
|
||||||
|
execution_end_time:
|
||||||
|
description: Workflow execution completion timestamp (Unix milliseconds, only present for terminal states)
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
execution_error:
|
execution_error:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/ExecutionError'
|
- $ref: '#/components/schemas/ExecutionError'
|
||||||
|
|
@ -538,6 +542,10 @@ components:
|
||||||
additionalProperties: true
|
additionalProperties: true
|
||||||
description: Node-level execution metadata (only for terminal states)
|
description: Node-level execution metadata (only for terminal states)
|
||||||
type: object
|
type: object
|
||||||
|
execution_start_time:
|
||||||
|
description: Workflow execution start timestamp (Unix milliseconds, only present once execution has started)
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
execution_status:
|
execution_status:
|
||||||
additionalProperties: true
|
additionalProperties: true
|
||||||
description: ComfyUI execution status and timeline (only for terminal states)
|
description: ComfyUI execution status and timeline (only for terminal states)
|
||||||
|
|
@ -570,6 +578,12 @@ components:
|
||||||
description: Last update timestamp (Unix timestamp in milliseconds)
|
description: Last update timestamp (Unix timestamp in milliseconds)
|
||||||
format: int64
|
format: int64
|
||||||
type: integer
|
type: integer
|
||||||
|
user_id:
|
||||||
|
description: |
|
||||||
|
ID of the user that owns this job (see the `workspace_id`
|
||||||
|
description above for why this is always the caller's own id
|
||||||
|
on a successful response).
|
||||||
|
type: string
|
||||||
workflow:
|
workflow:
|
||||||
additionalProperties: true
|
additionalProperties: true
|
||||||
description: |
|
description: |
|
||||||
|
|
@ -583,6 +597,18 @@ components:
|
||||||
workflow_id:
|
workflow_id:
|
||||||
description: UUID identifying the workflow graph definition
|
description: UUID identifying the workflow graph definition
|
||||||
type: string
|
type: string
|
||||||
|
workspace_id:
|
||||||
|
description: |
|
||||||
|
ID of the workspace that owns this job. A successful (200)
|
||||||
|
response from this operation is only ever returned for the
|
||||||
|
caller's own job (see this operation's ownership-scoped
|
||||||
|
query), so this is always the caller's own workspace —
|
||||||
|
consumers that also need to correlate this job to its
|
||||||
|
live-progress broadcast channel (workspace+user scoped; see
|
||||||
|
the internal common/gateways/broadcast package) can use this
|
||||||
|
value directly rather than resolving their own identity a
|
||||||
|
second way.
|
||||||
|
type: string
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
- status
|
- status
|
||||||
|
|
@ -1565,7 +1591,13 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
default: true
|
default: true
|
||||||
type: boolean
|
type: boolean
|
||||||
- description: Filter assets by exact content hash.
|
- description: |
|
||||||
|
Filter assets by content hash, in the canonical `blake3:<hex>`
|
||||||
|
form. Matches regardless of which of this asset store's two
|
||||||
|
internal hash storage formats the matching row was written
|
||||||
|
under (the canonical form used by from-hash-created references,
|
||||||
|
or the raw `<hex>.<ext>`/bare `<hex>` storage key used by direct
|
||||||
|
uploads) — both represent the same content hash.
|
||||||
in: query
|
in: query
|
||||||
name: hash
|
name: hash
|
||||||
schema:
|
schema:
|
||||||
|
|
@ -2464,6 +2496,23 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
additionalProperties: true
|
additionalProperties: true
|
||||||
properties:
|
properties:
|
||||||
|
free_tier_balance:
|
||||||
|
description: Free-tier job allowance for an authenticated non-paid (FREE-tier) user in the rollout. Absent for paid users and unauthenticated requests. Synthesized from config before a grant row exists so a brand-new user still sees their full allowance.
|
||||||
|
properties:
|
||||||
|
allowance:
|
||||||
|
description: Total free jobs granted for the current period
|
||||||
|
type: integer
|
||||||
|
remaining:
|
||||||
|
description: Free jobs remaining (allowance - used, floored at 0)
|
||||||
|
type: integer
|
||||||
|
used:
|
||||||
|
description: Free jobs consumed so far
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- allowance
|
||||||
|
- used
|
||||||
|
- remaining
|
||||||
|
type: object
|
||||||
max_upload_size:
|
max_upload_size:
|
||||||
description: Maximum upload size in bytes
|
description: Maximum upload size in bytes
|
||||||
type: integer
|
type: integer
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue