3516 Commits

Author SHA1 Message Date
bymyself
7a691c980f Fix OpenAPI validation by resolving duplicate content blocks
- Fixed all duplicate YAML content entries in both main and test files
- Reverted from OpenAPI 3.1 to 3.0.3 for GitHub Actions compatibility
- QueueItem now uses minItems/maxItems instead of prefixItems
- All endpoints now have proper response schema organization
2025-07-20 16:55:47 -07:00
bymyself
6a70191868 Fix remaining duplicate content blocks in internal endpoints
- Fixed duplicate content in /api/system_stats GET
- Fixed duplicate content in /api/features GET
- Fixed duplicate content in /internal/logs GET
- Fixed duplicate content in /internal/logs/raw GET
- Fixed duplicate content in /internal/folder_paths GET
- Fixed duplicate content in /internal/files/{directory_type} GET

OpenAPI spec now passes all validation checks!
2025-07-20 14:44:27 -07:00
bymyself
f2cd7d3e13 Fix duplicate content blocks in model and system endpoints
- Fixed duplicate content in /api/models GET
- Fixed duplicate content in /api/models/{folder} GET
- Fixed duplicate content in /api/embeddings GET
- Fixed duplicate content in /api/extensions GET
- Consistently moved data schemas to 200 responses
2025-07-19 19:04:29 -07:00
bymyself
90e701b411 Fix more duplicate content blocks (upload and view endpoints)
- Fixed duplicate content in /api/object_info/{node_class} GET
- Fixed duplicate content in /api/upload/image POST
- Fixed duplicate content in /api/upload/mask POST
- Fixed duplicate content in /api/view GET
- Moved response schemas to appropriate status codes
2025-07-19 18:15:59 -07:00
bymyself
90d6b88739 Fix more duplicate content blocks in OpenAPI spec
- Fixed duplicate content in /api/history/{prompt_id} GET response
- Fixed duplicate content in /api/object_info GET response
- Moved actual response schemas to 200 responses where they belong
2025-07-19 15:14:17 -07:00
bymyself
f0ffa84e2f Fix first two duplicate content blocks in OpenAPI spec
- Fixed duplicate content in /api/queue GET response
- Fixed duplicate content in /api/history GET response
- Working systematically through all YAML duplicate key errors
2025-07-19 14:32:58 -07:00
bymyself
c88afc94c8 Fix duplicate content in /api/prompt GET response
- Fixed duplicate content entries in OpenAPI spec that were causing validation failures
- Maintained OpenAPI 3.1.0 and prefixItems structure
- Ensures proper YAML structure for GitHub Actions validation
2025-07-18 14:11:58 -07:00
bymyself
78fcc57e33 Update to OpenAPI 3.1.0 and use prefixItems for QueueItem
- Changed OpenAPI version from 3.0.3 to 3.1.0 as suggested in PR review
- Updated QueueItem schema to use prefixItems instead of oneOf for proper tuple representation
- Added items: false to enforce the 5-element tuple structure
- Follows OpenAPI 3.1 best practices for representing fixed-length arrays (tuples)
2025-07-18 13:46:36 -07:00
bymyself
13a970b3a6 Create minimal valid OpenAPI specification in root directory
- Place openapi.yaml in root directory where GitHub Actions workflow expects it
- Remove duplicate content and response keys that caused validation failures
- Use proper server URL format for validator compatibility
- Include essential endpoints and schema components for basic validation

This should resolve the 'Unable to render this definition' error in the OpenAPI validation workflow.
2025-07-15 12:43:47 -07:00
bymyself
c7f1f656a5 Fix OpenAPI specification validation errors
- Remove duplicate 'content' and '500' response entries that were causing validation failures
- Ensure proper YAML structure with unique response codes and single content definitions
- All OpenAPI spec validation tests now pass

Fixes GitHub Actions test failure in openapi-check workflow
2025-07-15 09:07:18 -07:00
bymyself
16893d8b00 [openapi] Replace view metadata generic object with detailed schema
Replace generic 'type: object' for /api/view_metadata endpoint with
comprehensive ModelMetadata schema that includes:

- Standard modelspec fields (date, architecture, title, description)
- Implementation details (format, license, author)
- Additional metadata with proper typing
- Base64 thumbnail support

This provides much better API documentation for model metadata
responses than the previous generic object definition.
2025-07-14 19:24:51 -07:00
bymyself
3e0a4d5988 [openapi] Add comprehensive 500 Internal Server Error responses
Add 500 error responses to endpoints that previously only had 200:
- /api/prompt GET
- /api/queue GET
- /api/interrupt POST
- /api/free POST
- /api/features GET
- /api/history GET/POST
- /api/object_info endpoints
- /api/embeddings, /api/extensions, /api/system_stats
- /internal/logs and /internal/folder_paths endpoints

