[PR #135] fix: use typing.List in na3d signature for PyTorch custom_op compatib… #166

Open
opened 2026-10-26 22:21:04 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-kitchen/pull/135
Author: @itzero-ru
Created: 8/24/2026
Status: 🔄 Open

Base: main ← Head: fix-pytorch-schema-typing


📝 Commits (1)

  • dc9bd5d fix: use typing.List in na3d signature for PyTorch custom_op compatibility

📊 Changes

1 file changed (+6 additions, -4 deletions)

View changed files

📝 comfy_kitchen/backends/eager/na.py (+6 -4)

📄 Description

…ility

Description
Fixes a ValueError during startup when registering comfy_kitchen::na3d with @torch.library.custom_op.

PyTorch's infer_schema currently does not support the built-in list[int] and list[bool] type hints and explicitly requires typing.List. This PR updates the signature in backends/eager/na.py to use typing.List to restore compatibility.

Error Traceback:
ValueError: infer_schema(func): Parameter kernel_size has unsupported type list[int]. The valid types are: ... typing.List[int] ...


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/comfy-kitchen/pull/135 **Author:** [@itzero-ru](https://github.com/itzero-ru) **Created:** 8/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-pytorch-schema-typing` --- ### 📝 Commits (1) - [`dc9bd5d`](https://github.com/Comfy-Org/comfy-kitchen/commit/dc9bd5df482640f0367343c3d77f5dad45fbc3c2) fix: use typing.List in na3d signature for PyTorch custom_op compatibility ### 📊 Changes **1 file changed** (+6 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `comfy_kitchen/backends/eager/na.py` (+6 -4) </details> ### 📄 Description …ility **Description** Fixes a `ValueError` during startup when registering `comfy_kitchen::na3d` with `@torch.library.custom_op`. PyTorch's `infer_schema` currently does not support the built-in `list[int]` and `list[bool]` type hints and explicitly requires `typing.List`. This PR updates the signature in `backends/eager/na.py` to use `typing.List` to restore compatibility. **Error Traceback:** `ValueError: infer_schema(func): Parameter kernel_size has unsupported type list[int]. The valid types are: ... typing.List[int] ...` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-kitchen#166
No description provided.