mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2025-12-12 14:24:41 +08:00
Update some descriptions
This commit is contained in:
parent
14430c118d
commit
302fd1bbe6
@ -2717,6 +2717,7 @@ class FastPreview:
|
|||||||
FUNCTION = "preview"
|
FUNCTION = "preview"
|
||||||
CATEGORY = "KJNodes/experimental"
|
CATEGORY = "KJNodes/experimental"
|
||||||
OUTPUT_NODE = True
|
OUTPUT_NODE = True
|
||||||
|
DESCRIPTION = "Experimental node for faster image previews by displaying through base64 it without saving to disk."
|
||||||
|
|
||||||
def preview(self, image, format, quality):
|
def preview(self, image, format, quality):
|
||||||
pil_image = to_pil_image(image[0].permute(2, 0, 1))
|
pil_image = to_pil_image(image[0].permute(2, 0, 1))
|
||||||
@ -2884,6 +2885,7 @@ class ImageCropByMask:
|
|||||||
RETURN_NAMES = ("image", )
|
RETURN_NAMES = ("image", )
|
||||||
FUNCTION = "crop"
|
FUNCTION = "crop"
|
||||||
CATEGORY = "KJNodes/image"
|
CATEGORY = "KJNodes/image"
|
||||||
|
DESCRIPTION = "Crops the input images based on the provided mask."
|
||||||
|
|
||||||
def crop(self, image, mask):
|
def crop(self, image, mask):
|
||||||
B, H, W, C = image.shape
|
B, H, W, C = image.shape
|
||||||
@ -3097,7 +3099,7 @@ class ImagePadKJ:
|
|||||||
RETURN_NAMES = ("images", "masks",)
|
RETURN_NAMES = ("images", "masks",)
|
||||||
FUNCTION = "pad"
|
FUNCTION = "pad"
|
||||||
CATEGORY = "KJNodes/image"
|
CATEGORY = "KJNodes/image"
|
||||||
DESCRIPTION = "Crops the input images based on the provided masks."
|
DESCRIPTION = "Pad the input image and optionally mask with the specified padding."
|
||||||
|
|
||||||
def pad(self, image, left, right, top, bottom, extra_padding, color, pad_mode, mask=None):
|
def pad(self, image, left, right, top, bottom, extra_padding, color, pad_mode, mask=None):
|
||||||
B, H, W, C = image.shape
|
B, H, W, C = image.shape
|
||||||
|
|||||||
@ -1291,6 +1291,7 @@ class SeparateMasks:
|
|||||||
FUNCTION = "separate"
|
FUNCTION = "separate"
|
||||||
CATEGORY = "KJNodes/masking"
|
CATEGORY = "KJNodes/masking"
|
||||||
OUTPUT_NODE = True
|
OUTPUT_NODE = True
|
||||||
|
DESCRIPTION = "Separates a mask into multiple masks based on the size of the connected components."
|
||||||
|
|
||||||
def polygon_to_mask(self, polygon, shape):
|
def polygon_to_mask(self, polygon, shape):
|
||||||
mask = np.zeros((shape[0], shape[1]), dtype=np.uint8) # Fixed shape handling
|
mask = np.zeros((shape[0], shape[1]), dtype=np.uint8) # Fixed shape handling
|
||||||
|
|||||||
@ -2318,8 +2318,10 @@ class ImageNoiseAugmentation:
|
|||||||
|
|
||||||
RETURN_TYPES = ("IMAGE",)
|
RETURN_TYPES = ("IMAGE",)
|
||||||
FUNCTION = "add_noise"
|
FUNCTION = "add_noise"
|
||||||
|
|
||||||
CATEGORY = "KJNodes/image"
|
CATEGORY = "KJNodes/image"
|
||||||
|
DESCRIPTION = """
|
||||||
|
Add noise to an image.
|
||||||
|
"""
|
||||||
|
|
||||||
def add_noise(self, image, noise_aug_strength, seed):
|
def add_noise(self, image, noise_aug_strength, seed):
|
||||||
torch.manual_seed(seed)
|
torch.manual_seed(seed)
|
||||||
@ -2411,7 +2413,6 @@ class VAELoaderKJ:
|
|||||||
|
|
||||||
RETURN_TYPES = ("VAE",)
|
RETURN_TYPES = ("VAE",)
|
||||||
FUNCTION = "load_vae"
|
FUNCTION = "load_vae"
|
||||||
|
|
||||||
CATEGORY = "KJNodes/vae"
|
CATEGORY = "KJNodes/vae"
|
||||||
|
|
||||||
def load_vae(self, vae_name, device, weight_dtype):
|
def load_vae(self, vae_name, device, weight_dtype):
|
||||||
@ -2478,6 +2479,10 @@ class ScheduledCFGGuidance:
|
|||||||
RETURN_TYPES = ("GUIDER",)
|
RETURN_TYPES = ("GUIDER",)
|
||||||
FUNCTION = "get_guider"
|
FUNCTION = "get_guider"
|
||||||
CATEGORY = "KJNodes/experimental"
|
CATEGORY = "KJNodes/experimental"
|
||||||
|
DESCRiPTION = """
|
||||||
|
CFG Guider that allows for scheduled CFG changes over steps, the steps outside the range will use CFG 1.0 thus being processed faster.
|
||||||
|
cfg input can be a list of floats matching step count, or a single float for all steps.
|
||||||
|
"""
|
||||||
|
|
||||||
def get_guider(self, model, cfg, positive, negative, start_percent, end_percent):
|
def get_guider(self, model, cfg, positive, negative, start_percent, end_percent):
|
||||||
guider = Guider_ScheduledCFG(model)
|
guider = Guider_ScheduledCFG(model)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user