Rename and reorganize post processing nodes.

This commit is contained in:
comfyanonymous 2023-04-04 22:54:33 -04:00
parent 10ad4c1d17
commit 871a76b77b
1 changed files with 8 additions and 8 deletions

View File

@ -29,7 +29,7 @@ class Blend:
RETURN_TYPES = ("IMAGE",)
FUNCTION = "blend_images"
CATEGORY = "postprocessing"
CATEGORY = "image/postprocessing"
def blend_images(self, image1: torch.Tensor, image2: torch.Tensor, blend_factor: float, blend_mode: str):
if image1.shape != image2.shape:
@ -86,7 +86,7 @@ class Blur:
RETURN_TYPES = ("IMAGE",)
FUNCTION = "blur"
CATEGORY = "postprocessing"
CATEGORY = "image/postprocessing"
def gaussian_kernel(self, kernel_size: int, sigma: float):
x, y = torch.meshgrid(torch.linspace(-1, 1, kernel_size), torch.linspace(-1, 1, kernel_size), indexing="ij")
@ -131,7 +131,7 @@ class Quantize:
RETURN_TYPES = ("IMAGE",)
FUNCTION = "quantize"
CATEGORY = "postprocessing"
CATEGORY = "image/postprocessing"
def quantize(self, image: torch.Tensor, colors: int = 256, dither: str = "FLOYDSTEINBERG"):
batch_size, height, width, _ = image.shape
@ -179,7 +179,7 @@ class Sharpen:
RETURN_TYPES = ("IMAGE",)
FUNCTION = "sharpen"
CATEGORY = "postprocessing"
CATEGORY = "image/postprocessing"
def sharpen(self, image: torch.Tensor, sharpen_radius: int, alpha: float):
if sharpen_radius == 0:
@ -203,8 +203,8 @@ class Sharpen:
return (result,)
NODE_CLASS_MAPPINGS = {
"Blend": Blend,
"Blur": Blur,
"Quantize": Quantize,
"Sharpen": Sharpen,
"ImageBlend": Blend,
"ImageBlur": Blur,
"ImageQuantize": Quantize,
"ImageSharpen": Sharpen,
}