Skip to content

Conversation

guill
Copy link
Collaborator

@guill guill commented Jul 29, 2025

This PR is meant to be a minimal example of how we would introduce the concept of
a ComfyExtension in a way that would allow us to add additional extension points in
the future without either breaking old functionality or introducing an ever-growing
list of 'magic keywords' that people just have to know about.

@Kosinkadink
Copy link
Collaborator

For extension.get_node_list(), should we make that support both sync and async as well (iscoroutine check)?

@guill
Copy link
Collaborator Author

guill commented Jul 30, 2025

I'm leaning away from doing that check everywhere. Every implementation that would work with def get_node_list will also work with async def get_node_list, and standard type hinting should warn if someone isn't using async on the @override (I think).

The only reason I'm doing the check with comfy_entrypoint is because it's a function using a magic attribute name -- there isn't any sort of type-hinting that can be made available to show the signature.

@guill
Copy link
Collaborator Author

guill commented Jul 30, 2025

Oh, also realized I'm missing the ComfyExtension in the versioned modules (e.g. v0_0_2). Would obviously want to add it there as well.

@Kosinkadink Kosinkadink added the v3 label Jul 30, 2025
@Kosinkadink
Copy link
Collaborator

mergin

@Kosinkadink Kosinkadink merged commit 7a522e4 into comfyanonymous:v3-definition Jul 31, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants