diff --git a/post_processing/arithmetic_blend.py b/post_processing/arithmetic_blend.py index c685735..594a3ce 100644 --- a/post_processing/arithmetic_blend.py +++ b/post_processing/arithmetic_blend.py @@ -17,7 +17,7 @@ class ArithmeticBlend: RETURN_TYPES = ("IMAGE",) FUNCTION = "arithmetic_blend_images" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Blends" def arithmetic_blend_images(self, image1: torch.Tensor, image2: torch.Tensor, blend_mode: str): if blend_mode == "add": diff --git a/post_processing/blend.py b/post_processing/blend.py index 076a41a..b8af228 100644 --- a/post_processing/blend.py +++ b/post_processing/blend.py @@ -24,7 +24,7 @@ class Blend: RETURN_TYPES = ("IMAGE",) FUNCTION = "blend_images" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Blends" def blend_images(self, image1: torch.Tensor, image2: torch.Tensor, blend_factor: float, blend_mode: str): if image1.shape != image2.shape: diff --git a/post_processing/blur.py b/post_processing/blur.py index 221db15..430f327 100644 --- a/post_processing/blur.py +++ b/post_processing/blur.py @@ -28,7 +28,7 @@ class Blur: RETURN_TYPES = ("IMAGE",) FUNCTION = "blur" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Filters" def blur(self, image: torch.Tensor, blur_radius: int, sigma: float): if blur_radius == 0: diff --git a/post_processing/canny_edge_detect.py b/post_processing/canny_edge_detect.py index 4eb77bc..4c37616 100644 --- a/post_processing/canny_edge_detect.py +++ b/post_processing/canny_edge_detect.py @@ -30,7 +30,7 @@ class CannyEdgeDetection: RETURN_TYPES = ("IMAGE",) FUNCTION = "canny" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Masks" def canny(self, image: torch.Tensor, lower_threshold: int, upper_threshold: int): batch_size, height, width, _ = image.shape diff --git a/post_processing/chromatic_abberation.py b/post_processing/chromatic_abberation.py index e291416..0a0e2e4 100644 --- a/post_processing/chromatic_abberation.py +++ b/post_processing/chromatic_abberation.py @@ -36,7 +36,7 @@ class ChromaticAberration: RETURN_TYPES = ("IMAGE",) FUNCTION = "chromatic_aberration" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Effects" def chromatic_aberration(self, image: torch.Tensor, red_shift: int, green_shift: int, blue_shift: int, red_direction: str, green_direction: str, blue_direction: str): def get_shift(direction, shift): diff --git a/post_processing/color_correct.py b/post_processing/color_correct.py index 4f1bf6a..5f647c0 100644 --- a/post_processing/color_correct.py +++ b/post_processing/color_correct.py @@ -55,7 +55,7 @@ class ColorCorrect: RETURN_TYPES = ("IMAGE",) FUNCTION = "color_correct" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Color Adjustments" def color_correct(self, image: torch.Tensor, temperature: float, hue: float, brightness: float, contrast: float, saturation: float, gamma: float): batch_size, height, width, _ = image.shape diff --git a/post_processing/dissolve.py b/post_processing/dissolve.py index 3bce723..a6a4b7b 100644 --- a/post_processing/dissolve.py +++ b/post_processing/dissolve.py @@ -22,7 +22,7 @@ class Dissolve: RETURN_TYPES = ("IMAGE",) FUNCTION = "dissolve_images" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Blends" def dissolve_images(self, image1: torch.Tensor, image2: torch.Tensor, dissolve_factor: float): dither_pattern = torch.rand_like(image1) diff --git a/post_processing/dodge_and_burn.py b/post_processing/dodge_and_burn.py index 06f28b5..240ef0b 100644 --- a/post_processing/dodge_and_burn.py +++ b/post_processing/dodge_and_burn.py @@ -23,7 +23,7 @@ class DodgeAndBurn: RETURN_TYPES = ("IMAGE",) FUNCTION = "dodge_and_burn" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Blends" def dodge_and_burn(self, image: torch.Tensor, mask: torch.Tensor, intensity: float, mode: str): if mode in ["dodge", "color_dodge", "linear_dodge"]: diff --git a/post_processing/film_grain.py b/post_processing/film_grain.py index d9bad97..a17d96d 100644 --- a/post_processing/film_grain.py +++ b/post_processing/film_grain.py @@ -40,7 +40,7 @@ class FilmGrain: RETURN_TYPES = ("IMAGE",) FUNCTION = "film_grain" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Effects" def film_grain(self, image: torch.Tensor, intensity: float, scale: float, temperature: float, vignette: float): batch_size, height, width, _ = image.shape diff --git a/post_processing/glow.py b/post_processing/glow.py index 28bab4c..351c4f7 100644 --- a/post_processing/glow.py +++ b/post_processing/glow.py @@ -28,7 +28,7 @@ class Glow: RETURN_TYPES = ("IMAGE",) FUNCTION = "apply_glow" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Effects" def apply_glow(self, image: torch.Tensor, intensity: float, blur_radius: int): blurred_image = self.gaussian_blur(image, 2 * blur_radius + 1) diff --git a/post_processing/kuwahara_blur.py b/post_processing/kuwahara_blur.py index 6645647..aa58794 100644 --- a/post_processing/kuwahara_blur.py +++ b/post_processing/kuwahara_blur.py @@ -25,7 +25,7 @@ class KuwaharaBlur: RETURN_TYPES = ("IMAGE",) FUNCTION = "apply_kuwahara_filter" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Filters" def apply_kuwahara_filter(self, image: np.ndarray, blur_radius: int, method: str): if blur_radius == 0: diff --git a/post_processing/parabolize.py b/post_processing/parabolize.py index 89c7a1b..2734607 100644 --- a/post_processing/parabolize.py +++ b/post_processing/parabolize.py @@ -33,7 +33,7 @@ class Parabolize: RETURN_TYPES = ("IMAGE",) FUNCTION = "parabolize_image" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Color Adjustments" def parabolize_image(self, image: torch.Tensor, coeff: float, vertex_x: float, vertex_y: float): parabolized_image = coeff * torch.pow(image - vertex_x, 2) + vertex_y diff --git a/post_processing/pencil_sketch.py b/post_processing/pencil_sketch.py index 8640c9d..4fa1060 100644 --- a/post_processing/pencil_sketch.py +++ b/post_processing/pencil_sketch.py @@ -28,7 +28,7 @@ class PencilSketch: RETURN_TYPES = ("IMAGE",) FUNCTION = "apply_sketch" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Effects" def apply_sketch(self, image: torch.Tensor, blur_radius: int = 5, sharpen_alpha: float = 1): image = image.permute(0, 3, 1, 2) # Torch wants (B, C, H, W) we use (B, H, W, C) diff --git a/post_processing/pixel_sort.py b/post_processing/pixel_sort.py index 22cbddd..8b07c0b 100644 --- a/post_processing/pixel_sort.py +++ b/post_processing/pixel_sort.py @@ -27,7 +27,7 @@ class PixelSort: RETURN_TYPES = ("IMAGE",) FUNCTION = "sort_pixels" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Effects" def sort_pixels(self, image: torch.Tensor, mask: torch.Tensor, direction: str, span_limit: int, sort_by: str, order: str): horizontal_sort = direction == "horizontal" diff --git a/post_processing/pixelize.py b/post_processing/pixelize.py index 1730678..ad33de6 100644 --- a/post_processing/pixelize.py +++ b/post_processing/pixelize.py @@ -22,7 +22,7 @@ class Pixelize: RETURN_TYPES = ("IMAGE",) FUNCTION = "apply_pixelize" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Effects" def apply_pixelize(self, image: torch.Tensor, pixel_size: int): pixelized_image = self.pixelize_image(image, pixel_size) diff --git a/post_processing/quantize.py b/post_processing/quantize.py index 8ef0dc4..56b719c 100644 --- a/post_processing/quantize.py +++ b/post_processing/quantize.py @@ -24,7 +24,7 @@ class Quantize: RETURN_TYPES = ("IMAGE",) FUNCTION = "quantize" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Color Adjustments" def quantize(self, image: torch.Tensor, colors: int = 256, dither: str = "FLOYDSTEINBERG"): batch_size, height, width, _ = image.shape diff --git a/post_processing/sepia.py b/post_processing/sepia.py index 521be94..fc28c1a 100644 --- a/post_processing/sepia.py +++ b/post_processing/sepia.py @@ -21,7 +21,7 @@ class Sepia: RETURN_TYPES = ("IMAGE",) FUNCTION = "sepia" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Color Adjustments" def sepia(self, image: torch.Tensor, strength: float): if strength == 0: diff --git a/post_processing/sharpen.py b/post_processing/sharpen.py index a8ceb9c..56c7d83 100644 --- a/post_processing/sharpen.py +++ b/post_processing/sharpen.py @@ -29,7 +29,7 @@ class Sharpen: RETURN_TYPES = ("IMAGE",) FUNCTION = "sharpen" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Filters" def sharpen(self, image: torch.Tensor, blur_radius: int, alpha: float): if blur_radius == 0: diff --git a/post_processing/solarize.py b/post_processing/solarize.py index 985b4a2..b0b793c 100644 --- a/post_processing/solarize.py +++ b/post_processing/solarize.py @@ -21,7 +21,7 @@ class Solarize: RETURN_TYPES = ("IMAGE",) FUNCTION = "solarize_image" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Color Adjustments" def solarize_image(self, image: torch.Tensor, threshold: float): solarized_image = torch.where(image > threshold, 1 - image, image) diff --git a/post_processing/vignette.py b/post_processing/vignette.py index 10f9b28..73d98d3 100644 --- a/post_processing/vignette.py +++ b/post_processing/vignette.py @@ -22,7 +22,7 @@ class Vignette: RETURN_TYPES = ("IMAGE",) FUNCTION = "apply_vignette" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Effects" def apply_vignette(self, image: torch.Tensor, vignette: float): if vignette == 0: diff --git a/post_processing_nodes.py b/post_processing_nodes.py index 1013a4c..3548c1e 100644 --- a/post_processing_nodes.py +++ b/post_processing_nodes.py @@ -24,7 +24,7 @@ class ArithmeticBlend: RETURN_TYPES = ("IMAGE",) FUNCTION = "arithmetic_blend_images" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Blends" def arithmetic_blend_images(self, image1: torch.Tensor, image2: torch.Tensor, blend_mode: str): if blend_mode == "add": @@ -71,7 +71,7 @@ class Blend: RETURN_TYPES = ("IMAGE",) FUNCTION = "blend_images" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Blends" def blend_images(self, image1: torch.Tensor, image2: torch.Tensor, blend_factor: float, blend_mode: str): if image1.shape != image2.shape: @@ -149,7 +149,7 @@ class Blur: RETURN_TYPES = ("IMAGE",) FUNCTION = "blur" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Filters" def blur(self, image: torch.Tensor, blur_radius: int, sigma: float): if blur_radius == 0: @@ -193,7 +193,7 @@ class CannyEdgeDetection: RETURN_TYPES = ("IMAGE",) FUNCTION = "canny" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Masks" def canny(self, image: torch.Tensor, lower_threshold: int, upper_threshold: int): batch_size, height, width, _ = image.shape @@ -244,7 +244,7 @@ class ChromaticAberration: RETURN_TYPES = ("IMAGE",) FUNCTION = "chromatic_aberration" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Effects" def chromatic_aberration(self, image: torch.Tensor, red_shift: int, green_shift: int, blue_shift: int, red_direction: str, green_direction: str, blue_direction: str): def get_shift(direction, shift): @@ -311,7 +311,7 @@ class ColorCorrect: RETURN_TYPES = ("IMAGE",) FUNCTION = "color_correct" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Color Adjustments" def color_correct(self, image: torch.Tensor, temperature: float, hue: float, brightness: float, contrast: float, saturation: float, gamma: float): batch_size, height, width, _ = image.shape @@ -388,7 +388,7 @@ class Dissolve: RETURN_TYPES = ("IMAGE",) FUNCTION = "dissolve_images" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Blends" def dissolve_images(self, image1: torch.Tensor, image2: torch.Tensor, dissolve_factor: float): dither_pattern = torch.rand_like(image1) @@ -421,7 +421,7 @@ class DodgeAndBurn: RETURN_TYPES = ("IMAGE",) FUNCTION = "dodge_and_burn" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Blends" def dodge_and_burn(self, image: torch.Tensor, mask: torch.Tensor, intensity: float, mode: str): if mode in ["dodge", "color_dodge", "linear_dodge"]: @@ -500,7 +500,7 @@ class FilmGrain: RETURN_TYPES = ("IMAGE",) FUNCTION = "film_grain" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Effects" def film_grain(self, image: torch.Tensor, intensity: float, scale: float, temperature: float, vignette: float): batch_size, height, width, _ = image.shape @@ -633,7 +633,7 @@ class Glow: RETURN_TYPES = ("IMAGE",) FUNCTION = "apply_glow" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Effects" def apply_glow(self, image: torch.Tensor, intensity: float, blur_radius: int): blurred_image = self.gaussian_blur(image, 2 * blur_radius + 1) @@ -678,7 +678,7 @@ class KuwaharaBlur: RETURN_TYPES = ("IMAGE",) FUNCTION = "apply_kuwahara_filter" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Filters" def apply_kuwahara_filter(self, image: np.ndarray, blur_radius: int, method: str): if blur_radius == 0: @@ -765,7 +765,7 @@ class Parabolize: RETURN_TYPES = ("IMAGE",) FUNCTION = "parabolize_image" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Color Adjustments" def parabolize_image(self, image: torch.Tensor, coeff: float, vertex_x: float, vertex_y: float): parabolized_image = coeff * torch.pow(image - vertex_x, 2) + vertex_y @@ -799,7 +799,7 @@ class PencilSketch: RETURN_TYPES = ("IMAGE",) FUNCTION = "apply_sketch" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Effects" def apply_sketch(self, image: torch.Tensor, blur_radius: int = 5, sharpen_alpha: float = 1): image = image.permute(0, 3, 1, 2) # Torch wants (B, C, H, W) we use (B, H, W, C) @@ -882,7 +882,7 @@ class PixelSort: RETURN_TYPES = ("IMAGE",) FUNCTION = "sort_pixels" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Effects" def sort_pixels(self, image: torch.Tensor, mask: torch.Tensor, direction: str, span_limit: int, sort_by: str, order: str): horizontal_sort = direction == "horizontal" @@ -922,7 +922,7 @@ class Pixelize: RETURN_TYPES = ("IMAGE",) FUNCTION = "apply_pixelize" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Effects" def apply_pixelize(self, image: torch.Tensor, pixel_size: int): pixelized_image = self.pixelize_image(image, pixel_size) @@ -963,7 +963,7 @@ class Quantize: RETURN_TYPES = ("IMAGE",) FUNCTION = "quantize" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Color Adjustments" def quantize(self, image: torch.Tensor, colors: int = 256, dither: str = "FLOYDSTEINBERG"): batch_size, height, width, _ = image.shape @@ -1005,7 +1005,7 @@ class Sepia: RETURN_TYPES = ("IMAGE",) FUNCTION = "sepia" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Color Adjustments" def sepia(self, image: torch.Tensor, strength: float): if strength == 0: @@ -1047,7 +1047,7 @@ class Sharpen: RETURN_TYPES = ("IMAGE",) FUNCTION = "sharpen" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Filters" def sharpen(self, image: torch.Tensor, blur_radius: int, alpha: float): if blur_radius == 0: @@ -1091,7 +1091,7 @@ class Solarize: RETURN_TYPES = ("IMAGE",) FUNCTION = "solarize_image" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Color Adjustments" def solarize_image(self, image: torch.Tensor, threshold: float): solarized_image = torch.where(image > threshold, 1 - image, image) @@ -1119,7 +1119,7 @@ class Vignette: RETURN_TYPES = ("IMAGE",) FUNCTION = "apply_vignette" - CATEGORY = "postprocessing" + CATEGORY = "postprocessing/Effects" def apply_vignette(self, image: torch.Tensor, vignette: float): if vignette == 0: