From 429dfb75870633a000282fb3214fc3ffb42021b3 Mon Sep 17 00:00:00 2001 From: Robin Huang Date: Tue, 22 Apr 2025 13:45:23 -0700 Subject: [PATCH] Push tests. --- comfy_api_nodes/apis/PixverseController.py | 2 +- comfy_api_nodes/apis/PixverseDto.py | 2 +- comfy_api_nodes/apis/__init__.py | 40 +++++++++++++++++----- 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/comfy_api_nodes/apis/PixverseController.py b/comfy_api_nodes/apis/PixverseController.py index f3a0ca089..9095db2f8 100644 --- a/comfy_api_nodes/apis/PixverseController.py +++ b/comfy_api_nodes/apis/PixverseController.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: http://localhost:8080/openapi -# timestamp: 2025-04-22T09:57:11+00:00 +# timestamp: 2025-04-22T20:42:39+00:00 from __future__ import annotations diff --git a/comfy_api_nodes/apis/PixverseDto.py b/comfy_api_nodes/apis/PixverseDto.py index ce4779b0a..35a0a7f1b 100644 --- a/comfy_api_nodes/apis/PixverseDto.py +++ b/comfy_api_nodes/apis/PixverseDto.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: http://localhost:8080/openapi -# timestamp: 2025-04-22T09:57:11+00:00 +# timestamp: 2025-04-22T20:42:39+00:00 from __future__ import annotations diff --git a/comfy_api_nodes/apis/__init__.py b/comfy_api_nodes/apis/__init__.py index 15a12bb0f..c6951095f 100644 --- a/comfy_api_nodes/apis/__init__.py +++ b/comfy_api_nodes/apis/__init__.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: http://localhost:8080/openapi -# timestamp: 2025-04-22T09:57:11+00:00 +# timestamp: 2025-04-22T20:42:39+00:00 from __future__ import annotations @@ -1058,6 +1058,34 @@ class NodeVersionUpdateRequest(BaseModel): ) +class Quality(str, Enum): + low = 'low' + medium = 'medium' + high = 'high' + + +class OpenAIImageEditRequest(BaseModel): + image: Union[bytes_aliased, List[bytes_aliased]] = Field( + ..., + description='Image(s) to edit. For DALL-E 2, only a single image is supported. For gpt-image-1, multiple images can be provided using image[] notation in form data.', + ) + mask: Optional[bytes_aliased] = Field( + None, + description='An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited', + ) + model: str = Field( + ..., description='The model to use for image editing', examples=['gpt-image-1'] + ) + prompt: str = Field( + ..., + description='A text description of the desired edit', + examples=['Give the rocketship rainbow coloring'], + ) + quality: Optional[Quality] = Field( + None, description='The quality of the edited image', examples=['low'] + ) + + class Background(str, Enum): transparent = 'transparent' opaque = 'opaque' @@ -1074,12 +1102,6 @@ class OutputFormat(str, Enum): jpeg = 'jpeg' -class Quality(str, Enum): - low = 'low' - medium = 'medium' - high = 'high' - - class ResponseFormat(str, Enum): url = 'url' b64_json = 'b64_json' @@ -1104,11 +1126,11 @@ class OpenAIImageGenerationRequest(BaseModel): ) n: Optional[int] = Field( None, - description='The number of images to generate (1–10). Only 1 supported for dall-e-3.', + description='The number of images to generate (1-10). Only 1 supported for dall-e-3.', examples=[1], ) output_compression: Optional[int] = Field( - None, description='Compression level for JPEG or WebP (0–100)', examples=[100] + None, description='Compression level for JPEG or WebP (0-100)', examples=[100] ) output_format: Optional[OutputFormat] = Field( None, description='Format of the output image', examples=['png']