This provides complete error coverage for system failures and
improves API reliability documentation.
2025-07-14 19:24:51 -07:00
bymyself
5c9b27e6e7 [openapi] Improve queue item structure with proper schema
Replace generic additionalProperties: true for queue items with
detailed QueueItem schema that properly describes the array structure:

- Position number (integer)
- Prompt ID (UUID string)
- Workflow graph (object)
- Extra metadata (object)
- Output node IDs (array)

This provides much better API documentation and validation for
queue responses than the previous generic object definition.
2025-07-14 19:24:51 -07:00
bymyself
b5d6064974 [openapi] Add missing /api/features endpoint and improve schema organization
- Add /api/features endpoint with ServerFeatures response schema
- Replace inline objects in /internal/logs/raw with RawLogsResponse schema
- Add LogEntry and TerminalSize component schemas for better reusability
- Replace inline LogsSubscribeRequest object with proper schema component
- Add required field constraints to LogsSubscribeRequest

This addresses the missing features endpoint and improves schema
consistency by moving complex inline objects to reusable components.
2025-07-14 19:24:51 -07:00
bymyself
1d2b704160 [openapi] Improve upload endpoint request schemas
Enhance multipart/form-data schemas for image upload endpoints:

- Add required field constraints for image uploads
- Specify enum values for overwrite parameter ("true"/"false")
- Add default values for type ("input") and subfolder ("")
- Mark image and original_ref as required fields for mask uploads
- Improve field descriptions and validation

These changes make the API specification more precise and match
the actual server implementation requirements.
2025-07-14 19:24:51 -07:00
bymyself
7baed85b1d [openapi] Replace bare object schemas with proper component references
Replace inline object definitions for queue, history, and resource management
operations with reusable schema components:

- Add QueueManageRequest schema for /api/queue POST requests
- Add FreeResourcesRequest schema for /api/free POST requests
- Add HistoryManageRequest schema for /api/history POST requests
- Add UploadResponse schema for upload endpoints

This improves API consistency and reusability by moving common
object definitions to the components section.
2025-07-14 19:24:51 -07:00
bymyself
d6270cbdf3 [api] Add /api prefix to all paths in OpenAPI spec
- Updated all API paths (except internal routes) to include /api/ prefix
- Changed server URL from "/api" back to "/" and added prefix to individual paths
- Updated test fixtures to not add /api prefix since paths already include it
- Fixed all test assertions to use the new paths with /api/ prefix

This addresses the review comment about endpoints needing the /api/ prefix
and implements it correctly by hardcoding the prefix in each path definition.

Fixes #8219
2025-06-29 18:36:51 -07:00
bymyself
82c1852390 [tests] Fix ruff linting errors
Remove trailing whitespace from blank lines
2025-06-28 22:57:51 -07:00
bymyself
cb66a887af [tests] Handle null device index in schema validation tests
ComfyUI returns null for CPU device index, but OpenAPI/JSON Schema
doesn't have good support for nullable fields. Remove null index
fields before validation as a workaround.
2025-06-28 22:50:46 -07:00
bymyself
d74a189e1c [openapi] Remove nullable from device index field
The nullable syntax was causing validation issues. Since the field is optional,
it can simply be omitted when null.
2025-06-28 22:35:32 -07:00
bymyself
2ff6b5388e [tests] Update API tests to use /api prefix
- Simplified api_client fixture to hardcode /api prefix
- Updated websocket endpoint test to use /api/ws
- Fixed internal endpoint tests to not use /api prefix
- Enhanced validation.py to handle OpenAPI nullable syntax
2025-06-28 22:30:37 -07:00
bymyself
2a032017b2 [openapi] Update server URL to use /api prefix
- Changed server URL from / to /api to reflect the canonical API path
- Made device index field nullable to match actual server response

