diff --git a/Makefile b/Makefile index 7344b2e8d2..e858a89e2b 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,7 @@ help: @echo "frontend-typegen Generate types for the frontend from the OpenAPI schema" @echo "installer-zip Build the installer .zip file for the current version" @echo "tag-release Tag the GitHub repository with the current version (use at release time only!)" + @echo "openapi Generate the OpenAPI schema for the app, outputting to stdout" # Runs ruff, fixing any safely-fixable errors and formatting ruff: @@ -70,3 +71,6 @@ installer-zip: tag-release: cd installer && ./tag_release.sh +# Generate the OpenAPI Schema for the app +openapi: + python scripts/generate_openapi_schema.py diff --git a/invokeai/app/api_app.py b/invokeai/app/api_app.py index b7da548377..e69d95af71 100644 --- a/invokeai/app/api_app.py +++ b/invokeai/app/api_app.py @@ -3,9 +3,7 @@ import logging import mimetypes import socket from contextlib import asynccontextmanager -from inspect import signature from pathlib import Path -from typing import Any import torch import uvicorn @@ -13,11 +11,9 @@ from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from fastapi.middleware.gzip import GZipMiddleware from fastapi.openapi.docs import get_redoc_html, get_swagger_ui_html -from fastapi.openapi.utils import get_openapi from fastapi.responses import HTMLResponse from fastapi_events.handlers.local import local_handler from fastapi_events.middleware import EventHandlerASGIMiddleware -from pydantic.json_schema import models_json_schema from torch.backends.mps import is_available as is_mps_available # for PyCharm: @@ -25,10 +21,8 @@ from torch.backends.mps import is_available as is_mps_available import invokeai.backend.util.hotfixes # noqa: F401 (monkeypatching on import) import invokeai.frontend.web as web_dir from invokeai.app.api.no_cache_staticfiles import NoCacheStaticFiles -from invokeai.app.invocations.model import ModelIdentifierField from invokeai.app.services.config.config_default import get_config -from invokeai.app.services.events.events_common import EventBase -from invokeai.app.services.session_processor.session_processor_common import ProgressImage +from invokeai.app.util.custom_openapi import get_openapi_func from invokeai.backend.util.devices import TorchDevice from ..backend.util.logging import InvokeAILogger @@ -45,11 +39,6 @@ from .api.routers import ( workflows, ) from .api.sockets import SocketIO -from .invocations.baseinvocation import ( - BaseInvocation, - UIConfigBase, -) -from .invocations.fields import InputFieldJSONSchemaExtra, OutputFieldJSONSchemaExtra app_config = get_config() @@ -119,84 +108,7 @@ app.include_router(app_info.app_router, prefix="/api") app.include_router(session_queue.session_queue_router, prefix="/api") app.include_router(workflows.workflows_router, prefix="/api") - -# Build a custom OpenAPI to include all outputs -# TODO: can outputs be included on metadata of invocation schemas somehow? -def custom_openapi() -> dict[str, Any]: - if app.openapi_schema: - return app.openapi_schema - openapi_schema = get_openapi( - title=app.title, - description="An API for invoking AI image operations", - version="1.0.0", - routes=app.routes, - separate_input_output_schemas=False, # https://fastapi.tiangolo.com/how-to/separate-openapi-schemas/ - ) - - # Add all outputs - all_invocations = BaseInvocation.get_invocations() - output_types = set() - output_type_titles = {} - for invoker in all_invocations: - output_type = signature(invoker.invoke).return_annotation - output_types.add(output_type) - - output_schemas = models_json_schema( - models=[(o, "serialization") for o in output_types], ref_template="#/components/schemas/{model}" - ) - for schema_key, output_schema in output_schemas[1]["$defs"].items(): - # TODO: note that we assume the schema_key here is the TYPE.__name__ - # This could break in some cases, figure out a better way to do it - output_type_titles[schema_key] = output_schema["title"] - openapi_schema["components"]["schemas"][schema_key] = output_schema - openapi_schema["components"]["schemas"][schema_key]["class"] = "output" - - # Some models don't end up in the schemas as standalone definitions - additional_schemas = models_json_schema( - [ - (UIConfigBase, "serialization"), - (InputFieldJSONSchemaExtra, "serialization"), - (OutputFieldJSONSchemaExtra, "serialization"), - (ModelIdentifierField, "serialization"), - (ProgressImage, "serialization"), - ], - ref_template="#/components/schemas/{model}", - ) - for schema_key, schema_json in additional_schemas[1]["$defs"].items(): - openapi_schema["components"]["schemas"][schema_key] = schema_json - - openapi_schema["components"]["schemas"]["InvocationOutputMap"] = { - "type": "object", - "properties": {}, - "required": [], - } - - # Add a reference to the output type to additionalProperties of the invoker schema - for invoker in all_invocations: - invoker_name = invoker.__name__ # type: ignore [attr-defined] # this is a valid attribute - output_type = signature(obj=invoker.invoke).return_annotation - output_type_title = output_type_titles[output_type.__name__] - invoker_schema = openapi_schema["components"]["schemas"][f"{invoker_name}"] - outputs_ref = {"$ref": f"#/components/schemas/{output_type_title}"} - invoker_schema["output"] = outputs_ref - openapi_schema["components"]["schemas"]["InvocationOutputMap"]["properties"][invoker.get_type()] = outputs_ref - openapi_schema["components"]["schemas"]["InvocationOutputMap"]["required"].append(invoker.get_type()) - invoker_schema["class"] = "invocation" - - # Add all event schemas - for event in sorted(EventBase.get_events(), key=lambda e: e.__name__): - json_schema = event.model_json_schema(mode="serialization", ref_template="#/components/schemas/{model}") - if "$defs" in json_schema: - for schema_key, schema in json_schema["$defs"].items(): - openapi_schema["components"]["schemas"][schema_key] = schema - del json_schema["$defs"] - openapi_schema["components"]["schemas"][event.__name__] = json_schema - - app.openapi_schema = openapi_schema - return app.openapi_schema - - -app.openapi = custom_openapi # type: ignore [method-assign] # this is a valid assignment +app.openapi = get_openapi_func(app) @app.get("/docs", include_in_schema=False) diff --git a/invokeai/app/invocations/baseinvocation.py b/invokeai/app/invocations/baseinvocation.py index 40c7b41cae..1d169f0a82 100644 --- a/invokeai/app/invocations/baseinvocation.py +++ b/invokeai/app/invocations/baseinvocation.py @@ -98,11 +98,13 @@ class BaseInvocationOutput(BaseModel): _output_classes: ClassVar[set[BaseInvocationOutput]] = set() _typeadapter: ClassVar[Optional[TypeAdapter[Any]]] = None + _typeadapter_needs_update: ClassVar[bool] = False @classmethod def register_output(cls, output: BaseInvocationOutput) -> None: """Registers an invocation output.""" cls._output_classes.add(output) + cls._typeadapter_needs_update = True @classmethod def get_outputs(cls) -> Iterable[BaseInvocationOutput]: @@ -112,11 +114,12 @@ class BaseInvocationOutput(BaseModel): @classmethod def get_typeadapter(cls) -> TypeAdapter[Any]: """Gets a pydantc TypeAdapter for the union of all invocation output types.""" - if not cls._typeadapter: - InvocationOutputsUnion = TypeAliasType( - "InvocationOutputsUnion", Annotated[Union[tuple(cls._output_classes)], Field(discriminator="type")] + if not cls._typeadapter or cls._typeadapter_needs_update: + AnyInvocationOutput = TypeAliasType( + "AnyInvocationOutput", Annotated[Union[tuple(cls._output_classes)], Field(discriminator="type")] ) - cls._typeadapter = TypeAdapter(InvocationOutputsUnion) + cls._typeadapter = TypeAdapter(AnyInvocationOutput) + cls._typeadapter_needs_update = False return cls._typeadapter @classmethod @@ -125,12 +128,13 @@ class BaseInvocationOutput(BaseModel): return (i.get_type() for i in BaseInvocationOutput.get_outputs()) @staticmethod - def json_schema_extra(schema: dict[str, Any], model_class: Type[BaseModel]) -> None: + def json_schema_extra(schema: dict[str, Any], model_class: Type[BaseInvocationOutput]) -> None: """Adds various UI-facing attributes to the invocation output's OpenAPI schema.""" # Because we use a pydantic Literal field with default value for the invocation type, # it will be typed as optional in the OpenAPI schema. Make it required manually. if "required" not in schema or not isinstance(schema["required"], list): schema["required"] = [] + schema["class"] = "output" schema["required"].extend(["type"]) @classmethod @@ -167,6 +171,7 @@ class BaseInvocation(ABC, BaseModel): _invocation_classes: ClassVar[set[BaseInvocation]] = set() _typeadapter: ClassVar[Optional[TypeAdapter[Any]]] = None + _typeadapter_needs_update: ClassVar[bool] = False @classmethod def get_type(cls) -> str: @@ -177,15 +182,17 @@ class BaseInvocation(ABC, BaseModel): def register_invocation(cls, invocation: BaseInvocation) -> None: """Registers an invocation.""" cls._invocation_classes.add(invocation) + cls._typeadapter_needs_update = True @classmethod def get_typeadapter(cls) -> TypeAdapter[Any]: """Gets a pydantc TypeAdapter for the union of all invocation types.""" - if not cls._typeadapter: - InvocationsUnion = TypeAliasType( - "InvocationsUnion", Annotated[Union[tuple(cls._invocation_classes)], Field(discriminator="type")] + if not cls._typeadapter or cls._typeadapter_needs_update: + AnyInvocation = TypeAliasType( + "AnyInvocation", Annotated[Union[tuple(cls._invocation_classes)], Field(discriminator="type")] ) - cls._typeadapter = TypeAdapter(InvocationsUnion) + cls._typeadapter = TypeAdapter(AnyInvocation) + cls._typeadapter_needs_update = False return cls._typeadapter @classmethod @@ -221,7 +228,7 @@ class BaseInvocation(ABC, BaseModel): return signature(cls.invoke).return_annotation @staticmethod - def json_schema_extra(schema: dict[str, Any], model_class: Type[BaseModel], *args, **kwargs) -> None: + def json_schema_extra(schema: dict[str, Any], model_class: Type[BaseInvocation]) -> None: """Adds various UI-facing attributes to the invocation's OpenAPI schema.""" uiconfig = cast(UIConfigBase | None, getattr(model_class, "UIConfig", None)) if uiconfig is not None: @@ -237,6 +244,7 @@ class BaseInvocation(ABC, BaseModel): schema["version"] = uiconfig.version if "required" not in schema or not isinstance(schema["required"], list): schema["required"] = [] + schema["class"] = "invocation" schema["required"].extend(["type", "id"]) @abstractmethod @@ -310,7 +318,7 @@ class BaseInvocation(ABC, BaseModel): protected_namespaces=(), validate_assignment=True, json_schema_extra=json_schema_extra, - json_schema_serialization_defaults_required=True, + json_schema_serialization_defaults_required=False, coerce_numbers_to_str=True, ) diff --git a/invokeai/app/services/events/events_common.py b/invokeai/app/services/events/events_common.py index 3ae4468b83..0adcaa2ab1 100644 --- a/invokeai/app/services/events/events_common.py +++ b/invokeai/app/services/events/events_common.py @@ -3,9 +3,8 @@ from typing import TYPE_CHECKING, Any, ClassVar, Coroutine, Generic, Optional, P from fastapi_events.handlers.local import local_handler from fastapi_events.registry.payload_schema import registry as payload_schema -from pydantic import BaseModel, ConfigDict, Field, SerializeAsAny, field_validator +from pydantic import BaseModel, ConfigDict, Field -from invokeai.app.invocations.baseinvocation import BaseInvocation, BaseInvocationOutput from invokeai.app.services.session_processor.session_processor_common import ProgressImage from invokeai.app.services.session_queue.session_queue_common import ( QUEUE_ITEM_STATUS, @@ -14,6 +13,7 @@ from invokeai.app.services.session_queue.session_queue_common import ( SessionQueueItem, SessionQueueStatus, ) +from invokeai.app.services.shared.graph import AnyInvocation, AnyInvocationOutput from invokeai.app.util.misc import get_timestamp from invokeai.backend.model_manager.config import AnyModelConfig, SubModelType from invokeai.backend.stable_diffusion.diffusers_pipeline import PipelineIntermediateState @@ -98,17 +98,9 @@ class InvocationEventBase(QueueItemEventBase): item_id: int = Field(description="The ID of the queue item") batch_id: str = Field(description="The ID of the queue batch") session_id: str = Field(description="The ID of the session (aka graph execution state)") - invocation: SerializeAsAny[BaseInvocation] = Field(description="The ID of the invocation") + invocation: AnyInvocation = Field(description="The ID of the invocation") invocation_source_id: str = Field(description="The ID of the prepared invocation's source node") - @field_validator("invocation", mode="plain") - @classmethod - def validate_invocation(cls, v: Any): - """Validates the invocation using the dynamic type adapter.""" - - invocation = BaseInvocation.get_typeadapter().validate_python(v) - return invocation - @payload_schema.register class InvocationStartedEvent(InvocationEventBase): @@ -117,7 +109,7 @@ class InvocationStartedEvent(InvocationEventBase): __event_name__ = "invocation_started" @classmethod - def build(cls, queue_item: SessionQueueItem, invocation: BaseInvocation) -> "InvocationStartedEvent": + def build(cls, queue_item: SessionQueueItem, invocation: AnyInvocation) -> "InvocationStartedEvent": return cls( queue_id=queue_item.queue_id, item_id=queue_item.item_id, @@ -144,7 +136,7 @@ class InvocationDenoiseProgressEvent(InvocationEventBase): def build( cls, queue_item: SessionQueueItem, - invocation: BaseInvocation, + invocation: AnyInvocation, intermediate_state: PipelineIntermediateState, progress_image: ProgressImage, ) -> "InvocationDenoiseProgressEvent": @@ -182,19 +174,11 @@ class InvocationCompleteEvent(InvocationEventBase): __event_name__ = "invocation_complete" - result: SerializeAsAny[BaseInvocationOutput] = Field(description="The result of the invocation") - - @field_validator("result", mode="plain") - @classmethod - def validate_results(cls, v: Any): - """Validates the invocation result using the dynamic type adapter.""" - - result = BaseInvocationOutput.get_typeadapter().validate_python(v) - return result + result: AnyInvocationOutput = Field(description="The result of the invocation") @classmethod def build( - cls, queue_item: SessionQueueItem, invocation: BaseInvocation, result: BaseInvocationOutput + cls, queue_item: SessionQueueItem, invocation: AnyInvocation, result: AnyInvocationOutput ) -> "InvocationCompleteEvent": return cls( queue_id=queue_item.queue_id, @@ -223,7 +207,7 @@ class InvocationErrorEvent(InvocationEventBase): def build( cls, queue_item: SessionQueueItem, - invocation: BaseInvocation, + invocation: AnyInvocation, error_type: str, error_message: str, error_traceback: str, diff --git a/invokeai/app/services/shared/graph.py b/invokeai/app/services/shared/graph.py index 8508d2484c..d745e73823 100644 --- a/invokeai/app/services/shared/graph.py +++ b/invokeai/app/services/shared/graph.py @@ -2,18 +2,19 @@ import copy import itertools -from typing import Annotated, Any, Optional, TypeVar, Union, get_args, get_origin, get_type_hints +from typing import Any, Optional, TypeVar, Union, get_args, get_origin, get_type_hints import networkx as nx from pydantic import ( BaseModel, + GetCoreSchemaHandler, GetJsonSchemaHandler, ValidationError, field_validator, ) from pydantic.fields import Field from pydantic.json_schema import JsonSchemaValue -from pydantic_core import CoreSchema +from pydantic_core import core_schema # Importing * is bad karma but needed here for node detection from invokeai.app.invocations import * # noqa: F401 F403 @@ -277,73 +278,58 @@ class CollectInvocation(BaseInvocation): return CollectInvocationOutput(collection=copy.copy(self.collection)) +class AnyInvocation(BaseInvocation): + @classmethod + def __get_pydantic_core_schema__(cls, source_type: Any, handler: GetCoreSchemaHandler) -> core_schema.CoreSchema: + def validate_invocation(v: Any) -> "AnyInvocation": + return BaseInvocation.get_typeadapter().validate_python(v) + + return core_schema.no_info_plain_validator_function(validate_invocation) + + @classmethod + def __get_pydantic_json_schema__( + cls, core_schema: core_schema.CoreSchema, handler: GetJsonSchemaHandler + ) -> JsonSchemaValue: + # Nodes are too powerful, we have to make our own OpenAPI schema manually + # No but really, because the schema is dynamic depending on loaded nodes, we need to generate it manually + oneOf: list[dict[str, str]] = [] + names = [i.__name__ for i in BaseInvocation.get_invocations()] + for name in sorted(names): + oneOf.append({"$ref": f"#/components/schemas/{name}"}) + return {"oneOf": oneOf} + + +class AnyInvocationOutput(BaseInvocationOutput): + @classmethod + def __get_pydantic_core_schema__(cls, source_type: Any, handler: GetCoreSchemaHandler): + def validate_invocation_output(v: Any) -> "AnyInvocationOutput": + return BaseInvocationOutput.get_typeadapter().validate_python(v) + + return core_schema.no_info_plain_validator_function(validate_invocation_output) + + @classmethod + def __get_pydantic_json_schema__( + cls, core_schema: core_schema.CoreSchema, handler: GetJsonSchemaHandler + ) -> JsonSchemaValue: + # Nodes are too powerful, we have to make our own OpenAPI schema manually + # No but really, because the schema is dynamic depending on loaded nodes, we need to generate it manually + + oneOf: list[dict[str, str]] = [] + names = [i.__name__ for i in BaseInvocationOutput.get_outputs()] + for name in sorted(names): + oneOf.append({"$ref": f"#/components/schemas/{name}"}) + return {"oneOf": oneOf} + + class Graph(BaseModel): id: str = Field(description="The id of this graph", default_factory=uuid_string) # TODO: use a list (and never use dict in a BaseModel) because pydantic/fastapi hates me - nodes: dict[str, BaseInvocation] = Field(description="The nodes in this graph", default_factory=dict) + nodes: dict[str, AnyInvocation] = Field(description="The nodes in this graph", default_factory=dict) edges: list[Edge] = Field( description="The connections between nodes and their fields in this graph", default_factory=list, ) - @field_validator("nodes", mode="plain") - @classmethod - def validate_nodes(cls, v: dict[str, Any]): - """Validates the nodes in the graph by retrieving a union of all node types and validating each node.""" - - # Invocations register themselves as their python modules are executed. The union of all invocations is - # constructed at runtime. We use pydantic to validate `Graph.nodes` using that union. - # - # It's possible that when `graph.py` is executed, not all invocation-containing modules will have executed. If - # we construct the invocation union as `graph.py` is executed, we may miss some invocations. Those missing - # invocations will cause a graph to fail if they are used. - # - # We can get around this by validating the nodes in the graph using a "plain" validator, which overrides the - # pydantic validation entirely. This allows us to validate the nodes using the union of invocations at runtime. - # - # This same pattern is used in `GraphExecutionState`. - - nodes: dict[str, BaseInvocation] = {} - typeadapter = BaseInvocation.get_typeadapter() - for node_id, node in v.items(): - nodes[node_id] = typeadapter.validate_python(node) - return nodes - - @classmethod - def __get_pydantic_json_schema__(cls, core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> JsonSchemaValue: - # We use a "plain" validator to validate the nodes in the graph. Pydantic is unable to create a JSON Schema for - # fields that use "plain" validators, so we have to hack around this. Also, we need to add all invocations to - # the generated schema as options for the `nodes` field. - # - # The workaround is to create a new BaseModel that has the same fields as `Graph` but without the validator and - # with the invocation union as the type for the `nodes` field. Pydantic then generates the JSON Schema as - # expected. - # - # You might be tempted to do something like this: - # - # ```py - # cloned_model = create_model(cls.__name__, __base__=cls, nodes=...) - # delattr(cloned_model, "validate_nodes") - # cloned_model.model_rebuild(force=True) - # json_schema = handler(cloned_model.__pydantic_core_schema__) - # ``` - # - # Unfortunately, this does not work. Calling `handler` here results in infinite recursion as pydantic attempts - # to build the JSON Schema for the cloned model. Instead, we have to manually clone the model. - # - # This same pattern is used in `GraphExecutionState`. - - class Graph(BaseModel): - id: Optional[str] = Field(default=None, description="The id of this graph") - nodes: dict[ - str, Annotated[Union[tuple(BaseInvocation._invocation_classes)], Field(discriminator="type")] - ] = Field(description="The nodes in this graph") - edges: list[Edge] = Field(description="The connections between nodes and their fields in this graph") - - json_schema = handler(Graph.__pydantic_core_schema__) - json_schema = handler.resolve_ref_schema(json_schema) - return json_schema - def add_node(self, node: BaseInvocation) -> None: """Adds a node to a graph @@ -774,7 +760,7 @@ class GraphExecutionState(BaseModel): ) # The results of executed nodes - results: dict[str, BaseInvocationOutput] = Field(description="The results of node executions", default_factory=dict) + results: dict[str, AnyInvocationOutput] = Field(description="The results of node executions", default_factory=dict) # Errors raised when executing nodes errors: dict[str, str] = Field(description="Errors raised when executing nodes", default_factory=dict) @@ -791,52 +777,12 @@ class GraphExecutionState(BaseModel): default_factory=dict, ) - @field_validator("results", mode="plain") - @classmethod - def validate_results(cls, v: dict[str, BaseInvocationOutput]): - """Validates the results in the GES by retrieving a union of all output types and validating each result.""" - - # See the comment in `Graph.validate_nodes` for an explanation of this logic. - results: dict[str, BaseInvocationOutput] = {} - typeadapter = BaseInvocationOutput.get_typeadapter() - for result_id, result in v.items(): - results[result_id] = typeadapter.validate_python(result) - return results - @field_validator("graph") def graph_is_valid(cls, v: Graph): """Validates that the graph is valid""" v.validate_self() return v - @classmethod - def __get_pydantic_json_schema__(cls, core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> JsonSchemaValue: - # See the comment in `Graph.__get_pydantic_json_schema__` for an explanation of this logic. - class GraphExecutionState(BaseModel): - """Tracks the state of a graph execution""" - - id: str = Field(description="The id of the execution state") - graph: Graph = Field(description="The graph being executed") - execution_graph: Graph = Field(description="The expanded graph of activated and executed nodes") - executed: set[str] = Field(description="The set of node ids that have been executed") - executed_history: list[str] = Field( - description="The list of node ids that have been executed, in order of execution" - ) - results: dict[ - str, Annotated[Union[tuple(BaseInvocationOutput._output_classes)], Field(discriminator="type")] - ] = Field(description="The results of node executions") - errors: dict[str, str] = Field(description="Errors raised when executing nodes") - prepared_source_mapping: dict[str, str] = Field( - description="The map of prepared nodes to original graph nodes" - ) - source_prepared_mapping: dict[str, set[str]] = Field( - description="The map of original graph nodes to prepared nodes" - ) - - json_schema = handler(GraphExecutionState.__pydantic_core_schema__) - json_schema = handler.resolve_ref_schema(json_schema) - return json_schema - def next(self) -> Optional[BaseInvocation]: """Gets the next node ready to execute.""" diff --git a/invokeai/app/util/custom_openapi.py b/invokeai/app/util/custom_openapi.py new file mode 100644 index 0000000000..50259c12cc --- /dev/null +++ b/invokeai/app/util/custom_openapi.py @@ -0,0 +1,116 @@ +from typing import Any, Callable, Optional + +from fastapi import FastAPI +from fastapi.openapi.utils import get_openapi +from pydantic.json_schema import models_json_schema + +from invokeai.app.invocations.baseinvocation import BaseInvocation, BaseInvocationOutput, UIConfigBase +from invokeai.app.invocations.fields import InputFieldJSONSchemaExtra, OutputFieldJSONSchemaExtra +from invokeai.app.invocations.model import ModelIdentifierField +from invokeai.app.services.events.events_common import EventBase +from invokeai.app.services.session_processor.session_processor_common import ProgressImage + + +def move_defs_to_top_level(openapi_schema: dict[str, Any], component_schema: dict[str, Any]) -> None: + """Moves a component schema's $defs to the top level of the openapi schema. Useful when generating a schema + for a single model that needs to be added back to the top level of the schema. Mutates openapi_schema and + component_schema.""" + + defs = component_schema.pop("$defs", {}) + for schema_key, json_schema in defs.items(): + if schema_key in openapi_schema["components"]["schemas"]: + continue + openapi_schema["components"]["schemas"][schema_key] = json_schema + + +def get_openapi_func( + app: FastAPI, post_transform: Optional[Callable[[dict[str, Any]], dict[str, Any]]] = None +) -> Callable[[], dict[str, Any]]: + """Gets the OpenAPI schema generator function. + + Args: + app (FastAPI): The FastAPI app to generate the schema for. + post_transform (Optional[Callable[[dict[str, Any]], dict[str, Any]]], optional): A function to apply to the + generated schema before returning it. Defaults to None. + + Returns: + Callable[[], dict[str, Any]]: The OpenAPI schema generator function. When first called, the generated schema is + cached in `app.openapi_schema`. On subsequent calls, the cached schema is returned. This caching behaviour + matches FastAPI's default schema generation caching. + """ + + def openapi() -> dict[str, Any]: + if app.openapi_schema: + return app.openapi_schema + + openapi_schema = get_openapi( + title=app.title, + description="An API for invoking AI image operations", + version="1.0.0", + routes=app.routes, + separate_input_output_schemas=False, # https://fastapi.tiangolo.com/how-to/separate-openapi-schemas/ + ) + + # We'll create a map of invocation type to output schema to make some types simpler on the client. + invocation_output_map_properties: dict[str, Any] = {} + invocation_output_map_required: list[str] = [] + + # We need to manually add all outputs to the schema - pydantic doesn't add them because they aren't used directly. + for output in BaseInvocationOutput.get_outputs(): + json_schema = output.model_json_schema(mode="serialization", ref_template="#/components/schemas/{model}") + move_defs_to_top_level(openapi_schema, json_schema) + openapi_schema["components"]["schemas"][output.__name__] = json_schema + + # Technically, invocations are added to the schema by pydantic, but we still need to manually set their output + # property, so we'll just do it all manually. + for invocation in BaseInvocation.get_invocations(): + json_schema = invocation.model_json_schema( + mode="serialization", ref_template="#/components/schemas/{model}" + ) + move_defs_to_top_level(openapi_schema, json_schema) + output_title = invocation.get_output_annotation().__name__ + outputs_ref = {"$ref": f"#/components/schemas/{output_title}"} + json_schema["output"] = outputs_ref + openapi_schema["components"]["schemas"][invocation.__name__] = json_schema + + # Add this invocation and its output to the output map + invocation_type = invocation.get_type() + invocation_output_map_properties[invocation_type] = json_schema["output"] + invocation_output_map_required.append(invocation_type) + + # Add the output map to the schema + openapi_schema["components"]["schemas"]["InvocationOutputMap"] = { + "type": "object", + "properties": invocation_output_map_properties, + "required": invocation_output_map_required, + } + + # Some models don't end up in the schemas as standalone definitions because they aren't used directly in the API. + # We need to add them manually here. WARNING: Pydantic can choke if you call `model.model_json_schema()` to get + # a schema. This has something to do with schema refs - not totally clear. For whatever reason, using + # `models_json_schema` seems to work fine. + additional_models = [ + *EventBase.get_events(), + UIConfigBase, + InputFieldJSONSchemaExtra, + OutputFieldJSONSchemaExtra, + ModelIdentifierField, + ProgressImage, + ] + + additional_schemas = models_json_schema( + [(m, "serialization") for m in additional_models], + ref_template="#/components/schemas/{model}", + ) + # additional_schemas[1] is a dict of $defs that we need to add to the top level of the schema + move_defs_to_top_level(openapi_schema, additional_schemas[1]) + + if post_transform is not None: + openapi_schema = post_transform(openapi_schema) + + openapi_schema["components"]["schemas"] = dict(sorted(openapi_schema["components"]["schemas"].items())) + + app.openapi_schema = openapi_schema + return app.openapi_schema + + return openapi diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/controlAdapterPreprocessor.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/controlAdapterPreprocessor.ts index 581146c25c..ba04947a2d 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/controlAdapterPreprocessor.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/controlAdapterPreprocessor.ts @@ -13,7 +13,6 @@ import { isControlAdapterLayer, } from 'features/controlLayers/store/controlLayersSlice'; import { CA_PROCESSOR_DATA } from 'features/controlLayers/util/controlAdapters'; -import { isImageOutput } from 'features/nodes/types/common'; import { toast } from 'features/toast/toast'; import { t } from 'i18next'; import { isEqual } from 'lodash-es'; @@ -139,7 +138,7 @@ export const addControlAdapterPreprocessor = (startAppListening: AppStartListeni // We still have to check the output type assert( - isImageOutput(invocationCompleteAction.payload.data.result), + invocationCompleteAction.payload.data.result.type === 'image_output', `Processor did not return an image output, got: ${invocationCompleteAction.payload.data.result}` ); const { image_name } = invocationCompleteAction.payload.data.result.image; diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/controlNetImageProcessed.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/controlNetImageProcessed.ts index 1e485b31d5..574dad00eb 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/controlNetImageProcessed.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/controlNetImageProcessed.ts @@ -9,7 +9,6 @@ import { selectControlAdapterById, } from 'features/controlAdapters/store/controlAdaptersSlice'; import { isControlNetOrT2IAdapter } from 'features/controlAdapters/store/types'; -import { isImageOutput } from 'features/nodes/types/common'; import { toast } from 'features/toast/toast'; import { t } from 'i18next'; import { imagesApi } from 'services/api/endpoints/images'; @@ -74,7 +73,7 @@ export const addControlNetImageProcessedListener = (startAppListening: AppStartL ); // We still have to check the output type - if (isImageOutput(invocationCompleteAction.payload.data.result)) { + if (invocationCompleteAction.payload.data.result.type === 'image_output') { const { image_name } = invocationCompleteAction.payload.data.result.image; // Wait for the ImageDTO to be received diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationComplete.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationComplete.ts index 1a04f9493a..2841493ca6 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationComplete.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/socketio/socketInvocationComplete.ts @@ -11,7 +11,6 @@ import { } from 'features/gallery/store/gallerySlice'; import { IMAGE_CATEGORIES } from 'features/gallery/store/types'; import { $nodeExecutionStates, upsertExecutionState } from 'features/nodes/hooks/useExecutionState'; -import { isImageOutput } from 'features/nodes/types/common'; import { zNodeStatus } from 'features/nodes/types/invocation'; import { CANVAS_OUTPUT } from 'features/nodes/util/graph/constants'; import { boardsApi } from 'services/api/endpoints/boards'; @@ -33,7 +32,7 @@ export const addInvocationCompleteEventListener = (startAppListening: AppStartLi const { result, invocation_source_id } = data; // This complete event has an associated image output - if (isImageOutput(data.result) && !nodeTypeDenylist.includes(data.invocation.type)) { + if (data.result.type === 'image_output' && !nodeTypeDenylist.includes(data.invocation.type)) { const { image_name } = data.result.image; const { canvas, gallery } = getState(); diff --git a/invokeai/frontend/web/src/features/nodes/components/sidePanel/inspector/InspectorOutputsTab.tsx b/invokeai/frontend/web/src/features/nodes/components/sidePanel/inspector/InspectorOutputsTab.tsx index d4150243b9..b0c6d778b8 100644 --- a/invokeai/frontend/web/src/features/nodes/components/sidePanel/inspector/InspectorOutputsTab.tsx +++ b/invokeai/frontend/web/src/features/nodes/components/sidePanel/inspector/InspectorOutputsTab.tsx @@ -11,8 +11,7 @@ import { selectLastSelectedNode } from 'features/nodes/store/selectors'; import { isInvocationNode } from 'features/nodes/types/invocation'; import { memo, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; -import type { ImageOutput } from 'services/api/types'; -import type { AnyResult } from 'services/events/types'; +import type { AnyInvocationOutput, ImageOutput } from 'services/api/types'; import ImageOutputPreview from './outputs/ImageOutputPreview'; @@ -66,4 +65,4 @@ const InspectorOutputsTab = () => { export default memo(InspectorOutputsTab); -const getKey = (result: AnyResult, i: number) => `${result.type}-${i}`; +const getKey = (result: AnyInvocationOutput, i: number) => `${result.type}-${i}`; diff --git a/invokeai/frontend/web/src/features/nodes/types/common.ts b/invokeai/frontend/web/src/features/nodes/types/common.ts index ca44259995..54e126af3a 100644 --- a/invokeai/frontend/web/src/features/nodes/types/common.ts +++ b/invokeai/frontend/web/src/features/nodes/types/common.ts @@ -144,5 +144,4 @@ const zImageOutput = z.object({ type: z.literal('image_output'), }); export type ImageOutput = z.infer; -export const isImageOutput = (output: unknown): output is ImageOutput => zImageOutput.safeParse(output).success; // #endregion diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/buildNodesGraph.ts b/invokeai/frontend/web/src/features/nodes/util/graph/buildNodesGraph.ts index 130da8bf15..094dc529de 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/buildNodesGraph.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/buildNodesGraph.ts @@ -1,8 +1,7 @@ import type { NodesState } from 'features/nodes/store/types'; import { isInvocationNode } from 'features/nodes/types/invocation'; import { omit, reduce } from 'lodash-es'; -import type { Graph } from 'services/api/types'; -import type { AnyInvocation } from 'services/events/types'; +import type { AnyInvocation, Graph } from 'services/api/types'; import { v4 as uuidv4 } from 'uuid'; /** diff --git a/invokeai/frontend/web/src/services/api/schema.ts b/invokeai/frontend/web/src/services/api/schema.ts index 67b39237b1..5482b57c0b 100644 --- a/invokeai/frontend/web/src/services/api/schema.ts +++ b/invokeai/frontend/web/src/services/api/schema.ts @@ -581,6 +581,7 @@ export type components = { * type * @default add * @constant + * @enum {string} */ type: "add"; }; @@ -606,7 +607,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The mask image to convert. */ + /** + * @description The mask image to convert. + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Invert @@ -618,6 +622,7 @@ export type components = { * type * @default alpha_mask_to_tensor * @constant + * @enum {string} */ type: "alpha_mask_to_tensor"; }; @@ -743,6 +748,7 @@ export type components = { * Type * @default basemetadata * @constant + * @enum {string} */ type?: "basemetadata"; }; @@ -793,6 +799,42 @@ export type components = { */ items?: (string | number)[]; }; + /** + * BatchEnqueuedEvent + * @description Event model for batch_enqueued + */ + BatchEnqueuedEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Queue Id + * @description The ID of the queue + */ + queue_id: string; + /** + * Batch Id + * @description The ID of the batch + */ + batch_id: string; + /** + * Enqueued + * @description The number of invocations enqueued + */ + enqueued: number; + /** + * Requested + * @description The number of invocations initially requested to be enqueued (may be less than enqueued if queue was full) + */ + requested: number; + /** + * Priority + * @description The priority of the batch + */ + priority: number; + }; /** BatchStatus */ BatchStatus: { /** @@ -841,9 +883,15 @@ export type components = { * @description Creates a blank image and forwards it to the pipeline */ BlankImageInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -895,6 +943,7 @@ export type components = { * type * @default blank_image * @constant + * @enum {string} */ type: "blank_image"; }; @@ -920,9 +969,15 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description Latents tensor */ + /** + * @description Latents tensor + * @default null + */ latents_a?: components["schemas"]["LatentsField"]; - /** @description Latents tensor */ + /** + * @description Latents tensor + * @default null + */ latents_b?: components["schemas"]["LatentsField"]; /** * Alpha @@ -934,6 +989,7 @@ export type components = { * type * @default lblend * @constant + * @enum {string} */ type: "lblend"; }; @@ -1205,6 +1261,7 @@ export type components = { * type * @default boolean_collection * @constant + * @enum {string} */ type: "boolean_collection"; }; @@ -1222,6 +1279,7 @@ export type components = { * type * @default boolean_collection_output * @constant + * @enum {string} */ type: "boolean_collection_output"; }; @@ -1257,6 +1315,7 @@ export type components = { * type * @default boolean * @constant + * @enum {string} */ type: "boolean"; }; @@ -1274,9 +1333,93 @@ export type components = { * type * @default boolean_output * @constant + * @enum {string} */ type: "boolean_output"; }; + /** + * BulkDownloadCompleteEvent + * @description Event model for bulk_download_complete + */ + BulkDownloadCompleteEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Bulk Download Id + * @description The ID of the bulk image download + */ + bulk_download_id: string; + /** + * Bulk Download Item Id + * @description The ID of the bulk image download item + */ + bulk_download_item_id: string; + /** + * Bulk Download Item Name + * @description The name of the bulk image download item + */ + bulk_download_item_name: string; + }; + /** + * BulkDownloadErrorEvent + * @description Event model for bulk_download_error + */ + BulkDownloadErrorEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Bulk Download Id + * @description The ID of the bulk image download + */ + bulk_download_id: string; + /** + * Bulk Download Item Id + * @description The ID of the bulk image download item + */ + bulk_download_item_id: string; + /** + * Bulk Download Item Name + * @description The name of the bulk image download item + */ + bulk_download_item_name: string; + /** + * Error + * @description The error message + */ + error: string; + }; + /** + * BulkDownloadStartedEvent + * @description Event model for bulk_download_started + */ + BulkDownloadStartedEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Bulk Download Id + * @description The ID of the bulk image download + */ + bulk_download_id: string; + /** + * Bulk Download Item Id + * @description The ID of the bulk image download item + */ + bulk_download_item_id: string; + /** + * Bulk Download Item Name + * @description The name of the bulk image download item + */ + bulk_download_item_name: string; + }; /** CLIPField */ CLIPField: { /** @description Info to load tokenizer submodel */ @@ -1308,6 +1451,7 @@ export type components = { * type * @default clip_output * @constant + * @enum {string} */ type: "clip_output"; }; @@ -1336,6 +1480,7 @@ export type components = { /** * CLIP * @description CLIP (tokenizer, text encoder, LoRAs) and skipped layer count + * @default null */ clip?: components["schemas"]["CLIPField"]; /** @@ -1348,6 +1493,7 @@ export type components = { * type * @default clip_skip * @constant + * @enum {string} */ type: "clip_skip"; }; @@ -1366,6 +1512,7 @@ export type components = { * type * @default clip_skip_output * @constant + * @enum {string} */ type: "clip_skip_output"; }; @@ -1399,7 +1546,6 @@ export type components = { /** * Description * @description Model description - * @default null */ description?: string | null; /** @@ -1412,18 +1558,17 @@ export type components = { /** * Source Api Response * @description The original API response from the source, as stringified JSON. - * @default null */ source_api_response?: string | null; /** * Cover Image * @description Url for image to preview model - * @default null */ cover_image?: string | null; /** * Format * @constant + * @enum {string} */ format: "diffusers"; /** @default */ @@ -1432,6 +1577,7 @@ export type components = { * Type * @default clip_vision * @constant + * @enum {string} */ type: "clip_vision"; }; @@ -1440,9 +1586,15 @@ export type components = { * @description Infills transparent areas of an image using OpenCV Inpainting */ CV2InfillInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -1461,12 +1613,16 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * type * @default infill_cv2 * @constant + * @enum {string} */ type: "infill_cv2"; }; @@ -1526,6 +1682,7 @@ export type components = { * type * @default calculate_image_tiles_even_split * @constant + * @enum {string} */ type: "calculate_image_tiles_even_split"; }; @@ -1585,6 +1742,7 @@ export type components = { * type * @default calculate_image_tiles * @constant + * @enum {string} */ type: "calculate_image_tiles"; }; @@ -1644,6 +1802,7 @@ export type components = { * type * @default calculate_image_tiles_min_overlap * @constant + * @enum {string} */ type: "calculate_image_tiles_min_overlap"; }; @@ -1658,6 +1817,7 @@ export type components = { * type * @default calculate_image_tiles_output * @constant + * @enum {string} */ type: "calculate_image_tiles_output"; }; @@ -1677,9 +1837,15 @@ export type components = { * @description Canny edge detection for ControlNet */ CannyImageProcessorInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -1698,7 +1864,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Detect Resolution @@ -1728,6 +1897,7 @@ export type components = { * type * @default canny_image_processor * @constant + * @enum {string} */ type: "canny_image_processor"; }; @@ -1736,9 +1906,15 @@ export type components = { * @description Combines two images by using the mask provided. Intended for use on the Unified Canvas. */ CanvasPasteBackInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -1757,11 +1933,20 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The source image */ + /** + * @description The source image + * @default null + */ source_image?: components["schemas"]["ImageField"]; - /** @description The target image */ + /** + * @description The target image + * @default null + */ target_image?: components["schemas"]["ImageField"]; - /** @description The mask to use when pasting */ + /** + * @description The mask to use when pasting + * @default null + */ mask?: components["schemas"]["ImageField"]; /** * Mask Blur @@ -1773,6 +1958,7 @@ export type components = { * type * @default canvas_paste_back * @constant + * @enum {string} */ type: "canvas_paste_back"; }; @@ -1798,7 +1984,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to crop */ + /** + * @description The image to crop + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Left @@ -1828,9 +2017,19 @@ export type components = { * type * @default img_pad_crop * @constant + * @enum {string} */ type: "img_pad_crop"; }; + /** + * Classification + * @description The classification of an Invocation. + * - `Stable`: The invocation, including its inputs/outputs and internal logic, is stable. You may build workflows with it, having confidence that they will not break because of a change in this invocation. + * - `Beta`: The invocation is not yet stable, but is planned to be stable in the future. Workflows built around this invocation may break, but we are committed to supporting this invocation long-term. + * - `Prototype`: The invocation is not yet stable and may be removed from the application at any time. Workflows built around this invocation may break, and we are *not* committed to supporting this invocation. + * @enum {string} + */ + Classification: "stable" | "beta" | "prototype"; /** * ClearResult * @description Result of clearing the session queue @@ -1867,6 +2066,7 @@ export type components = { /** * Collection Item * @description The item to collect (all inputs must be of the same type) + * @default null */ item?: unknown; /** @@ -1879,6 +2079,7 @@ export type components = { * type * @default collect * @constant + * @enum {string} */ type: "collect"; }; @@ -1893,6 +2094,7 @@ export type components = { * type * @default collect_output * @constant + * @enum {string} */ type: "collect_output"; }; @@ -1910,6 +2112,7 @@ export type components = { * type * @default color_collection_output * @constant + * @enum {string} */ type: "color_collection_output"; }; @@ -1919,9 +2122,15 @@ export type components = { * using a mask to only color-correct certain regions of the target image. */ ColorCorrectInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -1940,11 +2149,20 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to color-correct */ + /** + * @description The image to color-correct + * @default null + */ image?: components["schemas"]["ImageField"]; - /** @description Reference image for color-correction */ + /** + * @description Reference image for color-correction + * @default null + */ reference?: components["schemas"]["ImageField"]; - /** @description Mask to use when applying color-correction */ + /** + * @description Mask to use when applying color-correction + * @default null + */ mask?: components["schemas"]["ImageField"] | null; /** * Mask Blur Radius @@ -1956,6 +2174,7 @@ export type components = { * type * @default color_correct * @constant + * @enum {string} */ type: "color_correct"; }; @@ -2021,6 +2240,7 @@ export type components = { * type * @default color * @constant + * @enum {string} */ type: "color"; }; @@ -2029,9 +2249,15 @@ export type components = { * @description Generates a color map from the provided image */ ColorMapImageProcessorInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -2050,7 +2276,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Color Map Tile Size @@ -2062,6 +2291,7 @@ export type components = { * type * @default color_map_image_processor * @constant + * @enum {string} */ type: "color_map_image_processor"; }; @@ -2076,6 +2306,7 @@ export type components = { * type * @default color_output * @constant + * @enum {string} */ type: "color_output"; }; @@ -2110,14 +2341,19 @@ export type components = { /** * CLIP * @description CLIP (tokenizer, text encoder, LoRAs) and skipped layer count + * @default null */ clip?: components["schemas"]["CLIPField"]; - /** @description A mask defining the region that this conditioning prompt applies to. */ + /** + * @description A mask defining the region that this conditioning prompt applies to. + * @default null + */ mask?: components["schemas"]["TensorField"] | null; /** * type * @default compel * @constant + * @enum {string} */ type: "compel"; }; @@ -2153,6 +2389,7 @@ export type components = { * type * @default conditioning_collection * @constant + * @enum {string} */ type: "conditioning_collection"; }; @@ -2170,6 +2407,7 @@ export type components = { * type * @default conditioning_collection_output * @constant + * @enum {string} */ type: "conditioning_collection_output"; }; @@ -2211,12 +2449,16 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description Conditioning tensor */ + /** + * @description Conditioning tensor + * @default null + */ conditioning?: components["schemas"]["ConditioningField"]; /** * type * @default conditioning * @constant + * @enum {string} */ type: "conditioning"; }; @@ -2231,6 +2473,7 @@ export type components = { * type * @default conditioning_output * @constant + * @enum {string} */ type: "conditioning_output"; }; @@ -2239,9 +2482,15 @@ export type components = { * @description Applies content shuffle processing to image */ ContentShuffleImageProcessorInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -2260,7 +2509,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Detect Resolution @@ -2296,6 +2548,7 @@ export type components = { * type * @default content_shuffle_image_processor * @constant + * @enum {string} */ type: "content_shuffle_image_processor"; }; @@ -2348,10 +2601,7 @@ export type components = { * @description Model config for ControlNet models (diffusers version). */ ControlNetCheckpointConfig: { - /** - * @description Default settings for this model - * @default null - */ + /** @description Default settings for this model */ default_settings?: components["schemas"]["ControlAdapterDefaultSettings"] | null; /** * Key @@ -2378,7 +2628,6 @@ export type components = { /** * Description * @description Model description - * @default null */ description?: string | null; /** @@ -2391,19 +2640,18 @@ export type components = { /** * Source Api Response * @description The original API response from the source, as stringified JSON. - * @default null */ source_api_response?: string | null; /** * Cover Image * @description Url for image to preview model - * @default null */ cover_image?: string | null; /** * Format * @default checkpoint * @constant + * @enum {string} */ format: "checkpoint"; /** @@ -2420,6 +2668,7 @@ export type components = { * Type * @default controlnet * @constant + * @enum {string} */ type: "controlnet"; }; @@ -2428,10 +2677,7 @@ export type components = { * @description Model config for ControlNet models (diffusers version). */ ControlNetDiffusersConfig: { - /** - * @description Default settings for this model - * @default null - */ + /** @description Default settings for this model */ default_settings?: components["schemas"]["ControlAdapterDefaultSettings"] | null; /** * Key @@ -2458,7 +2704,6 @@ export type components = { /** * Description * @description Model description - * @default null */ description?: string | null; /** @@ -2471,19 +2716,18 @@ export type components = { /** * Source Api Response * @description The original API response from the source, as stringified JSON. - * @default null */ source_api_response?: string | null; /** * Cover Image * @description Url for image to preview model - * @default null */ cover_image?: string | null; /** * Format * @default diffusers * @constant + * @enum {string} */ format: "diffusers"; /** @default */ @@ -2492,6 +2736,7 @@ export type components = { * Type * @default controlnet * @constant + * @enum {string} */ type: "controlnet"; }; @@ -2517,9 +2762,15 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The control image */ + /** + * @description The control image + * @default null + */ image?: components["schemas"]["ImageField"]; - /** @description ControlNet model to load */ + /** + * @description ControlNet model to load + * @default null + */ control_model?: components["schemas"]["ModelIdentifierField"]; /** * Control Weight @@ -2557,6 +2808,7 @@ export type components = { * type * @default controlnet * @constant + * @enum {string} */ type: "controlnet"; }; @@ -2564,7 +2816,10 @@ export type components = { ControlNetMetadataField: { /** @description The control image */ image: components["schemas"]["ImageField"]; - /** @description The control image, after processing. */ + /** + * @description The control image, after processing. + * @default null + */ processed_image?: components["schemas"]["ImageField"] | null; /** @description The ControlNet model to use */ control_model: components["schemas"]["ModelIdentifierField"]; @@ -2612,6 +2867,7 @@ export type components = { * type * @default control_output * @constant + * @enum {string} */ type: "control_output"; }; @@ -2640,168 +2896,209 @@ export type components = { /** * Generation Mode * @description The generation mode that output this image + * @default null */ generation_mode?: ("txt2img" | "img2img" | "inpaint" | "outpaint" | "sdxl_txt2img" | "sdxl_img2img" | "sdxl_inpaint" | "sdxl_outpaint") | null; /** * Positive Prompt * @description The positive prompt parameter + * @default null */ positive_prompt?: string | null; /** * Negative Prompt * @description The negative prompt parameter + * @default null */ negative_prompt?: string | null; /** * Width * @description The width parameter + * @default null */ width?: number | null; /** * Height * @description The height parameter + * @default null */ height?: number | null; /** * Seed * @description The seed used for noise generation + * @default null */ seed?: number | null; /** * Rand Device * @description The device used for random number generation + * @default null */ rand_device?: string | null; /** * Cfg Scale * @description The classifier-free guidance scale parameter + * @default null */ cfg_scale?: number | null; /** * Cfg Rescale Multiplier * @description Rescale multiplier for CFG guidance, used for models trained with zero-terminal SNR + * @default null */ cfg_rescale_multiplier?: number | null; /** * Steps * @description The number of steps used for inference + * @default null */ steps?: number | null; /** * Scheduler * @description The scheduler used for inference + * @default null */ scheduler?: string | null; /** * Seamless X * @description Whether seamless tiling was used on the X axis + * @default null */ seamless_x?: boolean | null; /** * Seamless Y * @description Whether seamless tiling was used on the Y axis + * @default null */ seamless_y?: boolean | null; /** * Clip Skip * @description The number of skipped CLIP layers + * @default null */ clip_skip?: number | null; - /** @description The main model used for inference */ + /** + * @description The main model used for inference + * @default null + */ model?: components["schemas"]["ModelIdentifierField"] | null; /** * Controlnets * @description The ControlNets used for inference + * @default null */ controlnets?: components["schemas"]["ControlNetMetadataField"][] | null; /** * Ipadapters * @description The IP Adapters used for inference + * @default null */ ipAdapters?: components["schemas"]["IPAdapterMetadataField"][] | null; /** * T2Iadapters * @description The IP Adapters used for inference + * @default null */ t2iAdapters?: components["schemas"]["T2IAdapterMetadataField"][] | null; /** * Loras * @description The LoRAs used for inference + * @default null */ loras?: components["schemas"]["LoRAMetadataField"][] | null; /** * Strength * @description The strength used for latents-to-latents + * @default null */ strength?: number | null; /** * Init Image * @description The name of the initial image + * @default null */ init_image?: string | null; - /** @description The VAE used for decoding, if the main model's default was not used */ + /** + * @description The VAE used for decoding, if the main model's default was not used + * @default null + */ vae?: components["schemas"]["ModelIdentifierField"] | null; /** * Hrf Enabled * @description Whether or not high resolution fix was enabled. + * @default null */ hrf_enabled?: boolean | null; /** * Hrf Method * @description The high resolution fix upscale method. + * @default null */ hrf_method?: string | null; /** * Hrf Strength * @description The high resolution fix img2img strength used in the upscale pass. + * @default null */ hrf_strength?: number | null; /** * Positive Style Prompt * @description The positive style prompt parameter + * @default null */ positive_style_prompt?: string | null; /** * Negative Style Prompt * @description The negative style prompt parameter + * @default null */ negative_style_prompt?: string | null; - /** @description The SDXL Refiner model used */ + /** + * @description The SDXL Refiner model used + * @default null + */ refiner_model?: components["schemas"]["ModelIdentifierField"] | null; /** * Refiner Cfg Scale * @description The classifier-free guidance scale parameter used for the refiner + * @default null */ refiner_cfg_scale?: number | null; /** * Refiner Steps * @description The number of steps used for the refiner + * @default null */ refiner_steps?: number | null; /** * Refiner Scheduler * @description The scheduler used for the refiner + * @default null */ refiner_scheduler?: string | null; /** * Refiner Positive Aesthetic Score * @description The aesthetic score used for the refiner + * @default null */ refiner_positive_aesthetic_score?: number | null; /** * Refiner Negative Aesthetic Score * @description The aesthetic score used for the refiner + * @default null */ refiner_negative_aesthetic_score?: number | null; /** * Refiner Start * @description The start value used for refiner denoising + * @default null */ refiner_start?: number | null; /** * type * @default core_metadata * @constant + * @enum {string} */ type: "core_metadata"; [key: string]: unknown; @@ -2828,11 +3125,20 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description VAE */ + /** + * @description VAE + * @default null + */ vae?: components["schemas"]["VAEField"]; - /** @description Image which will be masked */ + /** + * @description Image which will be masked + * @default null + */ image?: components["schemas"]["ImageField"] | null; - /** @description The mask to use when pasting */ + /** + * @description The mask to use when pasting + * @default null + */ mask?: components["schemas"]["ImageField"]; /** * Tiled @@ -2850,6 +3156,7 @@ export type components = { * type * @default create_denoise_mask * @constant + * @enum {string} */ type: "create_denoise_mask"; }; @@ -2875,7 +3182,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description Image which will be masked */ + /** + * @description Image which will be masked + * @default null + */ mask?: components["schemas"]["ImageField"]; /** * Edge Radius @@ -2898,16 +3208,19 @@ export type components = { /** * [OPTIONAL] Image * @description OPTIONAL: Only connect for specialized Inpainting models, masked_latents will be generated from the image with the VAE + * @default null */ image?: components["schemas"]["ImageField"] | null; /** * [OPTIONAL] UNet * @description OPTIONAL: If the Unet is a specialized Inpainting model, masked_latents will be generated from the image with the VAE + * @default null */ unet?: components["schemas"]["UNetField"] | null; /** * [OPTIONAL] VAE * @description OPTIONAL: Only connect for specialized Inpainting models, masked_latents will be generated from the image with the VAE + * @default null */ vae?: components["schemas"]["VAEField"] | null; /** @@ -2926,6 +3239,7 @@ export type components = { * type * @default create_gradient_mask * @constant + * @enum {string} */ type: "create_gradient_mask"; }; @@ -2952,32 +3266,40 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description Latents tensor */ + /** + * @description Latents tensor + * @default null + */ latents?: components["schemas"]["LatentsField"]; /** * X * @description The left x coordinate (in px) of the crop rectangle in image space. This value will be converted to a dimension in latent space. + * @default null */ x?: number; /** * Y * @description The top y coordinate (in px) of the crop rectangle in image space. This value will be converted to a dimension in latent space. + * @default null */ y?: number; /** * Width * @description The width (in px) of the crop rectangle in image space. This value will be converted to a dimension in latent space. + * @default null */ width?: number; /** * Height * @description The height (in px) of the crop rectangle in image space. This value will be converted to a dimension in latent space. + * @default null */ height?: number; /** * type * @default crop_latents * @constant + * @enum {string} */ type: "crop_latents"; }; @@ -3004,9 +3326,15 @@ export type components = { * @description Simple inpaint using opencv. */ CvInpaintInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -3025,14 +3353,21 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to inpaint */ + /** + * @description The image to inpaint + * @default null + */ image?: components["schemas"]["ImageField"]; - /** @description The mask to use when inpainting */ + /** + * @description The mask to use when inpainting + * @default null + */ mask?: components["schemas"]["ImageField"]; /** * type * @default cv_inpaint * @constant + * @enum {string} */ type: "cv_inpaint"; }; @@ -3041,9 +3376,15 @@ export type components = { * @description Generates an openpose pose from an image using DWPose */ DWOpenposeImageProcessorInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -3062,7 +3403,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Draw Body @@ -3089,6 +3433,7 @@ export type components = { * type * @default dw_openpose_image_processor * @constant + * @enum {string} */ type: "dw_openpose_image_processor"; }; @@ -3140,14 +3485,19 @@ export type components = { /** * Positive Conditioning * @description Positive conditioning tensor + * @default null */ positive_conditioning?: components["schemas"]["ConditioningField"] | components["schemas"]["ConditioningField"][]; /** * Negative Conditioning * @description Negative conditioning tensor + * @default null */ negative_conditioning?: components["schemas"]["ConditioningField"] | components["schemas"]["ConditioningField"][]; - /** @description Noise tensor */ + /** + * @description Noise tensor + * @default null + */ noise?: components["schemas"]["LatentsField"] | null; /** * Steps @@ -3183,18 +3533,24 @@ export type components = { /** * UNet * @description UNet (scheduler, LoRAs) + * @default null */ unet?: components["schemas"]["UNetField"]; - /** Control */ + /** + * Control + * @default null + */ control?: components["schemas"]["ControlField"] | components["schemas"]["ControlField"][] | null; /** * IP-Adapter * @description IP-Adapter to apply + * @default null */ ip_adapter?: components["schemas"]["IPAdapterField"] | components["schemas"]["IPAdapterField"][] | null; /** * T2I-Adapter * @description T2I-Adapter(s) to apply + * @default null */ t2i_adapter?: components["schemas"]["T2IAdapterField"] | components["schemas"]["T2IAdapterField"][] | null; /** @@ -3203,14 +3559,21 @@ export type components = { * @default 0 */ cfg_rescale_multiplier?: number; - /** @description Latents tensor */ + /** + * @description Latents tensor + * @default null + */ latents?: components["schemas"]["LatentsField"] | null; - /** @description The mask to use for the operation */ + /** + * @description The mask to use for the operation + * @default null + */ denoise_mask?: components["schemas"]["DenoiseMaskField"] | null; /** * type * @default denoise_latents * @constant + * @enum {string} */ type: "denoise_latents"; }; @@ -3248,6 +3611,7 @@ export type components = { * type * @default denoise_mask_output * @constant + * @enum {string} */ type: "denoise_mask_output"; }; @@ -3256,9 +3620,15 @@ export type components = { * @description Generates a depth map based on the Depth Anything algorithm */ DepthAnythingImageProcessorInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -3277,7 +3647,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Model Size @@ -3296,6 +3669,7 @@ export type components = { * type * @default depth_anything_image_processor * @constant + * @enum {string} */ type: "depth_anything_image_processor"; }; @@ -3337,9 +3711,78 @@ export type components = { * type * @default div * @constant + * @enum {string} */ type: "div"; }; + /** + * DownloadCancelledEvent + * @description Event model for download_cancelled + */ + DownloadCancelledEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Source + * @description The source of the download + */ + source: string; + }; + /** + * DownloadCompleteEvent + * @description Event model for download_complete + */ + DownloadCompleteEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Source + * @description The source of the download + */ + source: string; + /** + * Download Path + * @description The local path where the download is saved + */ + download_path: string; + /** + * Total Bytes + * @description The total number of bytes downloaded + */ + total_bytes: number; + }; + /** + * DownloadErrorEvent + * @description Event model for download_error + */ + DownloadErrorEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Source + * @description The source of the download + */ + source: string; + /** + * Error Type + * @description The type of error + */ + error_type: string; + /** + * Error + * @description The error message + */ + error: string; + }; /** * DownloadJob * @description Class to monitor and control a model download request. @@ -3428,6 +3871,58 @@ export type components = { * @enum {string} */ DownloadJobStatus: "waiting" | "running" | "completed" | "cancelled" | "error"; + /** + * DownloadProgressEvent + * @description Event model for download_progress + */ + DownloadProgressEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Source + * @description The source of the download + */ + source: string; + /** + * Download Path + * @description The local path where the download is saved + */ + download_path: string; + /** + * Current Bytes + * @description The number of bytes downloaded so far + */ + current_bytes: number; + /** + * Total Bytes + * @description The total number of bytes to be downloaded + */ + total_bytes: number; + }; + /** + * DownloadStartedEvent + * @description Event model for download_started + */ + DownloadStartedEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Source + * @description The source of the download + */ + source: string; + /** + * Download Path + * @description The local path where the download is saved + */ + download_path: string; + }; /** * Dynamic Prompt * @description Parses a prompt using adieyal/dynamicprompts' random or combinatorial generator @@ -3453,6 +3948,7 @@ export type components = { /** * Prompt * @description The prompt to parse with dynamicprompts + * @default null */ prompt?: string; /** @@ -3471,6 +3967,7 @@ export type components = { * type * @default dynamic_prompt * @constant + * @enum {string} */ type: "dynamic_prompt"; }; @@ -3486,9 +3983,15 @@ export type components = { * @description Upscales an image using RealESRGAN. */ ESRGANInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -3507,7 +4010,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The input image */ + /** + * @description The input image + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Model Name @@ -3526,6 +4032,7 @@ export type components = { * type * @default esrgan * @constant + * @enum {string} */ type: "esrgan"; }; @@ -3586,9 +4093,15 @@ export type components = { * @description Outputs an image with detected face IDs printed on each face. For use with other FaceTools. */ FaceIdentifierInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -3607,7 +4120,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description Image to face detect */ + /** + * @description Image to face detect + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Minimum Confidence @@ -3625,6 +4141,7 @@ export type components = { * type * @default face_identifier * @constant + * @enum {string} */ type: "face_identifier"; }; @@ -3633,7 +4150,10 @@ export type components = { * @description Face mask creation using mediapipe face detection */ FaceMaskInvocation: { - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -3652,7 +4172,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description Image to face detect */ + /** + * @description Image to face detect + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Face Ids @@ -3694,6 +4217,7 @@ export type components = { * type * @default face_mask_detection * @constant + * @enum {string} */ type: "face_mask_detection"; }; @@ -3718,6 +4242,7 @@ export type components = { * type * @default face_mask_output * @constant + * @enum {string} */ type: "face_mask_output"; /** @description The output mask */ @@ -3728,7 +4253,10 @@ export type components = { * @description Bound, extract, and mask a face from an image using MediaPipe detection */ FaceOffInvocation: { - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -3747,7 +4275,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description Image for face detection */ + /** + * @description Image for face detection + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Face Id @@ -3789,6 +4320,7 @@ export type components = { * type * @default face_off * @constant + * @enum {string} */ type: "face_off"; }; @@ -3813,6 +4345,7 @@ export type components = { * type * @default face_off_output * @constant + * @enum {string} */ type: "face_off_output"; /** @description The output mask */ @@ -3828,6 +4361,24 @@ export type components = { */ y: number; }; + /** + * FieldKind + * @description The kind of field. + * - `Input`: An input field on a node. + * - `Output`: An output field on a node. + * - `Internal`: A field which is treated as an input, but cannot be used in node definitions. Metadata is + * one example. It is provided to nodes via the WithMetadata class, and we want to reserve the field name + * "metadata" for this on all nodes. `FieldKind` is used to short-circuit the field name validation logic, + * allowing "metadata" for that field. + * - `NodeAttribute`: The field is a node attribute. These are fields which are not inputs or outputs, + * but which are used to store information about the node. For example, the `id` and `type` fields are node + * attributes. + * + * The presence of this in `json_schema_extra["field_kind"]` is used when initializing node schemas on app + * startup, and when generating the OpenAPI schema for the workflow editor. + * @enum {string} + */ + FieldKind: "input" | "output" | "internal" | "node_attribute"; /** * Float Collection Primitive * @description A collection of float primitive values @@ -3860,6 +4411,7 @@ export type components = { * type * @default float_collection * @constant + * @enum {string} */ type: "float_collection"; }; @@ -3877,6 +4429,7 @@ export type components = { * type * @default float_collection_output * @constant + * @enum {string} */ type: "float_collection_output"; }; @@ -3912,6 +4465,7 @@ export type components = { * type * @default float * @constant + * @enum {string} */ type: "float"; }; @@ -3959,6 +4513,7 @@ export type components = { * type * @default float_range * @constant + * @enum {string} */ type: "float_range"; }; @@ -4007,6 +4562,7 @@ export type components = { * type * @default float_math * @constant + * @enum {string} */ type: "float_math"; }; @@ -4024,6 +4580,7 @@ export type components = { * type * @default float_output * @constant + * @enum {string} */ type: "float_output"; }; @@ -4072,6 +4629,7 @@ export type components = { * type * @default float_to_int * @constant + * @enum {string} */ type: "float_to_int"; }; @@ -4145,6 +4703,7 @@ export type components = { /** * UNet * @description UNet (scheduler, LoRAs) + * @default null */ unet?: components["schemas"]["UNetField"]; /** @@ -4175,6 +4734,7 @@ export type components = { * type * @default freeu * @constant + * @enum {string} */ type: "freeu"; }; @@ -4191,6 +4751,7 @@ export type components = { * type * @default gradient_mask_output * @constant + * @enum {string} */ type: "gradient_mask_output"; }; @@ -4200,19 +4761,19 @@ export type components = { * Id * @description The id of this graph */ - id?: string | null; + id?: string; /** * Nodes * @description The nodes in this graph */ - nodes: { - [key: string]: components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["LoRASelectorInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["InvertTensorMaskInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["ColorMapImageProcessorInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["LoRACollectionLoader"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["DWOpenposeImageProcessorInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["ImageMaskToTensorInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["AddInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["RectangleMaskInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["ModelIdentifierInvocation"] | components["schemas"]["DepthAnythingImageProcessorInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["AlphaMaskToTensorInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["SDXLLoRACollectionLoader"] | components["schemas"]["IterateInvocation"] | components["schemas"]["HeuristicResizeInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["StringReplaceInvocation"]; + nodes?: { + [key: string]: components["schemas"]["AddInvocation"] | components["schemas"]["AlphaMaskToTensorInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ColorMapImageProcessorInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["DWOpenposeImageProcessorInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["DepthAnythingImageProcessorInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["HeuristicResizeInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageMaskToTensorInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["InvertTensorMaskInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["LoRACollectionLoader"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["LoRASelectorInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["ModelIdentifierInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RectangleMaskInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLLoRACollectionLoader"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"]; }; /** * Edges * @description The connections between nodes and their fields in this graph */ - edges: components["schemas"]["Edge"][]; + edges?: components["schemas"]["Edge"][]; }; /** * GraphExecutionState @@ -4223,47 +4784,47 @@ export type components = { * Id * @description The id of the execution state */ - id: string; + id?: string; /** @description The graph being executed */ graph: components["schemas"]["Graph"]; /** @description The expanded graph of activated and executed nodes */ - execution_graph: components["schemas"]["Graph"]; + execution_graph?: components["schemas"]["Graph"]; /** * Executed * @description The set of node ids that have been executed */ - executed: string[]; + executed?: string[]; /** * Executed History * @description The list of node ids that have been executed, in order of execution */ - executed_history: string[]; + executed_history?: string[]; /** * Results * @description The results of node executions */ - results: { - [key: string]: components["schemas"]["SDXLRefinerModelLoaderOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["StringCollectionOutput"] | components["schemas"]["StringPosNegOutput"] | components["schemas"]["String2Output"] | components["schemas"]["LoRASelectorOutput"] | components["schemas"]["ModelIdentifierOutput"] | components["schemas"]["BooleanOutput"] | components["schemas"]["ImageOutput"] | components["schemas"]["IntegerOutput"] | components["schemas"]["IntegerCollectionOutput"] | components["schemas"]["LatentsCollectionOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["IPAdapterOutput"] | components["schemas"]["SDXLModelLoaderOutput"] | components["schemas"]["T2IAdapterOutput"] | components["schemas"]["MetadataItemOutput"] | components["schemas"]["ColorCollectionOutput"] | components["schemas"]["LoRALoaderOutput"] | components["schemas"]["MaskOutput"] | components["schemas"]["SchedulerOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["DenoiseMaskOutput"] | components["schemas"]["FaceMaskOutput"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["FloatOutput"] | components["schemas"]["StringOutput"] | components["schemas"]["IdealSizeOutput"] | components["schemas"]["ConditioningOutput"] | components["schemas"]["MetadataOutput"] | components["schemas"]["VAEOutput"] | components["schemas"]["BooleanCollectionOutput"] | components["schemas"]["CollectInvocationOutput"] | components["schemas"]["ControlOutput"] | components["schemas"]["TileToPropertiesOutput"] | components["schemas"]["IterateInvocationOutput"] | components["schemas"]["SDXLLoRALoaderOutput"] | components["schemas"]["CLIPOutput"] | components["schemas"]["FaceOffOutput"] | components["schemas"]["ColorOutput"] | components["schemas"]["PairTileImageOutput"] | components["schemas"]["CLIPSkipInvocationOutput"] | components["schemas"]["CalculateImageTilesOutput"] | components["schemas"]["SeamlessModeOutput"] | components["schemas"]["GradientMaskOutput"] | components["schemas"]["ImageCollectionOutput"] | components["schemas"]["UNetOutput"] | components["schemas"]["ConditioningCollectionOutput"]; + results?: { + [key: string]: components["schemas"]["BooleanCollectionOutput"] | components["schemas"]["BooleanOutput"] | components["schemas"]["CLIPOutput"] | components["schemas"]["CLIPSkipInvocationOutput"] | components["schemas"]["CalculateImageTilesOutput"] | components["schemas"]["CollectInvocationOutput"] | components["schemas"]["ColorCollectionOutput"] | components["schemas"]["ColorOutput"] | components["schemas"]["ConditioningCollectionOutput"] | components["schemas"]["ConditioningOutput"] | components["schemas"]["ControlOutput"] | components["schemas"]["DenoiseMaskOutput"] | components["schemas"]["FaceMaskOutput"] | components["schemas"]["FaceOffOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["FloatOutput"] | components["schemas"]["GradientMaskOutput"] | components["schemas"]["IPAdapterOutput"] | components["schemas"]["IdealSizeOutput"] | components["schemas"]["ImageCollectionOutput"] | components["schemas"]["ImageOutput"] | components["schemas"]["IntegerCollectionOutput"] | components["schemas"]["IntegerOutput"] | components["schemas"]["IterateInvocationOutput"] | components["schemas"]["LatentsCollectionOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["LoRALoaderOutput"] | components["schemas"]["LoRASelectorOutput"] | components["schemas"]["MaskOutput"] | components["schemas"]["MetadataItemOutput"] | components["schemas"]["MetadataOutput"] | components["schemas"]["ModelIdentifierOutput"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["PairTileImageOutput"] | components["schemas"]["SDXLLoRALoaderOutput"] | components["schemas"]["SDXLModelLoaderOutput"] | components["schemas"]["SDXLRefinerModelLoaderOutput"] | components["schemas"]["SchedulerOutput"] | components["schemas"]["SeamlessModeOutput"] | components["schemas"]["String2Output"] | components["schemas"]["StringCollectionOutput"] | components["schemas"]["StringOutput"] | components["schemas"]["StringPosNegOutput"] | components["schemas"]["T2IAdapterOutput"] | components["schemas"]["TileToPropertiesOutput"] | components["schemas"]["UNetOutput"] | components["schemas"]["VAEOutput"]; }; /** * Errors * @description Errors raised when executing nodes */ - errors: { + errors?: { [key: string]: string; }; /** * Prepared Source Mapping * @description The map of prepared nodes to original graph nodes */ - prepared_source_mapping: { + prepared_source_mapping?: { [key: string]: string; }; /** * Source Prepared Mapping * @description The map of original graph nodes to prepared nodes */ - source_prepared_mapping: { + source_prepared_mapping?: { [key: string]: string[]; }; }; @@ -4286,6 +4847,7 @@ export type components = { * Type * @default hf * @constant + * @enum {string} */ type?: "hf"; }; @@ -4299,9 +4861,15 @@ export type components = { * @description Applies HED edge detection to image */ HedImageProcessorInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -4320,7 +4888,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Detect Resolution @@ -4344,6 +4915,7 @@ export type components = { * type * @default hed_image_processor * @constant + * @enum {string} */ type: "hed_image_processor"; }; @@ -4369,7 +4941,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to resize */ + /** + * @description The image to resize + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Width @@ -4387,6 +4962,7 @@ export type components = { * type * @default heuristic_resize * @constant + * @enum {string} */ type: "heuristic_resize"; }; @@ -4409,6 +4985,7 @@ export type components = { * Type * @default huggingface * @constant + * @enum {string} */ type?: "huggingface"; /** @@ -4476,7 +5053,6 @@ export type components = { /** * Description * @description Model description - * @default null */ description?: string | null; /** @@ -4489,24 +5065,24 @@ export type components = { /** * Source Api Response * @description The original API response from the source, as stringified JSON. - * @default null */ source_api_response?: string | null; /** * Cover Image * @description Url for image to preview model - * @default null */ cover_image?: string | null; /** * Type * @default ip_adapter * @constant + * @enum {string} */ type: "ip_adapter"; /** * Format * @constant + * @enum {string} */ format: "checkpoint"; }; @@ -4576,11 +5152,13 @@ export type components = { /** * Image * @description The IP-Adapter image prompt(s). + * @default null */ image?: components["schemas"]["ImageField"] | components["schemas"]["ImageField"][]; /** * IP-Adapter Model * @description The IP-Adapter model. + * @default null */ ip_adapter_model?: components["schemas"]["ModelIdentifierField"]; /** @@ -4615,12 +5193,16 @@ export type components = { * @default 1 */ end_step_percent?: number; - /** @description A mask defining the region that this IP-Adapter applies to. */ + /** + * @description A mask defining the region that this IP-Adapter applies to. + * @default null + */ mask?: components["schemas"]["TensorField"] | null; /** * type * @default ip_adapter * @constant + * @enum {string} */ type: "ip_adapter"; }; @@ -4654,7 +5236,6 @@ export type components = { /** * Description * @description Model description - * @default null */ description?: string | null; /** @@ -4667,19 +5248,18 @@ export type components = { /** * Source Api Response * @description The original API response from the source, as stringified JSON. - * @default null */ source_api_response?: string | null; /** * Cover Image * @description Url for image to preview model - * @default null */ cover_image?: string | null; /** * Type * @default ip_adapter * @constant + * @enum {string} */ type: "ip_adapter"; /** Image Encoder Model Id */ @@ -4687,6 +5267,7 @@ export type components = { /** * Format * @constant + * @enum {string} */ format: "invokeai"; }; @@ -4738,6 +5319,7 @@ export type components = { * type * @default ip_adapter_output * @constant + * @enum {string} */ type: "ip_adapter_output"; }; @@ -4775,7 +5357,10 @@ export type components = { * @default 576 */ height?: number; - /** @description UNet (scheduler, LoRAs) */ + /** + * @description UNet (scheduler, LoRAs) + * @default null + */ unet?: components["schemas"]["UNetField"]; /** * Multiplier @@ -4787,6 +5372,7 @@ export type components = { * type * @default ideal_size * @constant + * @enum {string} */ type: "ideal_size"; }; @@ -4809,6 +5395,7 @@ export type components = { * type * @default ideal_size_output * @constant + * @enum {string} */ type: "ideal_size_output"; }; @@ -4817,9 +5404,15 @@ export type components = { * @description Blurs an image */ ImageBlurInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -4838,7 +5431,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to blur */ + /** + * @description The image to blur + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Radius @@ -4857,6 +5453,7 @@ export type components = { * type * @default img_blur * @constant + * @enum {string} */ type: "img_blur"; }; @@ -4877,9 +5474,15 @@ export type components = { * @description Gets a channel from an image. */ ImageChannelInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -4898,7 +5501,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to get the channel from */ + /** + * @description The image to get the channel from + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Channel @@ -4911,6 +5517,7 @@ export type components = { * type * @default img_chan * @constant + * @enum {string} */ type: "img_chan"; }; @@ -4919,9 +5526,15 @@ export type components = { * @description Scale a specific color channel of an image. */ ImageChannelMultiplyInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -4940,11 +5553,15 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to adjust */ + /** + * @description The image to adjust + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Channel * @description Which channel to adjust + * @default null * @enum {string} */ channel?: "Red (RGBA)" | "Green (RGBA)" | "Blue (RGBA)" | "Alpha (RGBA)" | "Cyan (CMYK)" | "Magenta (CMYK)" | "Yellow (CMYK)" | "Black (CMYK)" | "Hue (HSV)" | "Saturation (HSV)" | "Value (HSV)" | "Luminosity (LAB)" | "A (LAB)" | "B (LAB)" | "Y (YCbCr)" | "Cb (YCbCr)" | "Cr (YCbCr)"; @@ -4964,6 +5581,7 @@ export type components = { * type * @default img_channel_multiply * @constant + * @enum {string} */ type: "img_channel_multiply"; }; @@ -4972,9 +5590,15 @@ export type components = { * @description Add or subtract a value from a specific color channel of an image. */ ImageChannelOffsetInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -4993,11 +5617,15 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to adjust */ + /** + * @description The image to adjust + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Channel * @description Which channel to adjust + * @default null * @enum {string} */ channel?: "Red (RGBA)" | "Green (RGBA)" | "Blue (RGBA)" | "Alpha (RGBA)" | "Cyan (CMYK)" | "Magenta (CMYK)" | "Yellow (CMYK)" | "Black (CMYK)" | "Hue (HSV)" | "Saturation (HSV)" | "Value (HSV)" | "Luminosity (LAB)" | "A (LAB)" | "B (LAB)" | "Y (YCbCr)" | "Cb (YCbCr)" | "Cr (YCbCr)"; @@ -5011,6 +5639,7 @@ export type components = { * type * @default img_channel_offset * @constant + * @enum {string} */ type: "img_channel_offset"; }; @@ -5039,12 +5668,14 @@ export type components = { /** * Collection * @description The collection of image values + * @default null */ collection?: components["schemas"]["ImageField"][]; /** * type * @default image_collection * @constant + * @enum {string} */ type: "image_collection"; }; @@ -5062,6 +5693,7 @@ export type components = { * type * @default image_collection_output * @constant + * @enum {string} */ type: "image_collection_output"; }; @@ -5070,9 +5702,15 @@ export type components = { * @description Converts an image to a different mode. */ ImageConvertInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -5091,7 +5729,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to convert */ + /** + * @description The image to convert + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Mode @@ -5104,6 +5745,7 @@ export type components = { * type * @default img_conv * @constant + * @enum {string} */ type: "img_conv"; }; @@ -5112,9 +5754,15 @@ export type components = { * @description Crops an image to a specified box. The box can be outside of the image. */ ImageCropInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -5133,7 +5781,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to crop */ + /** + * @description The image to crop + * @default null + */ image?: components["schemas"]["ImageField"]; /** * X @@ -5163,6 +5814,7 @@ export type components = { * type * @default img_crop * @constant + * @enum {string} */ type: "img_crop"; }; @@ -5262,9 +5914,15 @@ export type components = { * @description Adjusts the Hue of an image. */ ImageHueAdjustmentInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -5283,7 +5941,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to adjust */ + /** + * @description The image to adjust + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Hue @@ -5295,6 +5956,7 @@ export type components = { * type * @default img_hue_adjust * @constant + * @enum {string} */ type: "img_hue_adjust"; }; @@ -5303,9 +5965,15 @@ export type components = { * @description Inverse linear interpolation of all pixels of an image */ ImageInverseLerpInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -5324,7 +5992,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to lerp */ + /** + * @description The image to lerp + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Min @@ -5342,6 +6013,7 @@ export type components = { * type * @default img_ilerp * @constant + * @enum {string} */ type: "img_ilerp"; }; @@ -5367,12 +6039,16 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to load */ + /** + * @description The image to load + * @default null + */ image?: components["schemas"]["ImageField"]; /** * type * @default image * @constant + * @enum {string} */ type: "image"; }; @@ -5381,9 +6057,15 @@ export type components = { * @description Linear interpolation of all pixels of an image */ ImageLerpInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -5402,7 +6084,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to lerp */ + /** + * @description The image to lerp + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Min @@ -5420,6 +6105,7 @@ export type components = { * type * @default img_lerp * @constant + * @enum {string} */ type: "img_lerp"; }; @@ -5428,7 +6114,10 @@ export type components = { * @description Convert a mask image to a tensor. Converts the image to grayscale and uses thresholding at the specified value. */ ImageMaskToTensorInvocation: { - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -5447,7 +6136,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The mask image to convert. */ + /** + * @description The mask image to convert. + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Cutoff @@ -5465,6 +6157,7 @@ export type components = { * type * @default image_mask_to_tensor * @constant + * @enum {string} */ type: "image_mask_to_tensor"; }; @@ -5473,9 +6166,15 @@ export type components = { * @description Multiplies two images together using `PIL.ImageChops.multiply()`. */ ImageMultiplyInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -5494,14 +6193,21 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The first image to multiply */ + /** + * @description The first image to multiply + * @default null + */ image1?: components["schemas"]["ImageField"]; - /** @description The second image to multiply */ + /** + * @description The second image to multiply + * @default null + */ image2?: components["schemas"]["ImageField"]; /** * type * @default img_mul * @constant + * @enum {string} */ type: "img_mul"; }; @@ -5510,9 +6216,15 @@ export type components = { * @description Add blur to NSFW-flagged images */ ImageNSFWBlurInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -5531,12 +6243,16 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to check */ + /** + * @description The image to check + * @default null + */ image?: components["schemas"]["ImageField"]; /** * type * @default img_nsfw * @constant + * @enum {string} */ type: "img_nsfw"; }; @@ -5561,6 +6277,7 @@ export type components = { * type * @default image_output * @constant + * @enum {string} */ type: "image_output"; }; @@ -5569,9 +6286,15 @@ export type components = { * @description Pastes an image into another image. */ ImagePasteInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -5590,11 +6313,20 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The base image */ + /** + * @description The base image + * @default null + */ base_image?: components["schemas"]["ImageField"]; - /** @description The image to paste */ + /** + * @description The image to paste + * @default null + */ image?: components["schemas"]["ImageField"]; - /** @description The mask to use when pasting */ + /** + * @description The mask to use when pasting + * @default null + */ mask?: components["schemas"]["ImageField"] | null; /** * X @@ -5618,6 +6350,7 @@ export type components = { * type * @default img_paste * @constant + * @enum {string} */ type: "img_paste"; }; @@ -5656,9 +6389,15 @@ export type components = { * @description Resizes an image to specific dimensions */ ImageResizeInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -5677,7 +6416,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to resize */ + /** + * @description The image to resize + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Width @@ -5702,6 +6444,7 @@ export type components = { * type * @default img_resize * @constant + * @enum {string} */ type: "img_resize"; }; @@ -5710,9 +6453,15 @@ export type components = { * @description Scales an image by a factor */ ImageScaleInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -5731,7 +6480,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to scale */ + /** + * @description The image to scale + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Scale Factor @@ -5750,6 +6502,7 @@ export type components = { * type * @default img_scale * @constant + * @enum {string} */ type: "img_scale"; }; @@ -5775,9 +6528,15 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to encode */ + /** + * @description The image to encode + * @default null + */ image?: components["schemas"]["ImageField"]; - /** @description VAE */ + /** + * @description VAE + * @default null + */ vae?: components["schemas"]["VAEField"]; /** * Tiled @@ -5795,6 +6554,7 @@ export type components = { * type * @default i2l * @constant + * @enum {string} */ type: "i2l"; }; @@ -5824,9 +6584,15 @@ export type components = { * @description Add an invisible watermark to an image */ ImageWatermarkInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -5845,7 +6611,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to check */ + /** + * @description The image to check + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Text @@ -5857,6 +6626,7 @@ export type components = { * type * @default img_watermark * @constant + * @enum {string} */ type: "img_watermark"; }; @@ -5886,9 +6656,15 @@ export type components = { * @description Infills transparent areas of an image with a solid color */ InfillColorInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -5907,7 +6683,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * @description The color to use to infill @@ -5923,6 +6702,7 @@ export type components = { * type * @default infill_rgba * @constant + * @enum {string} */ type: "infill_rgba"; }; @@ -5931,9 +6711,15 @@ export type components = { * @description Infills transparent areas of an image using the PatchMatch algorithm */ InfillPatchMatchInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -5952,7 +6738,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Downscale @@ -5971,6 +6760,7 @@ export type components = { * type * @default infill_patchmatch * @constant + * @enum {string} */ type: "infill_patchmatch"; }; @@ -5979,9 +6769,15 @@ export type components = { * @description Infills transparent areas of an image with tiles of the image */ InfillTileInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -6000,7 +6796,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Tile Size @@ -6018,9 +6817,61 @@ export type components = { * type * @default infill_tile * @constant + * @enum {string} */ type: "infill_tile"; }; + /** + * Input + * @description The type of input a field accepts. + * - `Input.Direct`: The field must have its value provided directly, when the invocation and field are instantiated. + * - `Input.Connection`: The field must have its value provided by a connection. + * - `Input.Any`: The field may have its value provided either directly or by a connection. + * @enum {string} + */ + Input: "connection" | "direct" | "any"; + /** + * InputFieldJSONSchemaExtra + * @description Extra attributes to be added to input fields and their OpenAPI schema. Used during graph execution, + * and by the workflow editor during schema parsing and UI rendering. + */ + InputFieldJSONSchemaExtra: { + input: components["schemas"]["Input"]; + /** Orig Required */ + orig_required: boolean; + field_kind: components["schemas"]["FieldKind"]; + /** + * Default + * @default null + */ + default: unknown; + /** + * Orig Default + * @default null + */ + orig_default: unknown; + /** + * Ui Hidden + * @default false + */ + ui_hidden: boolean; + /** @default null */ + ui_type: components["schemas"]["UIType"] | null; + /** @default null */ + ui_component: components["schemas"]["UIComponent"] | null; + /** + * Ui Order + * @default null + */ + ui_order: number | null; + /** + * Ui Choice Labels + * @default null + */ + ui_choice_labels: { + [key: string]: string; + } | null; + }; /** * InstallStatus * @description State of an install job running in the background. @@ -6059,6 +6910,7 @@ export type components = { * type * @default integer_collection * @constant + * @enum {string} */ type: "integer_collection"; }; @@ -6076,6 +6928,7 @@ export type components = { * type * @default integer_collection_output * @constant + * @enum {string} */ type: "integer_collection_output"; }; @@ -6111,6 +6964,7 @@ export type components = { * type * @default integer * @constant + * @enum {string} */ type: "integer"; }; @@ -6159,6 +7013,7 @@ export type components = { * type * @default integer_math * @constant + * @enum {string} */ type: "integer_math"; }; @@ -6176,6 +7031,7 @@ export type components = { * type * @default integer_output * @constant + * @enum {string} */ type: "integer_output"; }; @@ -6201,12 +7057,16 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The tensor mask to convert. */ + /** + * @description The tensor mask to convert. + * @default null + */ mask?: components["schemas"]["TensorField"]; /** * type * @default invert_tensor_mask * @constant + * @enum {string} */ type: "invert_tensor_mask"; }; @@ -6238,6 +7098,364 @@ export type components = { */ max_size: number; }; + /** + * InvocationCompleteEvent + * @description Event model for invocation_complete + */ + InvocationCompleteEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Queue Id + * @description The ID of the queue + */ + queue_id: string; + /** + * Item Id + * @description The ID of the queue item + */ + item_id: number; + /** + * Batch Id + * @description The ID of the queue batch + */ + batch_id: string; + /** + * Session Id + * @description The ID of the session (aka graph execution state) + */ + session_id: string; + /** + * Invocation + * @description The ID of the invocation + */ + invocation: components["schemas"]["AddInvocation"] | components["schemas"]["AlphaMaskToTensorInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ColorMapImageProcessorInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["DWOpenposeImageProcessorInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["DepthAnythingImageProcessorInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["HeuristicResizeInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageMaskToTensorInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["InvertTensorMaskInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["LoRACollectionLoader"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["LoRASelectorInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["ModelIdentifierInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RectangleMaskInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLLoRACollectionLoader"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"]; + /** + * Invocation Source Id + * @description The ID of the prepared invocation's source node + */ + invocation_source_id: string; + /** + * Result + * @description The result of the invocation + */ + result: components["schemas"]["BooleanCollectionOutput"] | components["schemas"]["BooleanOutput"] | components["schemas"]["CLIPOutput"] | components["schemas"]["CLIPSkipInvocationOutput"] | components["schemas"]["CalculateImageTilesOutput"] | components["schemas"]["CollectInvocationOutput"] | components["schemas"]["ColorCollectionOutput"] | components["schemas"]["ColorOutput"] | components["schemas"]["ConditioningCollectionOutput"] | components["schemas"]["ConditioningOutput"] | components["schemas"]["ControlOutput"] | components["schemas"]["DenoiseMaskOutput"] | components["schemas"]["FaceMaskOutput"] | components["schemas"]["FaceOffOutput"] | components["schemas"]["FloatCollectionOutput"] | components["schemas"]["FloatOutput"] | components["schemas"]["GradientMaskOutput"] | components["schemas"]["IPAdapterOutput"] | components["schemas"]["IdealSizeOutput"] | components["schemas"]["ImageCollectionOutput"] | components["schemas"]["ImageOutput"] | components["schemas"]["IntegerCollectionOutput"] | components["schemas"]["IntegerOutput"] | components["schemas"]["IterateInvocationOutput"] | components["schemas"]["LatentsCollectionOutput"] | components["schemas"]["LatentsOutput"] | components["schemas"]["LoRALoaderOutput"] | components["schemas"]["LoRASelectorOutput"] | components["schemas"]["MaskOutput"] | components["schemas"]["MetadataItemOutput"] | components["schemas"]["MetadataOutput"] | components["schemas"]["ModelIdentifierOutput"] | components["schemas"]["ModelLoaderOutput"] | components["schemas"]["NoiseOutput"] | components["schemas"]["PairTileImageOutput"] | components["schemas"]["SDXLLoRALoaderOutput"] | components["schemas"]["SDXLModelLoaderOutput"] | components["schemas"]["SDXLRefinerModelLoaderOutput"] | components["schemas"]["SchedulerOutput"] | components["schemas"]["SeamlessModeOutput"] | components["schemas"]["String2Output"] | components["schemas"]["StringCollectionOutput"] | components["schemas"]["StringOutput"] | components["schemas"]["StringPosNegOutput"] | components["schemas"]["T2IAdapterOutput"] | components["schemas"]["TileToPropertiesOutput"] | components["schemas"]["UNetOutput"] | components["schemas"]["VAEOutput"]; + }; + /** + * InvocationDenoiseProgressEvent + * @description Event model for invocation_denoise_progress + */ + InvocationDenoiseProgressEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Queue Id + * @description The ID of the queue + */ + queue_id: string; + /** + * Item Id + * @description The ID of the queue item + */ + item_id: number; + /** + * Batch Id + * @description The ID of the queue batch + */ + batch_id: string; + /** + * Session Id + * @description The ID of the session (aka graph execution state) + */ + session_id: string; + /** + * Invocation + * @description The ID of the invocation + */ + invocation: components["schemas"]["AddInvocation"] | components["schemas"]["AlphaMaskToTensorInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ColorMapImageProcessorInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["DWOpenposeImageProcessorInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["DepthAnythingImageProcessorInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["HeuristicResizeInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageMaskToTensorInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["InvertTensorMaskInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["LoRACollectionLoader"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["LoRASelectorInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["ModelIdentifierInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RectangleMaskInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLLoRACollectionLoader"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"]; + /** + * Invocation Source Id + * @description The ID of the prepared invocation's source node + */ + invocation_source_id: string; + /** @description The progress image sent at each step during processing */ + progress_image: components["schemas"]["ProgressImage"]; + /** + * Step + * @description The current step of the invocation + */ + step: number; + /** + * Total Steps + * @description The total number of steps in the invocation + */ + total_steps: number; + /** + * Order + * @description The order of the invocation in the session + */ + order: number; + /** + * Percentage + * @description The percentage of completion of the invocation + */ + percentage: number; + }; + /** + * InvocationErrorEvent + * @description Event model for invocation_error + */ + InvocationErrorEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Queue Id + * @description The ID of the queue + */ + queue_id: string; + /** + * Item Id + * @description The ID of the queue item + */ + item_id: number; + /** + * Batch Id + * @description The ID of the queue batch + */ + batch_id: string; + /** + * Session Id + * @description The ID of the session (aka graph execution state) + */ + session_id: string; + /** + * Invocation + * @description The ID of the invocation + */ + invocation: components["schemas"]["AddInvocation"] | components["schemas"]["AlphaMaskToTensorInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ColorMapImageProcessorInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["DWOpenposeImageProcessorInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["DepthAnythingImageProcessorInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["HeuristicResizeInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageMaskToTensorInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["InvertTensorMaskInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["LoRACollectionLoader"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["LoRASelectorInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["ModelIdentifierInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RectangleMaskInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLLoRACollectionLoader"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"]; + /** + * Invocation Source Id + * @description The ID of the prepared invocation's source node + */ + invocation_source_id: string; + /** + * Error Type + * @description The error type + */ + error_type: string; + /** + * Error Message + * @description The error message + */ + error_message: string; + /** + * Error Traceback + * @description The error traceback + */ + error_traceback: string; + /** + * User Id + * @description The ID of the user who created the invocation + * @default null + */ + user_id: string | null; + /** + * Project Id + * @description The ID of the user who created the invocation + * @default null + */ + project_id: string | null; + }; + InvocationOutputMap: { + pidi_image_processor: components["schemas"]["ImageOutput"]; + image_mask_to_tensor: components["schemas"]["MaskOutput"]; + vae_loader: components["schemas"]["VAEOutput"]; + collect: components["schemas"]["CollectInvocationOutput"]; + string_join_three: components["schemas"]["StringOutput"]; + content_shuffle_image_processor: components["schemas"]["ImageOutput"]; + random_range: components["schemas"]["IntegerCollectionOutput"]; + ip_adapter: components["schemas"]["IPAdapterOutput"]; + step_param_easing: components["schemas"]["FloatCollectionOutput"]; + core_metadata: components["schemas"]["MetadataOutput"]; + main_model_loader: components["schemas"]["ModelLoaderOutput"]; + leres_image_processor: components["schemas"]["ImageOutput"]; + calculate_image_tiles_even_split: components["schemas"]["CalculateImageTilesOutput"]; + color_correct: components["schemas"]["ImageOutput"]; + calculate_image_tiles: components["schemas"]["CalculateImageTilesOutput"]; + float_range: components["schemas"]["FloatCollectionOutput"]; + infill_cv2: components["schemas"]["ImageOutput"]; + img_channel_multiply: components["schemas"]["ImageOutput"]; + img_pad_crop: components["schemas"]["ImageOutput"]; + sdxl_refiner_compel_prompt: components["schemas"]["ConditioningOutput"]; + face_mask_detection: components["schemas"]["FaceMaskOutput"]; + infill_lama: components["schemas"]["ImageOutput"]; + mask_combine: components["schemas"]["ImageOutput"]; + sdxl_compel_prompt: components["schemas"]["ConditioningOutput"]; + segment_anything_processor: components["schemas"]["ImageOutput"]; + merge_metadata: components["schemas"]["MetadataOutput"]; + img_ilerp: components["schemas"]["ImageOutput"]; + heuristic_resize: components["schemas"]["ImageOutput"]; + cv_inpaint: components["schemas"]["ImageOutput"]; + div: components["schemas"]["IntegerOutput"]; + pair_tile_image: components["schemas"]["PairTileImageOutput"]; + float_math: components["schemas"]["FloatOutput"]; + img_channel_offset: components["schemas"]["ImageOutput"]; + canvas_paste_back: components["schemas"]["ImageOutput"]; + canny_image_processor: components["schemas"]["ImageOutput"]; + integer_collection: components["schemas"]["IntegerCollectionOutput"]; + freeu: components["schemas"]["UNetOutput"]; + lresize: components["schemas"]["LatentsOutput"]; + range_of_size: components["schemas"]["IntegerCollectionOutput"]; + depth_anything_image_processor: components["schemas"]["ImageOutput"]; + float_to_int: components["schemas"]["IntegerOutput"]; + rand_int: components["schemas"]["IntegerOutput"]; + lineart_anime_image_processor: components["schemas"]["ImageOutput"]; + string_split: components["schemas"]["String2Output"]; + img_nsfw: components["schemas"]["ImageOutput"]; + string: components["schemas"]["StringOutput"]; + mask_edge: components["schemas"]["ImageOutput"]; + i2l: components["schemas"]["LatentsOutput"]; + face_identifier: components["schemas"]["ImageOutput"]; + compel: components["schemas"]["ConditioningOutput"]; + esrgan: components["schemas"]["ImageOutput"]; + seamless: components["schemas"]["SeamlessModeOutput"]; + mask_from_id: components["schemas"]["ImageOutput"]; + invert_tensor_mask: components["schemas"]["MaskOutput"]; + rectangle_mask: components["schemas"]["MaskOutput"]; + conditioning: components["schemas"]["ConditioningOutput"]; + t2i_adapter: components["schemas"]["T2IAdapterOutput"]; + string_collection: components["schemas"]["StringCollectionOutput"]; + show_image: components["schemas"]["ImageOutput"]; + dw_openpose_image_processor: components["schemas"]["ImageOutput"]; + string_split_neg: components["schemas"]["StringPosNegOutput"]; + conditioning_collection: components["schemas"]["ConditioningCollectionOutput"]; + infill_patchmatch: components["schemas"]["ImageOutput"]; + img_conv: components["schemas"]["ImageOutput"]; + unsharp_mask: components["schemas"]["ImageOutput"]; + metadata_item: components["schemas"]["MetadataItemOutput"]; + image: components["schemas"]["ImageOutput"]; + image_collection: components["schemas"]["ImageCollectionOutput"]; + tile_to_properties: components["schemas"]["TileToPropertiesOutput"]; + lblend: components["schemas"]["LatentsOutput"]; + float: components["schemas"]["FloatOutput"]; + boolean_collection: components["schemas"]["BooleanCollectionOutput"]; + color: components["schemas"]["ColorOutput"]; + midas_depth_image_processor: components["schemas"]["ImageOutput"]; + zoe_depth_image_processor: components["schemas"]["ImageOutput"]; + infill_rgba: components["schemas"]["ImageOutput"]; + mlsd_image_processor: components["schemas"]["ImageOutput"]; + merge_tiles_to_image: components["schemas"]["ImageOutput"]; + prompt_from_file: components["schemas"]["StringCollectionOutput"]; + boolean: components["schemas"]["BooleanOutput"]; + create_gradient_mask: components["schemas"]["GradientMaskOutput"]; + rand_float: components["schemas"]["FloatOutput"]; + img_mul: components["schemas"]["ImageOutput"]; + controlnet: components["schemas"]["ControlOutput"]; + latents_collection: components["schemas"]["LatentsCollectionOutput"]; + img_lerp: components["schemas"]["ImageOutput"]; + noise: components["schemas"]["NoiseOutput"]; + iterate: components["schemas"]["IterateInvocationOutput"]; + lineart_image_processor: components["schemas"]["ImageOutput"]; + tomask: components["schemas"]["ImageOutput"]; + integer: components["schemas"]["IntegerOutput"]; + create_denoise_mask: components["schemas"]["DenoiseMaskOutput"]; + clip_skip: components["schemas"]["CLIPSkipInvocationOutput"]; + denoise_latents: components["schemas"]["LatentsOutput"]; + string_join: components["schemas"]["StringOutput"]; + scheduler: components["schemas"]["SchedulerOutput"]; + model_identifier: components["schemas"]["ModelIdentifierOutput"]; + normalbae_image_processor: components["schemas"]["ImageOutput"]; + face_off: components["schemas"]["FaceOffOutput"]; + hed_image_processor: components["schemas"]["ImageOutput"]; + img_paste: components["schemas"]["ImageOutput"]; + img_chan: components["schemas"]["ImageOutput"]; + img_watermark: components["schemas"]["ImageOutput"]; + l2i: components["schemas"]["ImageOutput"]; + string_replace: components["schemas"]["StringOutput"]; + color_map_image_processor: components["schemas"]["ImageOutput"]; + tile_image_processor: components["schemas"]["ImageOutput"]; + crop_latents: components["schemas"]["LatentsOutput"]; + sdxl_lora_collection_loader: components["schemas"]["SDXLLoRALoaderOutput"]; + add: components["schemas"]["IntegerOutput"]; + sub: components["schemas"]["IntegerOutput"]; + img_scale: components["schemas"]["ImageOutput"]; + range: components["schemas"]["IntegerCollectionOutput"]; + dynamic_prompt: components["schemas"]["StringCollectionOutput"]; + img_crop: components["schemas"]["ImageOutput"]; + infill_tile: components["schemas"]["ImageOutput"]; + img_resize: components["schemas"]["ImageOutput"]; + mediapipe_face_processor: components["schemas"]["ImageOutput"]; + sdxl_model_loader: components["schemas"]["SDXLModelLoaderOutput"]; + lora_selector: components["schemas"]["LoRASelectorOutput"]; + img_hue_adjust: components["schemas"]["ImageOutput"]; + latents: components["schemas"]["LatentsOutput"]; + lora_collection_loader: components["schemas"]["LoRALoaderOutput"]; + img_blur: components["schemas"]["ImageOutput"]; + ideal_size: components["schemas"]["IdealSizeOutput"]; + float_collection: components["schemas"]["FloatCollectionOutput"]; + blank_image: components["schemas"]["ImageOutput"]; + integer_math: components["schemas"]["IntegerOutput"]; + lora_loader: components["schemas"]["LoRALoaderOutput"]; + metadata: components["schemas"]["MetadataOutput"]; + sdxl_lora_loader: components["schemas"]["SDXLLoRALoaderOutput"]; + round_float: components["schemas"]["FloatOutput"]; + sdxl_refiner_model_loader: components["schemas"]["SDXLRefinerModelLoaderOutput"]; + mul: components["schemas"]["IntegerOutput"]; + alpha_mask_to_tensor: components["schemas"]["MaskOutput"]; + lscale: components["schemas"]["LatentsOutput"]; + save_image: components["schemas"]["ImageOutput"]; + calculate_image_tiles_min_overlap: components["schemas"]["CalculateImageTilesOutput"]; + }; + /** + * InvocationStartedEvent + * @description Event model for invocation_started + */ + InvocationStartedEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Queue Id + * @description The ID of the queue + */ + queue_id: string; + /** + * Item Id + * @description The ID of the queue item + */ + item_id: number; + /** + * Batch Id + * @description The ID of the queue batch + */ + batch_id: string; + /** + * Session Id + * @description The ID of the session (aka graph execution state) + */ + session_id: string; + /** + * Invocation + * @description The ID of the invocation + */ + invocation: components["schemas"]["AddInvocation"] | components["schemas"]["AlphaMaskToTensorInvocation"] | components["schemas"]["BlankImageInvocation"] | components["schemas"]["BlendLatentsInvocation"] | components["schemas"]["BooleanCollectionInvocation"] | components["schemas"]["BooleanInvocation"] | components["schemas"]["CLIPSkipInvocation"] | components["schemas"]["CV2InfillInvocation"] | components["schemas"]["CalculateImageTilesEvenSplitInvocation"] | components["schemas"]["CalculateImageTilesInvocation"] | components["schemas"]["CalculateImageTilesMinimumOverlapInvocation"] | components["schemas"]["CannyImageProcessorInvocation"] | components["schemas"]["CanvasPasteBackInvocation"] | components["schemas"]["CenterPadCropInvocation"] | components["schemas"]["CollectInvocation"] | components["schemas"]["ColorCorrectInvocation"] | components["schemas"]["ColorInvocation"] | components["schemas"]["ColorMapImageProcessorInvocation"] | components["schemas"]["CompelInvocation"] | components["schemas"]["ConditioningCollectionInvocation"] | components["schemas"]["ConditioningInvocation"] | components["schemas"]["ContentShuffleImageProcessorInvocation"] | components["schemas"]["ControlNetInvocation"] | components["schemas"]["CoreMetadataInvocation"] | components["schemas"]["CreateDenoiseMaskInvocation"] | components["schemas"]["CreateGradientMaskInvocation"] | components["schemas"]["CropLatentsCoreInvocation"] | components["schemas"]["CvInpaintInvocation"] | components["schemas"]["DWOpenposeImageProcessorInvocation"] | components["schemas"]["DenoiseLatentsInvocation"] | components["schemas"]["DepthAnythingImageProcessorInvocation"] | components["schemas"]["DivideInvocation"] | components["schemas"]["DynamicPromptInvocation"] | components["schemas"]["ESRGANInvocation"] | components["schemas"]["FaceIdentifierInvocation"] | components["schemas"]["FaceMaskInvocation"] | components["schemas"]["FaceOffInvocation"] | components["schemas"]["FloatCollectionInvocation"] | components["schemas"]["FloatInvocation"] | components["schemas"]["FloatLinearRangeInvocation"] | components["schemas"]["FloatMathInvocation"] | components["schemas"]["FloatToIntegerInvocation"] | components["schemas"]["FreeUInvocation"] | components["schemas"]["HedImageProcessorInvocation"] | components["schemas"]["HeuristicResizeInvocation"] | components["schemas"]["IPAdapterInvocation"] | components["schemas"]["IdealSizeInvocation"] | components["schemas"]["ImageBlurInvocation"] | components["schemas"]["ImageChannelInvocation"] | components["schemas"]["ImageChannelMultiplyInvocation"] | components["schemas"]["ImageChannelOffsetInvocation"] | components["schemas"]["ImageCollectionInvocation"] | components["schemas"]["ImageConvertInvocation"] | components["schemas"]["ImageCropInvocation"] | components["schemas"]["ImageHueAdjustmentInvocation"] | components["schemas"]["ImageInverseLerpInvocation"] | components["schemas"]["ImageInvocation"] | components["schemas"]["ImageLerpInvocation"] | components["schemas"]["ImageMaskToTensorInvocation"] | components["schemas"]["ImageMultiplyInvocation"] | components["schemas"]["ImageNSFWBlurInvocation"] | components["schemas"]["ImagePasteInvocation"] | components["schemas"]["ImageResizeInvocation"] | components["schemas"]["ImageScaleInvocation"] | components["schemas"]["ImageToLatentsInvocation"] | components["schemas"]["ImageWatermarkInvocation"] | components["schemas"]["InfillColorInvocation"] | components["schemas"]["InfillPatchMatchInvocation"] | components["schemas"]["InfillTileInvocation"] | components["schemas"]["IntegerCollectionInvocation"] | components["schemas"]["IntegerInvocation"] | components["schemas"]["IntegerMathInvocation"] | components["schemas"]["InvertTensorMaskInvocation"] | components["schemas"]["IterateInvocation"] | components["schemas"]["LaMaInfillInvocation"] | components["schemas"]["LatentsCollectionInvocation"] | components["schemas"]["LatentsInvocation"] | components["schemas"]["LatentsToImageInvocation"] | components["schemas"]["LeresImageProcessorInvocation"] | components["schemas"]["LineartAnimeImageProcessorInvocation"] | components["schemas"]["LineartImageProcessorInvocation"] | components["schemas"]["LoRACollectionLoader"] | components["schemas"]["LoRALoaderInvocation"] | components["schemas"]["LoRASelectorInvocation"] | components["schemas"]["MainModelLoaderInvocation"] | components["schemas"]["MaskCombineInvocation"] | components["schemas"]["MaskEdgeInvocation"] | components["schemas"]["MaskFromAlphaInvocation"] | components["schemas"]["MaskFromIDInvocation"] | components["schemas"]["MediapipeFaceProcessorInvocation"] | components["schemas"]["MergeMetadataInvocation"] | components["schemas"]["MergeTilesToImageInvocation"] | components["schemas"]["MetadataInvocation"] | components["schemas"]["MetadataItemInvocation"] | components["schemas"]["MidasDepthImageProcessorInvocation"] | components["schemas"]["MlsdImageProcessorInvocation"] | components["schemas"]["ModelIdentifierInvocation"] | components["schemas"]["MultiplyInvocation"] | components["schemas"]["NoiseInvocation"] | components["schemas"]["NormalbaeImageProcessorInvocation"] | components["schemas"]["PairTileImageInvocation"] | components["schemas"]["PidiImageProcessorInvocation"] | components["schemas"]["PromptsFromFileInvocation"] | components["schemas"]["RandomFloatInvocation"] | components["schemas"]["RandomIntInvocation"] | components["schemas"]["RandomRangeInvocation"] | components["schemas"]["RangeInvocation"] | components["schemas"]["RangeOfSizeInvocation"] | components["schemas"]["RectangleMaskInvocation"] | components["schemas"]["ResizeLatentsInvocation"] | components["schemas"]["RoundInvocation"] | components["schemas"]["SDXLCompelPromptInvocation"] | components["schemas"]["SDXLLoRACollectionLoader"] | components["schemas"]["SDXLLoRALoaderInvocation"] | components["schemas"]["SDXLModelLoaderInvocation"] | components["schemas"]["SDXLRefinerCompelPromptInvocation"] | components["schemas"]["SDXLRefinerModelLoaderInvocation"] | components["schemas"]["SaveImageInvocation"] | components["schemas"]["ScaleLatentsInvocation"] | components["schemas"]["SchedulerInvocation"] | components["schemas"]["SeamlessModeInvocation"] | components["schemas"]["SegmentAnythingProcessorInvocation"] | components["schemas"]["ShowImageInvocation"] | components["schemas"]["StepParamEasingInvocation"] | components["schemas"]["StringCollectionInvocation"] | components["schemas"]["StringInvocation"] | components["schemas"]["StringJoinInvocation"] | components["schemas"]["StringJoinThreeInvocation"] | components["schemas"]["StringReplaceInvocation"] | components["schemas"]["StringSplitInvocation"] | components["schemas"]["StringSplitNegInvocation"] | components["schemas"]["SubtractInvocation"] | components["schemas"]["T2IAdapterInvocation"] | components["schemas"]["TileResamplerProcessorInvocation"] | components["schemas"]["TileToPropertiesInvocation"] | components["schemas"]["UnsharpMaskInvocation"] | components["schemas"]["VAELoaderInvocation"] | components["schemas"]["ZoeDepthImageProcessorInvocation"]; + /** + * Invocation Source Id + * @description The ID of the prepared invocation's source node + */ + invocation_source_id: string; + }; /** * IterateInvocation * @description Iterates over a list of items @@ -6276,6 +7494,7 @@ export type components = { * type * @default iterate * @constant + * @enum {string} */ type: "iterate"; }; @@ -6303,6 +7522,7 @@ export type components = { * type * @default iterate_output * @constant + * @enum {string} */ type: "iterate_output"; }; @@ -6312,9 +7532,15 @@ export type components = { * @description Infills transparent areas of an image using the LaMa model */ LaMaInfillInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -6333,12 +7559,16 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * type * @default infill_lama * @constant + * @enum {string} */ type: "infill_lama"; }; @@ -6367,12 +7597,14 @@ export type components = { /** * Collection * @description The collection of latents tensors + * @default null */ collection?: components["schemas"]["LatentsField"][]; /** * type * @default latents_collection * @constant + * @enum {string} */ type: "latents_collection"; }; @@ -6390,6 +7622,7 @@ export type components = { * type * @default latents_collection_output * @constant + * @enum {string} */ type: "latents_collection_output"; }; @@ -6432,12 +7665,16 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The latents tensor */ + /** + * @description The latents tensor + * @default null + */ latents?: components["schemas"]["LatentsField"]; /** * type * @default latents * @constant + * @enum {string} */ type: "latents"; }; @@ -6462,6 +7699,7 @@ export type components = { * type * @default latents_output * @constant + * @enum {string} */ type: "latents_output"; }; @@ -6470,9 +7708,15 @@ export type components = { * @description Generates an image from latents. */ LatentsToImageInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -6491,9 +7735,15 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description Latents tensor */ + /** + * @description Latents tensor + * @default null + */ latents?: components["schemas"]["LatentsField"]; - /** @description VAE */ + /** + * @description VAE + * @default null + */ vae?: components["schemas"]["VAEField"]; /** * Tiled @@ -6511,6 +7761,7 @@ export type components = { * type * @default l2i * @constant + * @enum {string} */ type: "l2i"; }; @@ -6519,9 +7770,15 @@ export type components = { * @description Applies leres processing to image */ LeresImageProcessorInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -6540,7 +7797,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Thr A @@ -6576,6 +7836,7 @@ export type components = { * type * @default leres_image_processor * @constant + * @enum {string} */ type: "leres_image_processor"; }; @@ -6584,9 +7845,15 @@ export type components = { * @description Applies line art anime processing to image */ LineartAnimeImageProcessorInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -6605,7 +7872,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Detect Resolution @@ -6623,6 +7893,7 @@ export type components = { * type * @default lineart_anime_image_processor * @constant + * @enum {string} */ type: "lineart_anime_image_processor"; }; @@ -6631,9 +7902,15 @@ export type components = { * @description Applies line art processing to image */ LineartImageProcessorInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -6652,7 +7929,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Detect Resolution @@ -6676,6 +7956,7 @@ export type components = { * type * @default lineart_image_processor * @constant + * @enum {string} */ type: "lineart_image_processor"; }; @@ -6704,22 +7985,26 @@ export type components = { /** * LoRAs * @description LoRA models and weights. May be a single LoRA or collection. + * @default null */ loras?: components["schemas"]["LoRAField"] | components["schemas"]["LoRAField"][]; /** * UNet * @description UNet (scheduler, LoRAs) + * @default null */ unet?: components["schemas"]["UNetField"] | null; /** * CLIP * @description CLIP (tokenizer, text encoder, LoRAs) and skipped layer count + * @default null */ clip?: components["schemas"]["CLIPField"] | null; /** * type * @default lora_collection_loader * @constant + * @enum {string} */ type: "lora_collection_loader"; }; @@ -6753,7 +8038,6 @@ export type components = { /** * Description * @description Model description - * @default null */ description?: string | null; /** @@ -6766,31 +8050,30 @@ export type components = { /** * Source Api Response * @description The original API response from the source, as stringified JSON. - * @default null */ source_api_response?: string | null; /** * Cover Image * @description Url for image to preview model - * @default null */ cover_image?: string | null; /** * Type * @default lora * @constant + * @enum {string} */ type: "lora"; /** * Trigger Phrases * @description Set of trigger phrases for this model - * @default null */ trigger_phrases?: string[] | null; /** * Format * @default diffusers * @constant + * @enum {string} */ format: "diffusers"; }; @@ -6829,6 +8112,7 @@ export type components = { /** * LoRA * @description LoRA model to load + * @default null */ lora?: components["schemas"]["ModelIdentifierField"]; /** @@ -6840,17 +8124,20 @@ export type components = { /** * UNet * @description UNet (scheduler, LoRAs) + * @default null */ unet?: components["schemas"]["UNetField"] | null; /** * CLIP * @description CLIP (tokenizer, text encoder, LoRAs) and skipped layer count + * @default null */ clip?: components["schemas"]["CLIPField"] | null; /** * type * @default lora_loader * @constant + * @enum {string} */ type: "lora_loader"; }; @@ -6875,6 +8162,7 @@ export type components = { * type * @default lora_loader_output * @constant + * @enum {string} */ type: "lora_loader_output"; }; @@ -6908,7 +8196,6 @@ export type components = { /** * Description * @description Model description - * @default null */ description?: string | null; /** @@ -6921,31 +8208,30 @@ export type components = { /** * Source Api Response * @description The original API response from the source, as stringified JSON. - * @default null */ source_api_response?: string | null; /** * Cover Image * @description Url for image to preview model - * @default null */ cover_image?: string | null; /** * Type * @default lora * @constant + * @enum {string} */ type: "lora"; /** * Trigger Phrases * @description Set of trigger phrases for this model - * @default null */ trigger_phrases?: string[] | null; /** * Format * @default lycoris * @constant + * @enum {string} */ format: "lycoris"; }; @@ -6987,6 +8273,7 @@ export type components = { /** * LoRA * @description LoRA model to load + * @default null */ lora?: components["schemas"]["ModelIdentifierField"]; /** @@ -6999,6 +8286,7 @@ export type components = { * type * @default lora_selector * @constant + * @enum {string} */ type: "lora_selector"; }; @@ -7016,6 +8304,7 @@ export type components = { * type * @default lora_selector_output * @constant + * @enum {string} */ type: "lora_selector_output"; }; @@ -7035,6 +8324,7 @@ export type components = { * Type * @default local * @constant + * @enum {string} */ type?: "local"; }; @@ -7073,7 +8363,6 @@ export type components = { /** * Description * @description Model description - * @default null */ description?: string | null; /** @@ -7086,31 +8375,26 @@ export type components = { /** * Source Api Response * @description The original API response from the source, as stringified JSON. - * @default null */ source_api_response?: string | null; /** * Cover Image * @description Url for image to preview model - * @default null */ cover_image?: string | null; /** * Type * @default main * @constant + * @enum {string} */ type: "main"; /** * Trigger Phrases * @description Set of trigger phrases for this model - * @default null */ trigger_phrases?: string[] | null; - /** - * @description Default settings for this model - * @default null - */ + /** @description Default settings for this model */ default_settings?: components["schemas"]["MainModelDefaultSettings"] | null; /** @default normal */ variant?: components["schemas"]["ModelVariantType"]; @@ -7118,6 +8402,7 @@ export type components = { * Format * @default checkpoint * @constant + * @enum {string} */ format: "checkpoint"; /** @@ -7168,7 +8453,6 @@ export type components = { /** * Description * @description Model description - * @default null */ description?: string | null; /** @@ -7181,31 +8465,26 @@ export type components = { /** * Source Api Response * @description The original API response from the source, as stringified JSON. - * @default null */ source_api_response?: string | null; /** * Cover Image * @description Url for image to preview model - * @default null */ cover_image?: string | null; /** * Type * @default main * @constant + * @enum {string} */ type: "main"; /** * Trigger Phrases * @description Set of trigger phrases for this model - * @default null */ trigger_phrases?: string[] | null; - /** - * @description Default settings for this model - * @default null - */ + /** @description Default settings for this model */ default_settings?: components["schemas"]["MainModelDefaultSettings"] | null; /** @default normal */ variant?: components["schemas"]["ModelVariantType"]; @@ -7213,6 +8492,7 @@ export type components = { * Format * @default diffusers * @constant + * @enum {string} */ format: "diffusers"; /** @default */ @@ -7223,49 +8503,41 @@ export type components = { /** * Vae * @description Default VAE for this model (model key) - * @default null */ vae?: string | null; /** * Vae Precision * @description Default VAE precision for this model - * @default null */ vae_precision?: ("fp16" | "fp32") | null; /** * Scheduler * @description Default scheduler for this model - * @default null */ scheduler?: ("ddim" | "ddpm" | "deis" | "lms" | "lms_k" | "pndm" | "heun" | "heun_k" | "euler" | "euler_k" | "euler_a" | "kdpm_2" | "kdpm_2_a" | "dpmpp_2s" | "dpmpp_2s_k" | "dpmpp_2m" | "dpmpp_2m_k" | "dpmpp_2m_sde" | "dpmpp_2m_sde_k" | "dpmpp_sde" | "dpmpp_sde_k" | "unipc" | "lcm" | "tcd") | null; /** * Steps * @description Default number of steps for this model - * @default null */ steps?: number | null; /** * Cfg Scale * @description Default CFG Scale for this model - * @default null */ cfg_scale?: number | null; /** * Cfg Rescale Multiplier * @description Default CFG Rescale Multiplier for this model - * @default null */ cfg_rescale_multiplier?: number | null; /** * Width * @description Default width for this model - * @default null */ width?: number | null; /** * Height * @description Default height for this model - * @default null */ height?: number | null; }; @@ -7291,12 +8563,16 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description Main model (UNet, VAE, CLIP) to load */ + /** + * @description Main model (UNet, VAE, CLIP) to load + * @default null + */ model?: components["schemas"]["ModelIdentifierField"]; /** * type * @default main_model_loader * @constant + * @enum {string} */ type: "main_model_loader"; }; @@ -7305,9 +8581,15 @@ export type components = { * @description Combine two masks together by multiplying them using `PIL.ImageChops.multiply()`. */ MaskCombineInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -7326,14 +8608,21 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The first mask to combine */ + /** + * @description The first mask to combine + * @default null + */ mask1?: components["schemas"]["ImageField"]; - /** @description The second image to combine */ + /** + * @description The second image to combine + * @default null + */ mask2?: components["schemas"]["ImageField"]; /** * type * @default mask_combine * @constant + * @enum {string} */ type: "mask_combine"; }; @@ -7342,9 +8631,15 @@ export type components = { * @description Applies an edge mask to an image */ MaskEdgeInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -7363,32 +8658,40 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to apply the mask to */ + /** + * @description The image to apply the mask to + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Edge Size * @description The size of the edge + * @default null */ edge_size?: number; /** * Edge Blur * @description The amount of blur on the edge + * @default null */ edge_blur?: number; /** * Low Threshold * @description First threshold for the hysteresis procedure in Canny edge detection + * @default null */ low_threshold?: number; /** * High Threshold * @description Second threshold for the hysteresis procedure in Canny edge detection + * @default null */ high_threshold?: number; /** * type * @default mask_edge * @constant + * @enum {string} */ type: "mask_edge"; }; @@ -7397,9 +8700,15 @@ export type components = { * @description Extracts the alpha channel of an image as a mask. */ MaskFromAlphaInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -7418,7 +8727,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to create the mask from */ + /** + * @description The image to create the mask from + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Invert @@ -7430,6 +8742,7 @@ export type components = { * type * @default tomask * @constant + * @enum {string} */ type: "tomask"; }; @@ -7438,9 +8751,15 @@ export type components = { * @description Generate a mask for a particular color in an ID Map */ MaskFromIDInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -7459,9 +8778,15 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to create the mask from */ + /** + * @description The image to create the mask from + * @default null + */ image?: components["schemas"]["ImageField"]; - /** @description ID color to mask */ + /** + * @description ID color to mask + * @default null + */ color?: components["schemas"]["ColorField"]; /** * Threshold @@ -7479,6 +8804,7 @@ export type components = { * type * @default mask_from_id * @constant + * @enum {string} */ type: "mask_from_id"; }; @@ -7503,6 +8829,7 @@ export type components = { * type * @default mask_output * @constant + * @enum {string} */ type: "mask_output"; }; @@ -7511,9 +8838,15 @@ export type components = { * @description Applies mediapipe face processing to image */ MediapipeFaceProcessorInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -7532,7 +8865,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Max Faces @@ -7562,6 +8898,7 @@ export type components = { * type * @default mediapipe_face_processor * @constant + * @enum {string} */ type: "mediapipe_face_processor"; }; @@ -7590,12 +8927,14 @@ export type components = { /** * Collection * @description Collection of Metadata + * @default null */ collection?: components["schemas"]["MetadataField"][]; /** * type * @default merge_metadata * @constant + * @enum {string} */ type: "merge_metadata"; }; @@ -7604,9 +8943,15 @@ export type components = { * @description Merge multiple tile images into a single image. */ MergeTilesToImageInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -7628,6 +8973,7 @@ export type components = { /** * Tiles With Images * @description A list of tile images with tile properties. + * @default null */ tiles_with_images?: components["schemas"]["TileWithImage"][]; /** @@ -7647,6 +8993,7 @@ export type components = { * type * @default merge_tiles_to_image * @constant + * @enum {string} */ type: "merge_tiles_to_image"; }; @@ -7681,12 +9028,14 @@ export type components = { /** * Items * @description A single metadata item or collection of metadata items + * @default null */ items?: components["schemas"]["MetadataItemField"][] | components["schemas"]["MetadataItemField"]; /** * type * @default metadata * @constant + * @enum {string} */ type: "metadata"; }; @@ -7728,17 +9077,20 @@ export type components = { /** * Label * @description Label for this metadata item + * @default null */ label?: string; /** * Value * @description The value for this metadata item (may be any type) + * @default null */ value?: unknown; /** * type * @default metadata_item * @constant + * @enum {string} */ type: "metadata_item"; }; @@ -7753,6 +9105,7 @@ export type components = { * type * @default metadata_item_output * @constant + * @enum {string} */ type: "metadata_item_output"; }; @@ -7764,6 +9117,7 @@ export type components = { * type * @default metadata_output * @constant + * @enum {string} */ type: "metadata_output"; }; @@ -7772,9 +9126,15 @@ export type components = { * @description Applies Midas depth processing to image */ MidasDepthImageProcessorInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -7793,7 +9153,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * A Mult @@ -7823,6 +9186,7 @@ export type components = { * type * @default midas_depth_image_processor * @constant + * @enum {string} */ type: "midas_depth_image_processor"; }; @@ -7831,9 +9195,15 @@ export type components = { * @description Applies MLSD processing to image */ MlsdImageProcessorInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -7852,7 +9222,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Detect Resolution @@ -7882,6 +9255,7 @@ export type components = { * type * @default mlsd_image_processor * @constant + * @enum {string} */ type: "mlsd_image_processor"; }; @@ -7945,12 +9319,14 @@ export type components = { /** * Model * @description The model to select + * @default null */ model?: components["schemas"]["ModelIdentifierField"]; /** * type * @default model_identifier * @constant + * @enum {string} */ type: "model_identifier"; }; @@ -7968,9 +9344,157 @@ export type components = { * type * @default model_identifier_output * @constant + * @enum {string} */ type: "model_identifier_output"; }; + /** + * ModelInstallCancelledEvent + * @description Event model for model_install_cancelled + */ + ModelInstallCancelledEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Id + * @description The ID of the install job + */ + id: number; + /** + * Source + * @description Source of the model; local path, repo_id or url + */ + source: string; + }; + /** + * ModelInstallCompleteEvent + * @description Event model for model_install_complete + */ + ModelInstallCompleteEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Id + * @description The ID of the install job + */ + id: number; + /** + * Source + * @description Source of the model; local path, repo_id or url + */ + source: string; + /** + * Key + * @description Model config record key + */ + key: string; + /** + * Total Bytes + * @description Size of the model (may be None for installation of a local path) + */ + total_bytes: number | null; + }; + /** + * ModelInstallDownloadProgressEvent + * @description Event model for model_install_download_progress + */ + ModelInstallDownloadProgressEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Id + * @description The ID of the install job + */ + id: number; + /** + * Source + * @description Source of the model; local path, repo_id or url + */ + source: string; + /** + * Local Path + * @description Where model is downloading to + */ + local_path: string; + /** + * Bytes + * @description Number of bytes downloaded so far + */ + bytes: number; + /** + * Total Bytes + * @description Total size of download, including all files + */ + total_bytes: number; + /** + * Parts + * @description Progress of downloading URLs that comprise the model, if any + */ + parts: ({ + [key: string]: number | string; + })[]; + }; + /** + * ModelInstallDownloadsCompleteEvent + * @description Emitted once when an install job becomes active. + */ + ModelInstallDownloadsCompleteEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Id + * @description The ID of the install job + */ + id: number; + /** + * Source + * @description Source of the model; local path, repo_id or url + */ + source: string; + }; + /** + * ModelInstallErrorEvent + * @description Event model for model_install_error + */ + ModelInstallErrorEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Id + * @description The ID of the install job + */ + id: number; + /** + * Source + * @description Source of the model; local path, repo_id or url + */ + source: string; + /** + * Error Type + * @description The name of the exception + */ + error_type: string; + /** + * Error + * @description A text description of the exception + */ + error: string; + }; /** * ModelInstallJob * @description Object that tracks the current status of an install request. @@ -8051,6 +9575,69 @@ export type components = { */ error_traceback?: string | null; }; + /** + * ModelInstallStartedEvent + * @description Event model for model_install_started + */ + ModelInstallStartedEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Id + * @description The ID of the install job + */ + id: number; + /** + * Source + * @description Source of the model; local path, repo_id or url + */ + source: string; + }; + /** + * ModelLoadCompleteEvent + * @description Event model for model_load_complete + */ + ModelLoadCompleteEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Config + * @description The model's config + */ + config: components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"]; + /** + * @description The submodel type, if any + * @default null + */ + submodel_type: components["schemas"]["SubModelType"] | null; + }; + /** + * ModelLoadStartedEvent + * @description Event model for model_load_started + */ + ModelLoadStartedEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Config + * @description The model's config + */ + config: components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"]; + /** + * @description The submodel type, if any + * @default null + */ + submodel_type: components["schemas"]["SubModelType"] | null; + }; /** * ModelLoaderOutput * @description Model loader output @@ -8065,6 +9652,7 @@ export type components = { * type * @default model_loader_output * @constant + * @enum {string} */ type: "model_loader_output"; /** @@ -8195,6 +9783,7 @@ export type components = { * type * @default mul * @constant + * @enum {string} */ type: "mul"; }; @@ -8266,6 +9855,7 @@ export type components = { * type * @default noise * @constant + * @enum {string} */ type: "noise"; }; @@ -8290,6 +9880,7 @@ export type components = { * type * @default noise_output * @constant + * @enum {string} */ type: "noise_output"; }; @@ -8298,9 +9889,15 @@ export type components = { * @description Applies NormalBae processing to image */ NormalbaeImageProcessorInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -8319,7 +9916,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Detect Resolution @@ -8337,6 +9937,7 @@ export type components = { * type * @default normalbae_image_processor * @constant + * @enum {string} */ type: "normalbae_image_processor"; }; @@ -8386,6 +9987,19 @@ export type components = { */ items: components["schemas"]["ImageDTO"][]; }; + /** + * OutputFieldJSONSchemaExtra + * @description Extra attributes to be added to input fields and their OpenAPI schema. Used by the workflow editor + * during schema parsing and UI rendering. + */ + OutputFieldJSONSchemaExtra: { + field_kind: components["schemas"]["FieldKind"]; + /** Ui Hidden */ + ui_hidden: boolean; + ui_type: components["schemas"]["UIType"] | null; + /** Ui Order */ + ui_order: number | null; + }; /** PaginatedResults[WorkflowRecordListItemDTO] */ PaginatedResults_WorkflowRecordListItemDTO_: { /** @@ -8436,14 +10050,21 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The tile image. */ + /** + * @description The tile image. + * @default null + */ image?: components["schemas"]["ImageField"]; - /** @description The tile properties. */ + /** + * @description The tile properties. + * @default null + */ tile?: components["schemas"]["Tile"]; /** * type * @default pair_tile_image * @constant + * @enum {string} */ type: "pair_tile_image"; }; @@ -8455,6 +10076,7 @@ export type components = { * type * @default pair_tile_image_output * @constant + * @enum {string} */ type: "pair_tile_image_output"; }; @@ -8463,9 +10085,15 @@ export type components = { * @description Applies PIDI processing to image */ PidiImageProcessorInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -8484,7 +10112,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Detect Resolution @@ -8514,9 +10145,31 @@ export type components = { * type * @default pidi_image_processor * @constant + * @enum {string} */ type: "pidi_image_processor"; }; + /** + * ProgressImage + * @description The progress image sent intermittently during processing + */ + ProgressImage: { + /** + * Width + * @description The effective width of the image in pixels + */ + width: number; + /** + * Height + * @description The effective height of the image in pixels + */ + height: number; + /** + * Dataurl + * @description The image data as a b64 data URL + */ + dataURL: string; + }; /** * Prompts from File * @description Loads prompts from a text file @@ -8542,16 +10195,19 @@ export type components = { /** * File Path * @description Path to prompt text file + * @default null */ file_path?: string; /** * Pre Prompt * @description String to prepend to each prompt + * @default null */ pre_prompt?: string | null; /** * Post Prompt * @description String to append to each prompt + * @default null */ post_prompt?: string | null; /** @@ -8570,6 +10226,7 @@ export type components = { * type * @default prompt_from_file * @constant + * @enum {string} */ type: "prompt_from_file"; }; @@ -8584,6 +10241,105 @@ export type components = { */ deleted: number; }; + /** + * QueueClearedEvent + * @description Event model for queue_cleared + */ + QueueClearedEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Queue Id + * @description The ID of the queue + */ + queue_id: string; + }; + /** + * QueueItemStatusChangedEvent + * @description Event model for queue_item_status_changed + */ + QueueItemStatusChangedEvent: { + /** + * Timestamp + * @description The timestamp of the event + */ + timestamp: number; + /** + * Queue Id + * @description The ID of the queue + */ + queue_id: string; + /** + * Item Id + * @description The ID of the queue item + */ + item_id: number; + /** + * Batch Id + * @description The ID of the queue batch + */ + batch_id: string; + /** + * Status + * @description The new status of the queue item + * @enum {string} + */ + status: "pending" | "in_progress" | "completed" | "failed" | "canceled"; + /** + * Error Type + * @description The error type, if any + * @default null + */ + error_type: string | null; + /** + * Error Message + * @description The error message, if any + * @default null + */ + error_message: string | null; + /** + * Error Traceback + * @description The error traceback, if any + * @default null + */ + error_traceback: string | null; + /** + * Created At + * @description The timestamp when the queue item was created + * @default null + */ + created_at: string | null; + /** + * Updated At + * @description The timestamp when the queue item was last updated + * @default null + */ + updated_at: string | null; + /** + * Started At + * @description The timestamp when the queue item was started + * @default null + */ + started_at: string | null; + /** + * Completed At + * @description The timestamp when the queue item was completed + * @default null + */ + completed_at: string | null; + /** @description The status of the batch */ + batch_status: components["schemas"]["BatchStatus"]; + /** @description The status of the queue */ + queue_status: components["schemas"]["SessionQueueStatus"]; + /** + * Session Id + * @description The ID of the session (aka graph execution state) + */ + session_id: string; + }; /** * Random Float * @description Outputs a single random float @@ -8628,6 +10384,7 @@ export type components = { * type * @default rand_float * @constant + * @enum {string} */ type: "rand_float"; }; @@ -8669,6 +10426,7 @@ export type components = { * type * @default rand_int * @constant + * @enum {string} */ type: "rand_int"; }; @@ -8722,6 +10480,7 @@ export type components = { * type * @default random_range * @constant + * @enum {string} */ type: "random_range"; }; @@ -8769,6 +10528,7 @@ export type components = { * type * @default range * @constant + * @enum {string} */ type: "range"; }; @@ -8816,6 +10576,7 @@ export type components = { * type * @default range_of_size * @constant + * @enum {string} */ type: "range_of_size"; }; @@ -8824,7 +10585,10 @@ export type components = { * @description Create a rectangular mask. */ RectangleMaskInvocation: { - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -8846,37 +10610,44 @@ export type components = { /** * Width * @description The width of the entire mask. + * @default null */ width?: number; /** * Height * @description The height of the entire mask. + * @default null */ height?: number; /** * X Left * @description The left x-coordinate of the rectangular masked region (inclusive). + * @default null */ x_left?: number; /** * Y Top * @description The top y-coordinate of the rectangular masked region (inclusive). + * @default null */ y_top?: number; /** * Rectangle Width * @description The width of the rectangular masked region. + * @default null */ rectangle_width?: number; /** * Rectangle Height * @description The height of the rectangular masked region. + * @default null */ rectangle_height?: number; /** * type * @default rectangle_mask * @constant + * @enum {string} */ type: "rectangle_mask"; }; @@ -8938,16 +10709,21 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description Latents tensor */ + /** + * @description Latents tensor + * @default null + */ latents?: components["schemas"]["LatentsField"]; /** * Width * @description Width of output (px) + * @default null */ width?: number; /** * Height * @description Width of output (px) + * @default null */ height?: number; /** @@ -8967,6 +10743,7 @@ export type components = { * type * @default lresize * @constant + * @enum {string} */ type: "lresize"; }; @@ -9018,6 +10795,7 @@ export type components = { * type * @default round_float * @constant + * @enum {string} */ type: "round_float"; }; @@ -9088,19 +10866,25 @@ export type components = { /** * CLIP 1 * @description CLIP (tokenizer, text encoder, LoRAs) and skipped layer count + * @default null */ clip?: components["schemas"]["CLIPField"]; /** * CLIP 2 * @description CLIP (tokenizer, text encoder, LoRAs) and skipped layer count + * @default null */ clip2?: components["schemas"]["CLIPField"]; - /** @description A mask defining the region that this conditioning prompt applies to. */ + /** + * @description A mask defining the region that this conditioning prompt applies to. + * @default null + */ mask?: components["schemas"]["TensorField"] | null; /** * type * @default sdxl_compel_prompt * @constant + * @enum {string} */ type: "sdxl_compel_prompt"; }; @@ -9129,27 +10913,32 @@ export type components = { /** * LoRAs * @description LoRA models and weights. May be a single LoRA or collection. + * @default null */ loras?: components["schemas"]["LoRAField"] | components["schemas"]["LoRAField"][]; /** * UNet * @description UNet (scheduler, LoRAs) + * @default null */ unet?: components["schemas"]["UNetField"] | null; /** * CLIP * @description CLIP (tokenizer, text encoder, LoRAs) and skipped layer count + * @default null */ clip?: components["schemas"]["CLIPField"] | null; /** * CLIP 2 * @description CLIP (tokenizer, text encoder, LoRAs) and skipped layer count + * @default null */ clip2?: components["schemas"]["CLIPField"] | null; /** * type * @default sdxl_lora_collection_loader * @constant + * @enum {string} */ type: "sdxl_lora_collection_loader"; }; @@ -9178,6 +10967,7 @@ export type components = { /** * LoRA * @description LoRA model to load + * @default null */ lora?: components["schemas"]["ModelIdentifierField"]; /** @@ -9189,22 +10979,26 @@ export type components = { /** * UNet * @description UNet (scheduler, LoRAs) + * @default null */ unet?: components["schemas"]["UNetField"] | null; /** * CLIP 1 * @description CLIP (tokenizer, text encoder, LoRAs) and skipped layer count + * @default null */ clip?: components["schemas"]["CLIPField"] | null; /** * CLIP 2 * @description CLIP (tokenizer, text encoder, LoRAs) and skipped layer count + * @default null */ clip2?: components["schemas"]["CLIPField"] | null; /** * type * @default sdxl_lora_loader * @constant + * @enum {string} */ type: "sdxl_lora_loader"; }; @@ -9235,6 +11029,7 @@ export type components = { * type * @default sdxl_lora_loader_output * @constant + * @enum {string} */ type: "sdxl_lora_loader_output"; }; @@ -9260,12 +11055,16 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description SDXL Main model (UNet, VAE, CLIP1, CLIP2) to load */ + /** + * @description SDXL Main model (UNet, VAE, CLIP1, CLIP2) to load + * @default null + */ model?: components["schemas"]["ModelIdentifierField"]; /** * type * @default sdxl_model_loader * @constant + * @enum {string} */ type: "sdxl_model_loader"; }; @@ -9298,6 +11097,7 @@ export type components = { * type * @default sdxl_model_loader_output * @constant + * @enum {string} */ type: "sdxl_model_loader_output"; }; @@ -9355,12 +11155,16 @@ export type components = { * @default 6 */ aesthetic_score?: number; - /** @description CLIP (tokenizer, text encoder, LoRAs) and skipped layer count */ + /** + * @description CLIP (tokenizer, text encoder, LoRAs) and skipped layer count + * @default null + */ clip2?: components["schemas"]["CLIPField"]; /** * type * @default sdxl_refiner_compel_prompt * @constant + * @enum {string} */ type: "sdxl_refiner_compel_prompt"; }; @@ -9386,12 +11190,16 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description SDXL Refiner Main Modde (UNet, VAE, CLIP2) to load */ + /** + * @description SDXL Refiner Main Modde (UNet, VAE, CLIP2) to load + * @default null + */ model?: components["schemas"]["ModelIdentifierField"]; /** * type * @default sdxl_refiner_model_loader * @constant + * @enum {string} */ type: "sdxl_refiner_model_loader"; }; @@ -9419,6 +11227,7 @@ export type components = { * type * @default sdxl_refiner_model_loader_output * @constant + * @enum {string} */ type: "sdxl_refiner_model_loader_output"; }; @@ -9432,9 +11241,15 @@ export type components = { * @description Saves an image. Unlike an image primitive, this invocation stores a copy of the image. */ SaveImageInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -9453,12 +11268,16 @@ export type components = { * @default false */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * type * @default save_image * @constant + * @enum {string} */ type: "save_image"; }; @@ -9484,11 +11303,15 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description Latents tensor */ + /** + * @description Latents tensor + * @default null + */ latents?: components["schemas"]["LatentsField"]; /** * Scale Factor * @description The factor by which to scale + * @default null */ scale_factor?: number; /** @@ -9508,6 +11331,7 @@ export type components = { * type * @default lscale * @constant + * @enum {string} */ type: "lscale"; }; @@ -9544,6 +11368,7 @@ export type components = { * type * @default scheduler * @constant + * @enum {string} */ type: "scheduler"; }; @@ -9559,6 +11384,7 @@ export type components = { * type * @default scheduler_output * @constant + * @enum {string} */ type: "scheduler_output"; }; @@ -9593,11 +11419,13 @@ export type components = { /** * UNet * @description UNet (scheduler, LoRAs) + * @default null */ unet?: components["schemas"]["UNetField"] | null; /** * VAE * @description VAE model to load + * @default null */ vae?: components["schemas"]["VAEField"] | null; /** @@ -9616,6 +11444,7 @@ export type components = { * type * @default seamless * @constant + * @enum {string} */ type: "seamless"; }; @@ -9640,6 +11469,7 @@ export type components = { * type * @default seamless_output * @constant + * @enum {string} */ type: "seamless_output"; }; @@ -9648,9 +11478,15 @@ export type components = { * @description Applies segment anything processing to image */ SegmentAnythingProcessorInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -9669,7 +11505,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Detect Resolution @@ -9687,6 +11526,7 @@ export type components = { * type * @default segment_anything_processor * @constant + * @enum {string} */ type: "segment_anything_processor"; }; @@ -9942,12 +11782,16 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to show */ + /** + * @description The image to show + * @default null + */ image?: components["schemas"]["ImageField"]; /** * type * @default show_image * @constant + * @enum {string} */ type: "show_image"; }; @@ -10047,11 +11891,13 @@ export type components = { /** * Pre Start Value * @description value before easing start + * @default null */ pre_start_value?: number | null; /** * Post End Value * @description value after easing end + * @default null */ post_end_value?: number | null; /** @@ -10070,6 +11916,7 @@ export type components = { * type * @default step_param_easing * @constant + * @enum {string} */ type: "step_param_easing"; }; @@ -10092,6 +11939,7 @@ export type components = { * type * @default string_2_output * @constant + * @enum {string} */ type: "string_2_output"; }; @@ -10127,6 +11975,7 @@ export type components = { * type * @default string_collection * @constant + * @enum {string} */ type: "string_collection"; }; @@ -10144,6 +11993,7 @@ export type components = { * type * @default string_collection_output * @constant + * @enum {string} */ type: "string_collection_output"; }; @@ -10179,6 +12029,7 @@ export type components = { * type * @default string * @constant + * @enum {string} */ type: "string"; }; @@ -10220,6 +12071,7 @@ export type components = { * type * @default string_join * @constant + * @enum {string} */ type: "string_join"; }; @@ -10267,6 +12119,7 @@ export type components = { * type * @default string_join_three * @constant + * @enum {string} */ type: "string_join_three"; }; @@ -10284,6 +12137,7 @@ export type components = { * type * @default string_output * @constant + * @enum {string} */ type: "string_output"; }; @@ -10306,6 +12160,7 @@ export type components = { * type * @default string_pos_neg_output * @constant + * @enum {string} */ type: "string_pos_neg_output"; }; @@ -10359,6 +12214,7 @@ export type components = { * type * @default string_replace * @constant + * @enum {string} */ type: "string_replace"; }; @@ -10400,6 +12256,7 @@ export type components = { * type * @default string_split * @constant + * @enum {string} */ type: "string_split"; }; @@ -10435,6 +12292,7 @@ export type components = { * type * @default string_split_neg * @constant + * @enum {string} */ type: "string_split_neg"; }; @@ -10482,6 +12340,7 @@ export type components = { * type * @default sub * @constant + * @enum {string} */ type: "sub"; }; @@ -10490,10 +12349,7 @@ export type components = { * @description Model config for T2I. */ T2IAdapterConfig: { - /** - * @description Default settings for this model - * @default null - */ + /** @description Default settings for this model */ default_settings?: components["schemas"]["ControlAdapterDefaultSettings"] | null; /** * Key @@ -10520,7 +12376,6 @@ export type components = { /** * Description * @description Model description - * @default null */ description?: string | null; /** @@ -10533,18 +12388,17 @@ export type components = { /** * Source Api Response * @description The original API response from the source, as stringified JSON. - * @default null */ source_api_response?: string | null; /** * Cover Image * @description Url for image to preview model - * @default null */ cover_image?: string | null; /** * Format * @constant + * @enum {string} */ format: "diffusers"; /** @default */ @@ -10553,6 +12407,7 @@ export type components = { * Type * @default t2i_adapter * @constant + * @enum {string} */ type: "t2i_adapter"; }; @@ -10610,11 +12465,15 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The IP-Adapter image prompt. */ + /** + * @description The IP-Adapter image prompt. + * @default null + */ image?: components["schemas"]["ImageField"]; /** * T2I-Adapter Model * @description The T2I-Adapter model. + * @default null */ t2i_adapter_model?: components["schemas"]["ModelIdentifierField"]; /** @@ -10646,6 +12505,7 @@ export type components = { * type * @default t2i_adapter * @constant + * @enum {string} */ type: "t2i_adapter"; }; @@ -10653,7 +12513,10 @@ export type components = { T2IAdapterMetadataField: { /** @description The control image. */ image: components["schemas"]["ImageField"]; - /** @description The control image, after processing. */ + /** + * @description The control image, after processing. + * @default null + */ processed_image?: components["schemas"]["ImageField"] | null; /** @description The T2I-Adapter model to use. */ t2i_adapter_model: components["schemas"]["ModelIdentifierField"]; @@ -10694,6 +12557,7 @@ export type components = { * type * @default t2i_adapter_output * @constant + * @enum {string} */ type: "t2i_adapter_output"; }; @@ -10749,7 +12613,6 @@ export type components = { /** * Description * @description Model description - * @default null */ description?: string | null; /** @@ -10762,25 +12625,25 @@ export type components = { /** * Source Api Response * @description The original API response from the source, as stringified JSON. - * @default null */ source_api_response?: string | null; /** * Cover Image * @description Url for image to preview model - * @default null */ cover_image?: string | null; /** * Type * @default embedding * @constant + * @enum {string} */ type: "embedding"; /** * Format * @default embedding_file * @constant + * @enum {string} */ format: "embedding_file"; }; @@ -10814,7 +12677,6 @@ export type components = { /** * Description * @description Model description - * @default null */ description?: string | null; /** @@ -10827,25 +12689,25 @@ export type components = { /** * Source Api Response * @description The original API response from the source, as stringified JSON. - * @default null */ source_api_response?: string | null; /** * Cover Image * @description Url for image to preview model - * @default null */ cover_image?: string | null; /** * Type * @default embedding * @constant + * @enum {string} */ type: "embedding"; /** * Format * @default embedding_folder * @constant + * @enum {string} */ format: "embedding_folder"; }; @@ -10861,9 +12723,15 @@ export type components = { * @description Tile resampler processor */ TileResamplerProcessorInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -10882,7 +12750,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Down Sampling Rate @@ -10894,6 +12765,7 @@ export type components = { * type * @default tile_image_processor * @constant + * @enum {string} */ type: "tile_image_processor"; }; @@ -10919,12 +12791,16 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The tile to split into properties. */ + /** + * @description The tile to split into properties. + * @default null + */ tile?: components["schemas"]["Tile"]; /** * type * @default tile_to_properties * @constant + * @enum {string} */ type: "tile_to_properties"; }; @@ -10984,6 +12860,7 @@ export type components = { * type * @default tile_to_properties_output * @constant + * @enum {string} */ type: "tile_to_properties_output"; }; @@ -10992,6 +12869,81 @@ export type components = { tile: components["schemas"]["Tile"]; image: components["schemas"]["ImageField"]; }; + /** + * UIComponent + * @description The type of UI component to use for a field, used to override the default components, which are + * inferred from the field type. + * @enum {string} + */ + UIComponent: "none" | "textarea" | "slider"; + /** + * UIConfigBase + * @description Provides additional node configuration to the UI. + * This is used internally by the @invocation decorator logic. Do not use this directly. + */ + UIConfigBase: { + /** + * Tags + * @description The node's tags + */ + tags: string[] | null; + /** + * Title + * @description The node's display name + * @default null + */ + title: string | null; + /** + * Category + * @description The node's category + * @default null + */ + category: string | null; + /** + * Version + * @description The node's version. Should be a valid semver string e.g. "1.0.0" or "3.8.13". + */ + version: string; + /** + * Node Pack + * @description Whether or not this is a custom node + * @default null + */ + node_pack: string | null; + /** + * @description The node's classification + * @default stable + */ + classification: components["schemas"]["Classification"]; + }; + /** + * UIType + * @description Type hints for the UI for situations in which the field type is not enough to infer the correct UI type. + * + * - Model Fields + * The most common node-author-facing use will be for model fields. Internally, there is no difference + * between SD-1, SD-2 and SDXL model fields - they all use the class `MainModelField`. To ensure the + * base-model-specific UI is rendered, use e.g. `ui_type=UIType.SDXLMainModelField` to indicate that + * the field is an SDXL main model field. + * + * - Any Field + * We cannot infer the usage of `typing.Any` via schema parsing, so you *must* use `ui_type=UIType.Any` to + * indicate that the field accepts any type. Use with caution. This cannot be used on outputs. + * + * - Scheduler Field + * Special handling in the UI is needed for this field, which otherwise would be parsed as a plain enum field. + * + * - Internal Fields + * Similar to the Any Field, the `collect` and `iterate` nodes make use of `typing.Any`. To facilitate + * handling these types in the client, we use `UIType._Collection` and `UIType._CollectionItem`. These + * should not be used by node authors. + * + * - DEPRECATED Fields + * These types are deprecated and should not be used by node authors. A warning will be logged if one is + * used, and the type will be ignored. They are included here for backwards compatibility. + * @enum {string} + */ + UIType: "MainModelField" | "SDXLMainModelField" | "SDXLRefinerModelField" | "ONNXModelField" | "VAEModelField" | "LoRAModelField" | "ControlNetModelField" | "IPAdapterModelField" | "T2IAdapterModelField" | "SchedulerField" | "AnyField" | "CollectionField" | "CollectionItemField" | "DEPRECATED_Boolean" | "DEPRECATED_Color" | "DEPRECATED_Conditioning" | "DEPRECATED_Control" | "DEPRECATED_Float" | "DEPRECATED_Image" | "DEPRECATED_Integer" | "DEPRECATED_Latents" | "DEPRECATED_String" | "DEPRECATED_BooleanCollection" | "DEPRECATED_ColorCollection" | "DEPRECATED_ConditioningCollection" | "DEPRECATED_ControlCollection" | "DEPRECATED_FloatCollection" | "DEPRECATED_ImageCollection" | "DEPRECATED_IntegerCollection" | "DEPRECATED_LatentsCollection" | "DEPRECATED_StringCollection" | "DEPRECATED_BooleanPolymorphic" | "DEPRECATED_ColorPolymorphic" | "DEPRECATED_ConditioningPolymorphic" | "DEPRECATED_ControlPolymorphic" | "DEPRECATED_FloatPolymorphic" | "DEPRECATED_ImagePolymorphic" | "DEPRECATED_IntegerPolymorphic" | "DEPRECATED_LatentsPolymorphic" | "DEPRECATED_StringPolymorphic" | "DEPRECATED_UNet" | "DEPRECATED_Vae" | "DEPRECATED_CLIP" | "DEPRECATED_Collection" | "DEPRECATED_CollectionItem" | "DEPRECATED_Enum" | "DEPRECATED_WorkflowField" | "DEPRECATED_IsIntermediate" | "DEPRECATED_BoardField" | "DEPRECATED_MetadataItem" | "DEPRECATED_MetadataItemCollection" | "DEPRECATED_MetadataItemPolymorphic" | "DEPRECATED_MetadataDict"; /** UNetField */ UNetField: { /** @description Info to load unet submodel */ @@ -11028,6 +12980,7 @@ export type components = { * type * @default unet_output * @constant + * @enum {string} */ type: "unet_output"; }; @@ -11047,6 +13000,7 @@ export type components = { * Type * @default url * @constant + * @enum {string} */ type?: "url"; }; @@ -11055,9 +13009,15 @@ export type components = { * @description Applies an unsharp mask filter to an image */ UnsharpMaskInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -11076,7 +13036,10 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to use */ + /** + * @description The image to use + * @default null + */ image?: components["schemas"]["ImageField"]; /** * Radius @@ -11094,6 +13057,7 @@ export type components = { * type * @default unsharp_mask * @constant + * @enum {string} */ type: "unsharp_mask"; }; @@ -11140,7 +13104,6 @@ export type components = { /** * Description * @description Model description - * @default null */ description?: string | null; /** @@ -11153,19 +13116,18 @@ export type components = { /** * Source Api Response * @description The original API response from the source, as stringified JSON. - * @default null */ source_api_response?: string | null; /** * Cover Image * @description Url for image to preview model - * @default null */ cover_image?: string | null; /** * Format * @default checkpoint * @constant + * @enum {string} */ format: "checkpoint"; /** @@ -11182,6 +13144,7 @@ export type components = { * Type * @default vae * @constant + * @enum {string} */ type: "vae"; }; @@ -11215,7 +13178,6 @@ export type components = { /** * Description * @description Model description - * @default null */ description?: string | null; /** @@ -11228,25 +13190,25 @@ export type components = { /** * Source Api Response * @description The original API response from the source, as stringified JSON. - * @default null */ source_api_response?: string | null; /** * Cover Image * @description Url for image to preview model - * @default null */ cover_image?: string | null; /** * Type * @default vae * @constant + * @enum {string} */ type: "vae"; /** * Format * @default diffusers * @constant + * @enum {string} */ format: "diffusers"; }; @@ -11285,12 +13247,14 @@ export type components = { /** * VAE * @description VAE model to load + * @default null */ vae_model?: components["schemas"]["ModelIdentifierField"]; /** * type * @default vae_loader * @constant + * @enum {string} */ type: "vae_loader"; }; @@ -11308,6 +13272,7 @@ export type components = { * type * @default vae_output * @constant + * @enum {string} */ type: "vae_output"; }; @@ -11550,9 +13515,15 @@ export type components = { * @description Applies Zoe depth processing to image */ ZoeDepthImageProcessorInvocation: { - /** @description The board to save the image to */ + /** + * @description The board to save the image to + * @default null + */ board?: components["schemas"]["BoardField"] | null; - /** @description Optional metadata to be saved with the image */ + /** + * @description Optional metadata to be saved with the image + * @default null + */ metadata?: components["schemas"]["MetadataField"] | null; /** * Id @@ -11571,1122 +13542,18 @@ export type components = { * @default true */ use_cache?: boolean; - /** @description The image to process */ + /** + * @description The image to process + * @default null + */ image?: components["schemas"]["ImageField"]; /** * type * @default zoe_depth_image_processor * @constant - */ - type: "zoe_depth_image_processor"; - }; - /** - * Classification - * @description The classification of an Invocation. - * - `Stable`: The invocation, including its inputs/outputs and internal logic, is stable. You may build workflows with it, having confidence that they will not break because of a change in this invocation. - * - `Beta`: The invocation is not yet stable, but is planned to be stable in the future. Workflows built around this invocation may break, but we are committed to supporting this invocation long-term. - * - `Prototype`: The invocation is not yet stable and may be removed from the application at any time. Workflows built around this invocation may break, and we are *not* committed to supporting this invocation. - * @enum {string} - */ - Classification: "stable" | "beta" | "prototype"; - /** - * FieldKind - * @description The kind of field. - * - `Input`: An input field on a node. - * - `Output`: An output field on a node. - * - `Internal`: A field which is treated as an input, but cannot be used in node definitions. Metadata is - * one example. It is provided to nodes via the WithMetadata class, and we want to reserve the field name - * "metadata" for this on all nodes. `FieldKind` is used to short-circuit the field name validation logic, - * allowing "metadata" for that field. - * - `NodeAttribute`: The field is a node attribute. These are fields which are not inputs or outputs, - * but which are used to store information about the node. For example, the `id` and `type` fields are node - * attributes. - * - * The presence of this in `json_schema_extra["field_kind"]` is used when initializing node schemas on app - * startup, and when generating the OpenAPI schema for the workflow editor. - * @enum {string} - */ - FieldKind: "input" | "output" | "internal" | "node_attribute"; - /** - * Input - * @description The type of input a field accepts. - * - `Input.Direct`: The field must have its value provided directly, when the invocation and field are instantiated. - * - `Input.Connection`: The field must have its value provided by a connection. - * - `Input.Any`: The field may have its value provided either directly or by a connection. - * @enum {string} - */ - Input: "connection" | "direct" | "any"; - /** - * InputFieldJSONSchemaExtra - * @description Extra attributes to be added to input fields and their OpenAPI schema. Used during graph execution, - * and by the workflow editor during schema parsing and UI rendering. - */ - InputFieldJSONSchemaExtra: { - input: components["schemas"]["Input"]; - /** Orig Required */ - orig_required: boolean; - field_kind: components["schemas"]["FieldKind"]; - /** - * Default - * @default null - */ - default: unknown; - /** - * Orig Default - * @default null - */ - orig_default: unknown; - /** - * Ui Hidden - * @default false - */ - ui_hidden: boolean; - /** @default null */ - ui_type: components["schemas"]["UIType"] | null; - /** @default null */ - ui_component: components["schemas"]["UIComponent"] | null; - /** - * Ui Order - * @default null - */ - ui_order: number | null; - /** - * Ui Choice Labels - * @default null - */ - ui_choice_labels: { - [key: string]: string; - } | null; - }; - /** - * OutputFieldJSONSchemaExtra - * @description Extra attributes to be added to input fields and their OpenAPI schema. Used by the workflow editor - * during schema parsing and UI rendering. - */ - OutputFieldJSONSchemaExtra: { - field_kind: components["schemas"]["FieldKind"]; - /** Ui Hidden */ - ui_hidden: boolean; - ui_type: components["schemas"]["UIType"] | null; - /** Ui Order */ - ui_order: number | null; - }; - /** - * ProgressImage - * @description The progress image sent intermittently during processing - */ - ProgressImage: { - /** - * Width - * @description The effective width of the image in pixels - */ - width: number; - /** - * Height - * @description The effective height of the image in pixels - */ - height: number; - /** - * Dataurl - * @description The image data as a b64 data URL - */ - dataURL: string; - }; - /** - * UIComponent - * @description The type of UI component to use for a field, used to override the default components, which are - * inferred from the field type. - * @enum {string} - */ - UIComponent: "none" | "textarea" | "slider"; - /** - * UIConfigBase - * @description Provides additional node configuration to the UI. - * This is used internally by the @invocation decorator logic. Do not use this directly. - */ - UIConfigBase: { - /** - * Tags - * @description The node's tags - */ - tags: string[] | null; - /** - * Title - * @description The node's display name - * @default null - */ - title: string | null; - /** - * Category - * @description The node's category - * @default null - */ - category: string | null; - /** - * Version - * @description The node's version. Should be a valid semver string e.g. "1.0.0" or "3.8.13". - */ - version: string; - /** - * Node Pack - * @description Whether or not this is a custom node - * @default null - */ - node_pack: string | null; - /** - * @description The node's classification - * @default stable - */ - classification: components["schemas"]["Classification"]; - }; - /** - * UIType - * @description Type hints for the UI for situations in which the field type is not enough to infer the correct UI type. - * - * - Model Fields - * The most common node-author-facing use will be for model fields. Internally, there is no difference - * between SD-1, SD-2 and SDXL model fields - they all use the class `MainModelField`. To ensure the - * base-model-specific UI is rendered, use e.g. `ui_type=UIType.SDXLMainModelField` to indicate that - * the field is an SDXL main model field. - * - * - Any Field - * We cannot infer the usage of `typing.Any` via schema parsing, so you *must* use `ui_type=UIType.Any` to - * indicate that the field accepts any type. Use with caution. This cannot be used on outputs. - * - * - Scheduler Field - * Special handling in the UI is needed for this field, which otherwise would be parsed as a plain enum field. - * - * - Internal Fields - * Similar to the Any Field, the `collect` and `iterate` nodes make use of `typing.Any`. To facilitate - * handling these types in the client, we use `UIType._Collection` and `UIType._CollectionItem`. These - * should not be used by node authors. - * - * - DEPRECATED Fields - * These types are deprecated and should not be used by node authors. A warning will be logged if one is - * used, and the type will be ignored. They are included here for backwards compatibility. - * @enum {string} - */ - UIType: "MainModelField" | "SDXLMainModelField" | "SDXLRefinerModelField" | "ONNXModelField" | "VAEModelField" | "LoRAModelField" | "ControlNetModelField" | "IPAdapterModelField" | "T2IAdapterModelField" | "SchedulerField" | "AnyField" | "CollectionField" | "CollectionItemField" | "DEPRECATED_Boolean" | "DEPRECATED_Color" | "DEPRECATED_Conditioning" | "DEPRECATED_Control" | "DEPRECATED_Float" | "DEPRECATED_Image" | "DEPRECATED_Integer" | "DEPRECATED_Latents" | "DEPRECATED_String" | "DEPRECATED_BooleanCollection" | "DEPRECATED_ColorCollection" | "DEPRECATED_ConditioningCollection" | "DEPRECATED_ControlCollection" | "DEPRECATED_FloatCollection" | "DEPRECATED_ImageCollection" | "DEPRECATED_IntegerCollection" | "DEPRECATED_LatentsCollection" | "DEPRECATED_StringCollection" | "DEPRECATED_BooleanPolymorphic" | "DEPRECATED_ColorPolymorphic" | "DEPRECATED_ConditioningPolymorphic" | "DEPRECATED_ControlPolymorphic" | "DEPRECATED_FloatPolymorphic" | "DEPRECATED_ImagePolymorphic" | "DEPRECATED_IntegerPolymorphic" | "DEPRECATED_LatentsPolymorphic" | "DEPRECATED_StringPolymorphic" | "DEPRECATED_UNet" | "DEPRECATED_Vae" | "DEPRECATED_CLIP" | "DEPRECATED_Collection" | "DEPRECATED_CollectionItem" | "DEPRECATED_Enum" | "DEPRECATED_WorkflowField" | "DEPRECATED_IsIntermediate" | "DEPRECATED_BoardField" | "DEPRECATED_MetadataItem" | "DEPRECATED_MetadataItemCollection" | "DEPRECATED_MetadataItemPolymorphic" | "DEPRECATED_MetadataDict"; - InvocationOutputMap: { - float_collection: components["schemas"]["FloatCollectionOutput"]; - infill_patchmatch: components["schemas"]["ImageOutput"]; - lora_selector: components["schemas"]["LoRASelectorOutput"]; - img_conv: components["schemas"]["ImageOutput"]; - midas_depth_image_processor: components["schemas"]["ImageOutput"]; - invert_tensor_mask: components["schemas"]["MaskOutput"]; - integer: components["schemas"]["IntegerOutput"]; - color_map_image_processor: components["schemas"]["ImageOutput"]; - color_correct: components["schemas"]["ImageOutput"]; - string_collection: components["schemas"]["StringCollectionOutput"]; - merge_metadata: components["schemas"]["MetadataOutput"]; - img_hue_adjust: components["schemas"]["ImageOutput"]; - string_split_neg: components["schemas"]["StringPosNegOutput"]; - face_identifier: components["schemas"]["ImageOutput"]; - controlnet: components["schemas"]["ControlOutput"]; - float_to_int: components["schemas"]["IntegerOutput"]; - lora_collection_loader: components["schemas"]["LoRALoaderOutput"]; - freeu: components["schemas"]["UNetOutput"]; - img_scale: components["schemas"]["ImageOutput"]; - calculate_image_tiles_even_split: components["schemas"]["CalculateImageTilesOutput"]; - sdxl_lora_loader: components["schemas"]["SDXLLoRALoaderOutput"]; - unsharp_mask: components["schemas"]["ImageOutput"]; - dw_openpose_image_processor: components["schemas"]["ImageOutput"]; - img_blur: components["schemas"]["ImageOutput"]; - infill_cv2: components["schemas"]["ImageOutput"]; - face_mask_detection: components["schemas"]["FaceMaskOutput"]; - t2i_adapter: components["schemas"]["T2IAdapterOutput"]; - core_metadata: components["schemas"]["MetadataOutput"]; - rand_float: components["schemas"]["FloatOutput"]; - mediapipe_face_processor: components["schemas"]["ImageOutput"]; - img_resize: components["schemas"]["ImageOutput"]; - latents_collection: components["schemas"]["LatentsCollectionOutput"]; - float_math: components["schemas"]["FloatOutput"]; - range: components["schemas"]["IntegerCollectionOutput"]; - zoe_depth_image_processor: components["schemas"]["ImageOutput"]; - image_mask_to_tensor: components["schemas"]["MaskOutput"]; - sdxl_model_loader: components["schemas"]["SDXLModelLoaderOutput"]; - i2l: components["schemas"]["LatentsOutput"]; - integer_math: components["schemas"]["IntegerOutput"]; - sdxl_compel_prompt: components["schemas"]["ConditioningOutput"]; - seamless: components["schemas"]["SeamlessModeOutput"]; - save_image: components["schemas"]["ImageOutput"]; - lresize: components["schemas"]["LatentsOutput"]; - color: components["schemas"]["ColorOutput"]; - img_chan: components["schemas"]["ImageOutput"]; - l2i: components["schemas"]["ImageOutput"]; - lblend: components["schemas"]["LatentsOutput"]; - img_watermark: components["schemas"]["ImageOutput"]; - image: components["schemas"]["ImageOutput"]; - lineart_anime_image_processor: components["schemas"]["ImageOutput"]; - sub: components["schemas"]["IntegerOutput"]; - rand_int: components["schemas"]["IntegerOutput"]; - main_model_loader: components["schemas"]["ModelLoaderOutput"]; - calculate_image_tiles: components["schemas"]["CalculateImageTilesOutput"]; - face_off: components["schemas"]["FaceOffOutput"]; - image_collection: components["schemas"]["ImageCollectionOutput"]; - mlsd_image_processor: components["schemas"]["ImageOutput"]; - boolean_collection: components["schemas"]["BooleanCollectionOutput"]; - string: components["schemas"]["StringOutput"]; - mask_from_id: components["schemas"]["ImageOutput"]; - noise: components["schemas"]["NoiseOutput"]; - img_mul: components["schemas"]["ImageOutput"]; - pair_tile_image: components["schemas"]["PairTileImageOutput"]; - content_shuffle_image_processor: components["schemas"]["ImageOutput"]; - range_of_size: components["schemas"]["IntegerCollectionOutput"]; - latents: components["schemas"]["LatentsOutput"]; - add: components["schemas"]["IntegerOutput"]; - div: components["schemas"]["IntegerOutput"]; - blank_image: components["schemas"]["ImageOutput"]; - dynamic_prompt: components["schemas"]["StringCollectionOutput"]; - mask_combine: components["schemas"]["ImageOutput"]; - img_nsfw: components["schemas"]["ImageOutput"]; - sdxl_refiner_model_loader: components["schemas"]["SDXLRefinerModelLoaderOutput"]; - step_param_easing: components["schemas"]["FloatCollectionOutput"]; - img_channel_offset: components["schemas"]["ImageOutput"]; - create_denoise_mask: components["schemas"]["DenoiseMaskOutput"]; - rectangle_mask: components["schemas"]["MaskOutput"]; - vae_loader: components["schemas"]["VAEOutput"]; - integer_collection: components["schemas"]["IntegerCollectionOutput"]; - leres_image_processor: components["schemas"]["ImageOutput"]; - lineart_image_processor: components["schemas"]["ImageOutput"]; - round_float: components["schemas"]["FloatOutput"]; - infill_lama: components["schemas"]["ImageOutput"]; - string_join_three: components["schemas"]["StringOutput"]; - collect: components["schemas"]["CollectInvocationOutput"]; - boolean: components["schemas"]["BooleanOutput"]; - create_gradient_mask: components["schemas"]["GradientMaskOutput"]; - string_split: components["schemas"]["String2Output"]; - show_image: components["schemas"]["ImageOutput"]; - mask_edge: components["schemas"]["ImageOutput"]; - random_range: components["schemas"]["IntegerCollectionOutput"]; - float_range: components["schemas"]["FloatCollectionOutput"]; - conditioning: components["schemas"]["ConditioningOutput"]; - cv_inpaint: components["schemas"]["ImageOutput"]; - string_join: components["schemas"]["StringOutput"]; - sdxl_refiner_compel_prompt: components["schemas"]["ConditioningOutput"]; - lora_loader: components["schemas"]["LoRALoaderOutput"]; - compel: components["schemas"]["ConditioningOutput"]; - tomask: components["schemas"]["ImageOutput"]; - esrgan: components["schemas"]["ImageOutput"]; - denoise_latents: components["schemas"]["LatentsOutput"]; - img_ilerp: components["schemas"]["ImageOutput"]; - crop_latents: components["schemas"]["LatentsOutput"]; - prompt_from_file: components["schemas"]["StringCollectionOutput"]; - merge_tiles_to_image: components["schemas"]["ImageOutput"]; - tile_to_properties: components["schemas"]["TileToPropertiesOutput"]; - infill_tile: components["schemas"]["ImageOutput"]; - segment_anything_processor: components["schemas"]["ImageOutput"]; - lscale: components["schemas"]["LatentsOutput"]; - scheduler: components["schemas"]["SchedulerOutput"]; - ideal_size: components["schemas"]["IdealSizeOutput"]; - img_paste: components["schemas"]["ImageOutput"]; - img_channel_multiply: components["schemas"]["ImageOutput"]; - mul: components["schemas"]["IntegerOutput"]; - model_identifier: components["schemas"]["ModelIdentifierOutput"]; - depth_anything_image_processor: components["schemas"]["ImageOutput"]; - metadata_item: components["schemas"]["MetadataItemOutput"]; - alpha_mask_to_tensor: components["schemas"]["MaskOutput"]; - tile_image_processor: components["schemas"]["ImageOutput"]; - pidi_image_processor: components["schemas"]["ImageOutput"]; - calculate_image_tiles_min_overlap: components["schemas"]["CalculateImageTilesOutput"]; - canny_image_processor: components["schemas"]["ImageOutput"]; - hed_image_processor: components["schemas"]["ImageOutput"]; - metadata: components["schemas"]["MetadataOutput"]; - clip_skip: components["schemas"]["CLIPSkipInvocationOutput"]; - canvas_paste_back: components["schemas"]["ImageOutput"]; - sdxl_lora_collection_loader: components["schemas"]["SDXLLoRALoaderOutput"]; - iterate: components["schemas"]["IterateInvocationOutput"]; - heuristic_resize: components["schemas"]["ImageOutput"]; - infill_rgba: components["schemas"]["ImageOutput"]; - ip_adapter: components["schemas"]["IPAdapterOutput"]; - img_pad_crop: components["schemas"]["ImageOutput"]; - img_lerp: components["schemas"]["ImageOutput"]; - img_crop: components["schemas"]["ImageOutput"]; - float: components["schemas"]["FloatOutput"]; - conditioning_collection: components["schemas"]["ConditioningCollectionOutput"]; - normalbae_image_processor: components["schemas"]["ImageOutput"]; - string_replace: components["schemas"]["StringOutput"]; - }; - /** - * BatchEnqueuedEvent - * @description Event model for batch_enqueued - */ - BatchEnqueuedEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Queue Id - * @description The ID of the queue - */ - queue_id: string; - /** - * Batch Id - * @description The ID of the batch - */ - batch_id: string; - /** - * Enqueued - * @description The number of invocations enqueued - */ - enqueued: number; - /** - * Requested - * @description The number of invocations initially requested to be enqueued (may be less than enqueued if queue was full) - */ - requested: number; - /** - * Priority - * @description The priority of the batch - */ - priority: number; - }; - /** - * BulkDownloadCompleteEvent - * @description Event model for bulk_download_complete - */ - BulkDownloadCompleteEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Bulk Download Id - * @description The ID of the bulk image download - */ - bulk_download_id: string; - /** - * Bulk Download Item Id - * @description The ID of the bulk image download item - */ - bulk_download_item_id: string; - /** - * Bulk Download Item Name - * @description The name of the bulk image download item - */ - bulk_download_item_name: string; - }; - /** - * BulkDownloadErrorEvent - * @description Event model for bulk_download_error - */ - BulkDownloadErrorEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Bulk Download Id - * @description The ID of the bulk image download - */ - bulk_download_id: string; - /** - * Bulk Download Item Id - * @description The ID of the bulk image download item - */ - bulk_download_item_id: string; - /** - * Bulk Download Item Name - * @description The name of the bulk image download item - */ - bulk_download_item_name: string; - /** - * Error - * @description The error message - */ - error: string; - }; - /** - * BulkDownloadStartedEvent - * @description Event model for bulk_download_started - */ - BulkDownloadStartedEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Bulk Download Id - * @description The ID of the bulk image download - */ - bulk_download_id: string; - /** - * Bulk Download Item Id - * @description The ID of the bulk image download item - */ - bulk_download_item_id: string; - /** - * Bulk Download Item Name - * @description The name of the bulk image download item - */ - bulk_download_item_name: string; - }; - /** - * DownloadCancelledEvent - * @description Event model for download_cancelled - */ - DownloadCancelledEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Source - * @description The source of the download - */ - source: string; - }; - /** - * DownloadCompleteEvent - * @description Event model for download_complete - */ - DownloadCompleteEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Source - * @description The source of the download - */ - source: string; - /** - * Download Path - * @description The local path where the download is saved - */ - download_path: string; - /** - * Total Bytes - * @description The total number of bytes downloaded - */ - total_bytes: number; - }; - /** - * DownloadErrorEvent - * @description Event model for download_error - */ - DownloadErrorEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Source - * @description The source of the download - */ - source: string; - /** - * Error Type - * @description The type of error - */ - error_type: string; - /** - * Error - * @description The error message - */ - error: string; - }; - /** - * DownloadProgressEvent - * @description Event model for download_progress - */ - DownloadProgressEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Source - * @description The source of the download - */ - source: string; - /** - * Download Path - * @description The local path where the download is saved - */ - download_path: string; - /** - * Current Bytes - * @description The number of bytes downloaded so far - */ - current_bytes: number; - /** - * Total Bytes - * @description The total number of bytes to be downloaded - */ - total_bytes: number; - }; - /** - * DownloadStartedEvent - * @description Event model for download_started - */ - DownloadStartedEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Source - * @description The source of the download - */ - source: string; - /** - * Download Path - * @description The local path where the download is saved - */ - download_path: string; - }; - /** - * BaseInvocation - * @description All invocations must use the `@invocation` decorator to provide their unique type. - */ - BaseInvocation: { - /** - * Id - * @description The id of this instance of an invocation. Must be unique among all instances of invocations. - */ - id: string; - /** - * Is Intermediate - * @description Whether or not this is an intermediate invocation. - * @default false - */ - is_intermediate: boolean; - /** - * Use Cache - * @description Whether or not to use the cache - * @default true - */ - use_cache: boolean; - }; - /** - * BaseInvocationOutput - * @description Base class for all invocation outputs. - * - * All invocation outputs must use the `@invocation_output` decorator to provide their unique type. - */ - BaseInvocationOutput: Record; - /** - * InvocationCompleteEvent - * @description Event model for invocation_complete - */ - InvocationCompleteEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Queue Id - * @description The ID of the queue - */ - queue_id: string; - /** - * Item Id - * @description The ID of the queue item - */ - item_id: number; - /** - * Batch Id - * @description The ID of the queue batch - */ - batch_id: string; - /** - * Session Id - * @description The ID of the session (aka graph execution state) - */ - session_id: string; - /** @description The ID of the invocation */ - invocation: components["schemas"]["BaseInvocation"]; - /** - * Invocation Source Id - * @description The ID of the prepared invocation's source node - */ - invocation_source_id: string; - /** @description The result of the invocation */ - result: components["schemas"]["BaseInvocationOutput"]; - }; - /** - * InvocationDenoiseProgressEvent - * @description Event model for invocation_denoise_progress - */ - InvocationDenoiseProgressEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Queue Id - * @description The ID of the queue - */ - queue_id: string; - /** - * Item Id - * @description The ID of the queue item - */ - item_id: number; - /** - * Batch Id - * @description The ID of the queue batch - */ - batch_id: string; - /** - * Session Id - * @description The ID of the session (aka graph execution state) - */ - session_id: string; - /** @description The ID of the invocation */ - invocation: components["schemas"]["BaseInvocation"]; - /** - * Invocation Source Id - * @description The ID of the prepared invocation's source node - */ - invocation_source_id: string; - /** @description The progress image sent at each step during processing */ - progress_image: components["schemas"]["ProgressImage"]; - /** - * Step - * @description The current step of the invocation - */ - step: number; - /** - * Total Steps - * @description The total number of steps in the invocation - */ - total_steps: number; - /** - * Order - * @description The order of the invocation in the session - */ - order: number; - /** - * Percentage - * @description The percentage of completion of the invocation - */ - percentage: number; - }; - /** - * InvocationErrorEvent - * @description Event model for invocation_error - */ - InvocationErrorEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Queue Id - * @description The ID of the queue - */ - queue_id: string; - /** - * Item Id - * @description The ID of the queue item - */ - item_id: number; - /** - * Batch Id - * @description The ID of the queue batch - */ - batch_id: string; - /** - * Session Id - * @description The ID of the session (aka graph execution state) - */ - session_id: string; - /** @description The ID of the invocation */ - invocation: components["schemas"]["BaseInvocation"]; - /** - * Invocation Source Id - * @description The ID of the prepared invocation's source node - */ - invocation_source_id: string; - /** - * Error Type - * @description The error type - */ - error_type: string; - /** - * Error Message - * @description The error message - */ - error_message: string; - /** - * Error Traceback - * @description The error traceback - */ - error_traceback: string; - /** - * User Id - * @description The ID of the user who created the invocation - * @default null - */ - user_id: string | null; - /** - * Project Id - * @description The ID of the user who created the invocation - * @default null - */ - project_id: string | null; - }; - /** - * InvocationStartedEvent - * @description Event model for invocation_started - */ - InvocationStartedEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Queue Id - * @description The ID of the queue - */ - queue_id: string; - /** - * Item Id - * @description The ID of the queue item - */ - item_id: number; - /** - * Batch Id - * @description The ID of the queue batch - */ - batch_id: string; - /** - * Session Id - * @description The ID of the session (aka graph execution state) - */ - session_id: string; - /** @description The ID of the invocation */ - invocation: components["schemas"]["BaseInvocation"]; - /** - * Invocation Source Id - * @description The ID of the prepared invocation's source node - */ - invocation_source_id: string; - }; - /** - * ModelInstallCancelledEvent - * @description Event model for model_install_cancelled - */ - ModelInstallCancelledEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Id - * @description The ID of the install job - */ - id: number; - /** - * Source - * @description Source of the model; local path, repo_id or url - */ - source: string; - }; - /** - * ModelInstallCompleteEvent - * @description Event model for model_install_complete - */ - ModelInstallCompleteEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Id - * @description The ID of the install job - */ - id: number; - /** - * Source - * @description Source of the model; local path, repo_id or url - */ - source: string; - /** - * Key - * @description Model config record key - */ - key: string; - /** - * Total Bytes - * @description Size of the model (may be None for installation of a local path) - */ - total_bytes: number | null; - }; - /** - * ModelInstallDownloadProgressEvent - * @description Event model for model_install_download_progress - */ - ModelInstallDownloadProgressEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Id - * @description The ID of the install job - */ - id: number; - /** - * Source - * @description Source of the model; local path, repo_id or url - */ - source: string; - /** - * Local Path - * @description Where model is downloading to - */ - local_path: string; - /** - * Bytes - * @description Number of bytes downloaded so far - */ - bytes: number; - /** - * Total Bytes - * @description Total size of download, including all files - */ - total_bytes: number; - /** - * Parts - * @description Progress of downloading URLs that comprise the model, if any - */ - parts: ({ - [key: string]: number | string; - })[]; - }; - /** - * ModelInstallDownloadsCompleteEvent - * @description Emitted once when an install job becomes active. - */ - ModelInstallDownloadsCompleteEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Id - * @description The ID of the install job - */ - id: number; - /** - * Source - * @description Source of the model; local path, repo_id or url - */ - source: string; - }; - /** - * ModelInstallErrorEvent - * @description Event model for model_install_error - */ - ModelInstallErrorEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Id - * @description The ID of the install job - */ - id: number; - /** - * Source - * @description Source of the model; local path, repo_id or url - */ - source: string; - /** - * Error Type - * @description The name of the exception - */ - error_type: string; - /** - * Error - * @description A text description of the exception - */ - error: string; - }; - /** - * ModelInstallStartedEvent - * @description Event model for model_install_started - */ - ModelInstallStartedEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Id - * @description The ID of the install job - */ - id: number; - /** - * Source - * @description Source of the model; local path, repo_id or url - */ - source: string; - }; - /** - * ModelLoadCompleteEvent - * @description Event model for model_load_complete - */ - ModelLoadCompleteEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Config - * @description The model's config - */ - config: components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"]; - /** - * @description The submodel type, if any - * @default null - */ - submodel_type: components["schemas"]["SubModelType"] | null; - }; - /** - * ModelLoadStartedEvent - * @description Event model for model_load_started - */ - ModelLoadStartedEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Config - * @description The model's config - */ - config: components["schemas"]["MainDiffusersConfig"] | components["schemas"]["MainCheckpointConfig"] | components["schemas"]["VAEDiffusersConfig"] | components["schemas"]["VAECheckpointConfig"] | components["schemas"]["ControlNetDiffusersConfig"] | components["schemas"]["ControlNetCheckpointConfig"] | components["schemas"]["LoRALyCORISConfig"] | components["schemas"]["LoRADiffusersConfig"] | components["schemas"]["TextualInversionFileConfig"] | components["schemas"]["TextualInversionFolderConfig"] | components["schemas"]["IPAdapterInvokeAIConfig"] | components["schemas"]["IPAdapterCheckpointConfig"] | components["schemas"]["T2IAdapterConfig"] | components["schemas"]["CLIPVisionDiffusersConfig"]; - /** - * @description The submodel type, if any - * @default null - */ - submodel_type: components["schemas"]["SubModelType"] | null; - }; - /** - * QueueClearedEvent - * @description Event model for queue_cleared - */ - QueueClearedEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Queue Id - * @description The ID of the queue - */ - queue_id: string; - }; - /** - * QueueItemStatusChangedEvent - * @description Event model for queue_item_status_changed - */ - QueueItemStatusChangedEvent: { - /** - * Timestamp - * @description The timestamp of the event - */ - timestamp: number; - /** - * Queue Id - * @description The ID of the queue - */ - queue_id: string; - /** - * Item Id - * @description The ID of the queue item - */ - item_id: number; - /** - * Batch Id - * @description The ID of the queue batch - */ - batch_id: string; - /** - * Status - * @description The new status of the queue item * @enum {string} */ - status: "pending" | "in_progress" | "completed" | "failed" | "canceled"; - /** - * Error Type - * @description The error type, if any - * @default null - */ - error_type: string | null; - /** - * Error Message - * @description The error message, if any - * @default null - */ - error_message: string | null; - /** - * Error Traceback - * @description The error traceback, if any - * @default null - */ - error_traceback: string | null; - /** - * Created At - * @description The timestamp when the queue item was created - * @default null - */ - created_at: string | null; - /** - * Updated At - * @description The timestamp when the queue item was last updated - * @default null - */ - updated_at: string | null; - /** - * Started At - * @description The timestamp when the queue item was started - * @default null - */ - started_at: string | null; - /** - * Completed At - * @description The timestamp when the queue item was completed - * @default null - */ - completed_at: string | null; - /** @description The status of the batch */ - batch_status: components["schemas"]["BatchStatus"]; - /** @description The status of the queue */ - queue_status: components["schemas"]["SessionQueueStatus"]; - /** - * Session Id - * @description The ID of the session (aka graph execution state) - */ - session_id: string; + type: "zoe_depth_image_processor"; }; }; responses: never; diff --git a/invokeai/frontend/web/src/services/api/types.ts b/invokeai/frontend/web/src/services/api/types.ts index 3522d719fb..90ddf3cca1 100644 --- a/invokeai/frontend/web/src/services/api/types.ts +++ b/invokeai/frontend/web/src/services/api/types.ts @@ -122,7 +122,6 @@ export type ModelInstallStatus = S['InstallStatus']; // Graphs export type Graph = S['Graph']; export type NonNullableGraph = O.Required; -export type GraphExecutionState = S['GraphExecutionState']; export type Batch = S['Batch']; export type SessionQueueItemDTO = S['SessionQueueItemDTO']; export type WorkflowRecordOrderBy = S['WorkflowRecordOrderBy']; @@ -132,14 +131,14 @@ export type WorkflowRecordListItemDTO = S['WorkflowRecordListItemDTO']; type KeysOfUnion = T extends T ? keyof T : never; export type AnyInvocation = Exclude< - Graph['nodes'][string], + NonNullable[string], S['CoreMetadataInvocation'] | S['MetadataInvocation'] | S['MetadataItemInvocation'] | S['MergeMetadataInvocation'] >; -export type AnyInvocationIncMetadata = S['Graph']['nodes'][string]; +export type AnyInvocationIncMetadata = NonNullable[string]; export type InvocationType = AnyInvocation['type']; type InvocationOutputMap = S['InvocationOutputMap']; -type AnyInvocationOutput = InvocationOutputMap[InvocationType]; +export type AnyInvocationOutput = InvocationOutputMap[InvocationType]; export type Invocation = Extract; // export type InvocationOutput = InvocationOutputMap[T]; diff --git a/invokeai/frontend/web/src/services/events/types.ts b/invokeai/frontend/web/src/services/events/types.ts index 3a7de93627..a84049cc28 100644 --- a/invokeai/frontend/web/src/services/events/types.ts +++ b/invokeai/frontend/web/src/services/events/types.ts @@ -1,21 +1,12 @@ -import type { Graph, GraphExecutionState, S } from 'services/api/types'; - -export type AnyInvocation = NonNullable[string]>; - -export type AnyResult = NonNullable; +import type { S } from 'services/api/types'; export type ModelLoadStartedEvent = S['ModelLoadStartedEvent']; export type ModelLoadCompleteEvent = S['ModelLoadCompleteEvent']; -export type InvocationStartedEvent = Omit & { invocation: AnyInvocation }; -export type InvocationDenoiseProgressEvent = Omit & { - invocation: AnyInvocation; -}; -export type InvocationCompleteEvent = Omit & { - result: AnyResult; - invocation: AnyInvocation; -}; -export type InvocationErrorEvent = Omit & { invocation: AnyInvocation }; +export type InvocationStartedEvent = S['InvocationStartedEvent']; +export type InvocationDenoiseProgressEvent = S['InvocationDenoiseProgressEvent']; +export type InvocationCompleteEvent = S['InvocationCompleteEvent']; +export type InvocationErrorEvent = S['InvocationErrorEvent']; export type ProgressImage = InvocationDenoiseProgressEvent['progress_image']; export type ModelInstallDownloadProgressEvent = S['ModelInstallDownloadProgressEvent']; diff --git a/pyproject.toml b/pyproject.toml index 3913a6cd1f..bb30747ba8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,10 +55,10 @@ dependencies = [ # Core application dependencies, pinned for reproducible builds. "fastapi-events==0.11.0", - "fastapi==0.110.0", + "fastapi==0.111.0", "huggingface-hub==0.23.1", "pydantic-settings==2.2.1", - "pydantic==2.6.3", + "pydantic==2.7.2", "python-socketio==5.11.1", "uvicorn[standard]==0.28.0", diff --git a/scripts/generate_openapi_schema.py b/scripts/generate_openapi_schema.py index dd1f5b85dd..70baa194dc 100644 --- a/scripts/generate_openapi_schema.py +++ b/scripts/generate_openapi_schema.py @@ -7,9 +7,10 @@ def main(): # Change working directory to the repo root os.chdir(os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) - from invokeai.app.api_app import custom_openapi + from invokeai.app.api_app import app + from invokeai.app.util.custom_openapi import get_openapi_func - schema = custom_openapi() + schema = get_openapi_func(app)() json.dump(schema, sys.stdout, indent=2) diff --git a/tests/test_node_graph.py b/tests/test_node_graph.py index 87a4948af4..861f1bd07b 100644 --- a/tests/test_node_graph.py +++ b/tests/test_node_graph.py @@ -1,5 +1,6 @@ import pytest from pydantic import TypeAdapter +from pydantic.json_schema import models_json_schema from invokeai.app.invocations.baseinvocation import ( BaseInvocation, @@ -713,4 +714,4 @@ def test_iterate_accepts_collection(): def test_graph_can_generate_schema(): # Not throwing on this line is sufficient # NOTE: if this test fails, it's PROBABLY because a new invocation type is breaking schema generation - _ = Graph.model_json_schema() + models_json_schema([(Graph, "serialization")])