Skip to content

Commit 4b34511

Browse files
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
1 parent 078008b commit 4b34511

7 files changed

Lines changed: 17 additions & 0 deletions

File tree

comfy_extras/nodes_audio.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ def define_schema(cls):
129129
search_aliases=["export flac"],
130130
display_name="Save Audio (FLAC)",
131131
category="audio",
132+
essentials_category="Audio",
132133
inputs=[
133134
IO.Audio.Input("audio"),
134135
IO.String.Input("filename_prefix", default="audio/ComfyUI"),
@@ -270,6 +271,7 @@ def define_schema(cls):
270271
search_aliases=["import audio", "open audio", "audio file"],
271272
display_name="Load Audio",
272273
category="audio",
274+
essentials_category="Audio",
273275
inputs=[
274276
IO.Combo.Input("audio", upload=IO.UploadType.audio, options=sorted(files)),
275277
],

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/Preprocessing",
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_images.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def define_schema(cls):
2525
search_aliases=["trim"],
2626
display_name="Image Crop",
2727
category="image/transform",
28+
essentials_category="Image Tools",
2829
inputs=[
2930
IO.Image.Input("image"),
3031
IO.Int.Input("width", default=512, min=1, max=nodes.MAX_RESOLUTION, step=1),
@@ -537,6 +538,7 @@ def define_schema(cls):
537538
node_id="ImageRotate",
538539
search_aliases=["turn", "flip orientation"],
539540
category="image/transform",
541+
essentials_category="Image Tools",
540542
inputs=[
541543
IO.Image.Input("image"),
542544
IO.Combo.Input("rotation", options=["none", "90 degrees", "180 degrees", "270 degrees"]),

comfy_extras/nodes_load_3d.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def define_schema(cls):
3131
node_id="Load3D",
3232
display_name="Load 3D & Animation",
3333
category="3d",
34+
essentials_category="Basic",
3435
is_experimental=True,
3536
inputs=[
3637
IO.Combo.Input("model_file", options=sorted(files), upload=IO.UploadType.model),

comfy_extras/nodes_post_processing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def define_schema(cls):
7777
return io.Schema(
7878
node_id="ImageBlur",
7979
category="image/postprocessing",
80+
essentials_category="Image Tools",
8081
inputs=[
8182
io.Image.Input("image"),
8283
io.Int.Input("blur_radius", default=1, min=1, max=31, step=1),

comfy_extras/nodes_video.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def define_schema(cls):
7373
search_aliases=["export video"],
7474
display_name="Save Video",
7575
category="image/video",
76+
essentials_category="Basic",
7677
description="Saves the input images to your ComfyUI output directory.",
7778
inputs=[
7879
io.Video.Input("video", tooltip="The video to save."),
@@ -174,6 +175,7 @@ def define_schema(cls):
174175
search_aliases=["import video", "open video", "video file"],
175176
display_name="Load Video",
176177
category="image/video",
178+
essentials_category="Basic",
177179
inputs=[
178180
io.Combo.Input("file", options=sorted(files), upload=io.UploadType.video),
179181
],

nodes.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def INPUT_TYPES(s) -> InputTypeDict:
6969
FUNCTION = "encode"
7070

7171
CATEGORY = "conditioning"
72+
ESSENTIALS_CATEGORY = "Basic"
7273
DESCRIPTION = "Encodes a text prompt using a CLIP model into an embedding that can be used to guide the diffusion model towards generating specific images."
7374
SEARCH_ALIASES = ["text", "prompt", "text prompt", "positive prompt", "negative prompt", "encode text", "text encoder", "encode prompt"]
7475

@@ -667,6 +668,8 @@ def set_last_layer(self, clip, stop_at_clip_layer):
667668
return (clip,)
668669

669670
class LoraLoader:
671+
ESSENTIALS_CATEGORY = "Image Generation"
672+
670673
def __init__(self):
671674
self.loaded_lora = None
672675

@@ -1648,6 +1651,7 @@ def INPUT_TYPES(s):
16481651
OUTPUT_NODE = True
16491652

16501653
CATEGORY = "image"
1654+
ESSENTIALS_CATEGORY = "Basic"
16511655
DESCRIPTION = "Saves the input images to your ComfyUI output directory."
16521656
SEARCH_ALIASES = ["save", "save image", "export image", "output image", "write image", "download"]
16531657

@@ -1706,6 +1710,7 @@ def INPUT_TYPES(s):
17061710
}
17071711

17081712
CATEGORY = "image"
1713+
ESSENTIALS_CATEGORY = "Basic"
17091714
SEARCH_ALIASES = ["load image", "open image", "import image", "image input", "upload image", "read image", "image loader"]
17101715

17111716
RETURN_TYPES = ("IMAGE", "MASK")
@@ -1863,6 +1868,7 @@ def INPUT_TYPES(s):
18631868
FUNCTION = "upscale"
18641869

18651870
CATEGORY = "image/upscaling"
1871+
ESSENTIALS_CATEGORY = "Image Tools"
18661872
SEARCH_ALIASES = ["resize", "resize image", "scale image", "image resize", "zoom", "zoom in", "change size"]
18671873

18681874
def upscale(self, image, upscale_method, width, height, crop):
@@ -1902,6 +1908,7 @@ def upscale(self, image, upscale_method, scale_by):
19021908

19031909
class ImageInvert:
19041910
SEARCH_ALIASES = ["reverse colors"]
1911+
ESSENTIALS_CATEGORY = "Image Tools"
19051912

19061913
@classmethod
19071914
def INPUT_TYPES(s):
@@ -1918,6 +1925,7 @@ def invert(self, image):
19181925

19191926
class ImageBatch:
19201927
SEARCH_ALIASES = ["combine images", "merge images", "stack images"]
1928+
ESSENTIALS_CATEGORY = "Image Tools"
19211929

19221930
@classmethod
19231931
def INPUT_TYPES(s):

0 commit comments

Comments
 (0)