Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update public API syntax of remote (lazy) widgets #2477

Merged
merged 2 commits into from
Feb 9, 2025

Conversation

christian-byrne
Copy link
Collaborator

@christian-byrne christian-byrne commented Feb 9, 2025

Updates the public API syntax of nodes with remote inputs. The type property already exists on BaseInputSpec, causing remote widget's type to be shadowed when transformed to ComfyNodeDefImpl, potentially causing issues in the future.

No custom nodes use this feature yet (code source query).

class RemoteWidgetNode:
    @classmethod
    def INPUT_TYPES(cls):
        return {
            "required": {
                "remote_widget_value": (
                    "COMBO",
                    {
-                        "type": "remote",
-                        "route": "/api/models/checkpoints",
-                        "refresh": 1000,
+                        "remote": {
+                            "route": "/api/models/checkpoints",
+                            "refresh": 1000,
+                        },
                    },
                ),
            },
        }

┆Issue is synchronized with this Notion page by Unito

@christian-byrne christian-byrne requested review from a team as code owners February 9, 2025 05:12
@huchenlei huchenlei force-pushed the remote-widget-api-syntax branch from 8f516bc to d8e767f Compare February 9, 2025 17:02
@huchenlei huchenlei merged commit eeb1c34 into main Feb 9, 2025
10 checks passed
@huchenlei huchenlei deleted the remote-widget-api-syntax branch February 9, 2025 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants