Skip to content

Commit 5632b2d

Browse files
Yourzchristian-byrneampcode-comKosinkadink
authored
feat: add essentials_category (#12357)
* feat: add essentials_category field to node schema Amp-Thread-ID: https://ampcode.com/threads/T-019c2b25-cd90-7218-9071-03cb46b351b3 * feat: add ESSENTIALS_CATEGORY to core nodes Marked nodes: - Basic: LoadImage, SaveImage, LoadVideo, SaveVideo, Load3D, CLIPTextEncode - Image Tools: ImageScale, ImageInvert, ImageBatch, ImageCrop, ImageRotate, ImageBlur - Image Tools/Preprocessing: Canny - Image Generation: LoraLoader - Audio: LoadAudio, SaveAudio Amp-Thread-ID: https://ampcode.com/threads/T-019c2b25-cd90-7218-9071-03cb46b351b3 * Add ESSENTIALS_CATEGORY to more nodes - SaveGLB (Basic) - GetVideoComponents (Video Tools) - TencentTextToModelNode, TencentImageToModelNode (3D) - RecraftRemoveBackgroundNode (Image Tools) - KlingLipSyncAudioToVideoNode (Video Generation) - OpenAIChatNode (Text Generation) - StabilityTextToAudio (Audio) Amp-Thread-ID: https://ampcode.com/threads/T-019c2b69-81c1-71c3-8096-450a39e20910 * fix: correct essentials category for Canny node Amp-Thread-ID: https://ampcode.com/threads/T-019c7303-ab53-7341-be76-a5da1f7a657e Co-authored-by: Amp <amp@ampcode.com> * refactor: replace essentials_category string literals with constants Amp-Thread-ID: https://ampcode.com/threads/T-019c7303-ab53-7341-be76-a5da1f7a657e Co-authored-by: Amp <amp@ampcode.com> * refactor: revert constants, use string literals for essentials_category Amp-Thread-ID: https://ampcode.com/threads/T-019c7303-ab53-7341-be76-a5da1f7a657e Co-authored-by: Amp <amp@ampcode.com> * fix: update basics --------- Co-authored-by: bymyself <cbyrne@comfy.org> Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: Jedrzej Kosinski <kosinkadink1@gmail.com>
1 parent 2687652 commit 5632b2d

File tree

15 files changed

+34
-0
lines changed

15 files changed

+34
-0
lines changed

comfy_api/latest/_io.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,6 +1339,7 @@ class NodeInfoV1:
13391339
api_node: bool=None
13401340
price_badge: dict | None = None
13411341
search_aliases: list[str]=None
1342+
essentials_category: str=None
13421343

13431344

13441345
@dataclass
@@ -1460,6 +1461,8 @@ class Schema:
14601461
"""Flags a node as expandable, allowing NodeOutput to include 'expand' property."""
14611462
accept_all_inputs: bool=False
14621463
"""When True, all inputs from the prompt will be passed to the node as kwargs, even if not defined in the schema."""
1464+
essentials_category: str | None = None
1465+
"""Optional category for the Essentials tab. Path-based like category field (e.g., 'Basic', 'Image Tools/Editing')."""
14631466

14641467
def validate(self):
14651468
'''Validate the schema:
@@ -1566,6 +1569,7 @@ def get_v1_info(self, cls) -> NodeInfoV1:
15661569
python_module=getattr(cls, "RELATIVE_PYTHON_MODULE", "nodes"),
15671570
price_badge=self.price_badge.as_dict(self.inputs) if self.price_badge is not None else None,
15681571
search_aliases=self.search_aliases if self.search_aliases else None,
1572+
essentials_category=self.essentials_category,
15691573
)
15701574
return info
15711575

comfy_api_nodes/nodes_hunyuan3d.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def define_schema(cls):
5454
node_id="TencentTextToModelNode",
5555
display_name="Hunyuan3D: Text to Model",
5656
category="api node/3d/Tencent",
57+
essentials_category="3D",
5758
inputs=[
5859
IO.Combo.Input(
5960
"model",
@@ -168,6 +169,7 @@ def define_schema(cls):
168169
node_id="TencentImageToModelNode",
169170
display_name="Hunyuan3D: Image(s) to Model",
170171
category="api node/3d/Tencent",
172+
essentials_category="3D",
171173
inputs=[
172174
IO.Combo.Input(
173175
"model",

comfy_api_nodes/nodes_kling.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,6 +2262,7 @@ def define_schema(cls) -> IO.Schema:
22622262
node_id="KlingLipSyncAudioToVideoNode",
22632263
display_name="Kling Lip Sync Video with Audio",
22642264
category="api node/video/Kling",
2265+
essentials_category="Video Generation",
22652266
description="Kling Lip Sync Audio to Video Node. Syncs mouth movements in a video file to the audio content of an audio file. When using, ensure that the audio contains clearly distinguishable vocals and that the video contains a distinct face. The audio file should not be larger than 5MB. The video file should not be larger than 100MB, should have height/width between 720px and 1920px, and should be between 2s and 10s in length.",
22662267
inputs=[
22672268
IO.Video.Input("video"),

comfy_api_nodes/nodes_openai.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ def define_schema(cls):
575575
node_id="OpenAIChatNode",
576576
display_name="OpenAI ChatGPT",
577577
category="api node/text/OpenAI",
578+
essentials_category="Text Generation",
578579
description="Generate text responses from an OpenAI model.",
579580
inputs=[
580581
IO.String.Input(

comfy_api_nodes/nodes_recraft.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -963,6 +963,7 @@ def define_schema(cls):
963963
node_id="RecraftRemoveBackgroundNode",
964964
display_name="Recraft Remove Background",
965965
category="api node/image/Recraft",
966+
essentials_category="Image Tools",
966967
description="Remove background from image, and return processed image and mask.",
967968
inputs=[
968969
IO.Image.Input("image"),

comfy_api_nodes/nodes_stability.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ def define_schema(cls):
624624
node_id="StabilityTextToAudio",
625625
display_name="Stability AI Text To Audio",
626626
category="api node/audio/Stability AI",
627+
essentials_category="Audio",
627628
description=cleandoc(cls.__doc__ or ""),
628629
inputs=[
629630
IO.Combo.Input(

comfy_extras/nodes_audio.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ def define_schema(cls):
159159
search_aliases=["export flac"],
160160
display_name="Save Audio (FLAC)",
161161
category="audio",
162+
essentials_category="Audio",
162163
inputs=[
163164
IO.Audio.Input("audio"),
164165
IO.String.Input("filename_prefix", default="audio/ComfyUI"),
@@ -300,6 +301,7 @@ def define_schema(cls):
300301
search_aliases=["import audio", "open audio", "audio file"],
301302
display_name="Load Audio",
302303
category="audio",
304+
essentials_category="Audio",
303305
inputs=[
304306
IO.Combo.Input("audio", upload=IO.UploadType.audio, options=sorted(files)),
305307
],

comfy_extras/nodes_canny.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def define_schema(cls):
1212
node_id="Canny",
1313
search_aliases=["edge detection", "outline", "contour detection", "line art"],
1414
category="image/preprocessors",
15+
essentials_category="Image Tools",
1516
inputs=[
1617
io.Image.Input("image"),
1718
io.Float.Input("low_threshold", default=0.4, min=0.01, max=0.99, step=0.01),

comfy_extras/nodes_hunyuan3d.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,7 @@ def define_schema(cls):
621621
display_name="Save 3D Model",
622622
search_aliases=["export 3d model", "save mesh"],
623623
category="3d",
624+
essentials_category="Basics",
624625
is_output_node=True,
625626
inputs=[
626627
IO.MultiType.Input(

comfy_extras/nodes_images.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def define_schema(cls):
2626
display_name="Image Crop (Deprecated)",
2727
category="image/transform",
2828
is_deprecated=True,
29+
essentials_category="Image Tools",
2930
inputs=[
3031
IO.Image.Input("image"),
3132
IO.Int.Input("width", default=512, min=1, max=nodes.MAX_RESOLUTION, step=1),
@@ -589,6 +590,7 @@ def define_schema(cls):
589590
node_id="ImageRotate",
590591
search_aliases=["turn", "flip orientation"],
591592
category="image/transform",
593+
essentials_category="Image Tools",
592594
inputs=[
593595
IO.Image.Input("image"),
594596
IO.Combo.Input("rotation", options=["none", "90 degrees", "180 degrees", "270 degrees"]),

0 commit comments

Comments
 (0)