This addresses the review comment about endpoints needing the /api/ prefix.
2025-06-28 22:30:24 -07:00
bymyself
d65ad9940b add swagger validator workflow 2025-05-21 21:15:41 -07:00
bymyself
e8a92e4c9b Fix linting issues in API tests 2025-05-20 12:26:56 -07:00
bymyself
fa9688b1fb [docs] Add OpenAPI specification and test framework 2025-05-20 12:15:46 -07:00
comfyanonymous
87f9130778
Revert "This doesn't seem to be needed on chroma. (#8209)" (#8210)
This reverts commit 7e84bf53737879ace37a68dc93e0df7704a53514.
2025-05-20 05:39:55 -04:00
comfyanonymous
7e84bf5373
This doesn't seem to be needed on chroma. (#8209) 2025-05-20 05:29:23 -04:00
filtered
4f3b50ba51
Update README ROCm text to match link (#8199)
- Follow-up on #8198
2025-05-19 16:40:55 -04:00
comfyanonymous
e930a387d6
Update AMD instructions in README. (#8198) 2025-05-19 04:58:41 -04:00
comfyanonymous
d8e5662822
Remove default delimiter. (#8183) 2025-05-18 04:12:12 -04:00
LaVie024
3d44a09812
Update nodes_string.py (#8173) 2025-05-18 04:11:11 -04:00
comfyanonymous
62690eddec
Node to add pixel space noise to an image. (#8182) 2025-05-18 04:09:56 -04:00
Christian Byrne
05eb10b43a
Validate video inputs (#8133)
* validate kling lip sync input video

* add tooltips

* update duration estimates

* decrease epsilon

* fix rebase error
2025-05-18 04:08:47 -04:00
Silver
f5e4e976f4
Add missing category for T5TokenizerOption (#8177)
Change it if you need to but it should at least have a category.
2025-05-18 02:59:06 -04:00
comfyanonymous
aee2908d03
Remove useless log. (#8166) 2025-05-17 06:27:34 -04:00
comfyanonymous
dc46db7aa4
Make ImagePadForOutpaint return a 3 channel mask. (#8157) 2025-05-16 15:15:55 -04:00
filtered
7046983d95
Remove Desktop versioning claim from README (#8155) 2025-05-16 10:45:36 -07:00
comfyanonymous
1c2d45d2b5
Fix typo in last PR. (#8144)
More robust model detection for future proofing.
2025-05-15 19:02:19 -04:00
George0726
c820ef950d
Add Wan-FUN Camera Control models and Add WanCameraImageToVideo node (#8013)
* support wan camera models

* fix by ruff check

* change camera_condition type; make camera_condition optional

* support camera trajectory nodes

* fix camera direction

---------

Co-authored-by: Qirui Sun <sunqr0667@126.com>
2025-05-15 19:00:43 -04:00
comfyanonymous
6a2e4bb9e0
Remove old hack used to fix windows pytorch 2.4 on the portable. (#8139)
Not necessary anymore.
2025-05-15 08:21:47 -04:00
Christian Byrne
f1f9763b4c
Add get_duration method to Comfy VIDEO type (#8122)
* get duration from VIDEO type

* video get_duration unit test

* fix Windows unit test: can't delete opened temp file
2025-05-15 00:11:41 -04:00
comfyanonymous
08368f8e00
Update comment on ROCm pytorch attention in README. (#8123) 2025-05-14 17:54:50 -04:00
Christian Byrne
f3ff5c40db
don't retry if API returns task failure (#8111) 2025-05-14 01:28:30 -04:00
Christian Byrne
98ff01e148
Display progress and result URL directly on API nodes (#8102)
* [Luma] Print download URL of successful task result directly on nodes (#177)

[Veo] Print download URL of successful task result directly on nodes (#184)

[Recraft] Print download URL of successful task result directly on nodes (#183)

[Pixverse] Print download URL of successful task result directly on nodes (#182)

[Kling] Print download URL of successful task result directly on nodes (#181)

[MiniMax] Print progress text and download URL of successful task result directly on nodes (#179)

[Docs] Link to docs in `API_NODE` class property type annotation comment (#178)

[Ideogram] Print download URL of successful task result directly on nodes (#176)

[Kling] Print download URL of successful task result directly on nodes (#181)

[Veo] Print download URL of successful task result directly on nodes (#184)

[Recraft] Print download URL of successful task result directly on nodes (#183)

[Pixverse] Print download URL of successful task result directly on nodes (#182)

[MiniMax] Print progress text and download URL of successful task result directly on nodes (#179)

[Docs] Link to docs in `API_NODE` class property type annotation comment (#178)

[Luma] Print download URL of successful task result directly on nodes (#177)

[Ideogram] Print download URL of successful task result directly on nodes (#176)

Show output URL and progress text on Pika nodes (#168)

[BFL] Print download URL of successful task result directly on nodes (#175)

[OpenAI ] Print download URL of successful task result directly on nodes (#174)

* fix ruff errors

* fix 3.10 syntax error
2025-05-14 00:33:18 -04:00
thot experiment
bab836d88d
rework client.py to be more robust, add logging of api requests (#7988)
* rework how errors are handled on the client side

* add logging to /temp

* fix ruff

* fix rebase, stupid vscode gui
2025-05-13 20:42:29 -04:00
comfyanonymous
4a9014e201
Hunyuan Custom initial untested implementation. (#8101) 2025-05-13 15:53:47 -04:00
thot experiment
8a7c894d54
fix negative momentum (#8100) 2025-05-13 10:50:32 -07:00
comfyanonymous
a814f2e8cc
Fix issue with old pytorch RMSNorm. (#8095) 2025-05-13 07:54:28 -04:00
comfyanonymous
481732a0ed
Support official ACE Step loras. (#8094) 2025-05-13 07:32:16 -04:00
Christian Byrne
2156ce9453
add comment about using api key in headless (#8082) 2025-05-12 23:06:44 -04:00