custom-nodes/v3_migration #501
Replies: 10 comments 3 replies
-
|
Please mention that to name an output you must use something like: io.Image.Output(display_name="images", tooltip=IMAGE_TOOLTIP)And that io.Image.Output("images", tooltip=IMAGE_TOOLTIP)Is interpreted as |
Beta Was this translation helpful? Give feedback.
-
|
Also: which ComfyUI version is required for v3 API? BTW: Migrating nodes that inherit from other nodes generates really confusing effects, like you see on the frontend the right schema, but the validation is fully messed. As the spec is moving to stateless classes I think the docs should mention that inheritance is discouraged. And for the record: the classes didn't call |
Beta Was this translation helpful? Give feedback.
-
|
|
Beta Was this translation helpful? Give feedback.
-
|
also see Node Definitions https://docs.comfy.org/specs/nodedef_json |
Beta Was this translation helpful? Give feedback.
-
|
for the __all__ = [
"NODE_CLASS_MAPPINGS",
"NODE_DISPLAY_NAME_MAPPINGS",
"WEB_DIRECTORY",
]
from .src.subproject import (NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS)use this instead: from comfy_api.latest import ComfyExtension, io
from mymodule.mynode import MyNode
WEB_DIRECTORY = "./web"
__all__ = ["WEB_DIRECTORY"]
async def comfy_entrypoint() -> ComfyExtension:
class MyExtension(ComfyExtension):
async def get_node_list(self) -> list[type[io.ComfyNode]]:
return [
MyNode,
]
return MyExtension() |
Beta Was this translation helpful? Give feedback.
-
|
what about class AnyType(str):
def __ne__(self, __value: object) -> bool:
return False
any = AnyType("*")? |
Beta Was this translation helpful? Give feedback.
-
set |
Beta Was this translation helpful? Give feedback.
-
|
What about |
Beta Was this translation helpful? Give feedback.
-
|
What about @classmethod
def IS_CHANGED(s, image):
return float("NaN")
|
Beta Was this translation helpful? Give feedback.
-
|
What about "hidden": {
"unique_id": "UNIQUE_ID",
"prompt": "PROMPT",
"extra_pnginfo": "EXTRA_PNGINFO",
}? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
custom-nodes/v3_migration
How to migrate your existing V1 nodes to the new V3 schema.
https://docs.comfy.org/custom-nodes/v3_migration
Beta Was this translation helpful? Give feedback.
All reactions