Back to all packs
KJNodes banner

KJNodes

Description unavailable.

View repository
—
Publisher
—
Downloads
—
GitHub stars
—
Latest version
—
License
—
Last updated
—

Nodes in this pack

_for_testing

  • Differential Diffusion Advanced

advanced/guidance

  • Skip Layer Guidance WanVideoExperimentalDeprecated

    Simplified skip layer guidance that only skips the uncond on selected blocks

conditioning/controlnet

  • Set Shakker Labs Union ControlNet Type

image

  • Image Pad For Outpaint Masked
  • Image Pad For Outpaint Target Size
  • Image Prep For ICLora

KJNodes/audio

  • ImageTransformByNormalizedAmplitude

    Works as a bridge to the AudioScheduler -nodes: https://github.com/a1lazydog/ComfyUI-AudioScheduler Transforms image based on the normalized amplitude.

  • NormalizedAmplitudeToFloatList

    Works as a bridge to the AudioScheduler -nodes: https://github.com/a1lazydog/ComfyUI-AudioScheduler Creates a list of floats from the normalized amplitude.

  • NormalizedAmplitudeToMask

    Works as a bridge to the AudioScheduler -nodes: https://github.com/a1lazydog/ComfyUI-AudioScheduler Creates masks based on the normalized amplitude.

  • OffsetMaskByNormalizedAmplitude

    Works as a bridge to the AudioScheduler -nodes: https://github.com/a1lazydog/ComfyUI-AudioScheduler Offsets masks based on the normalized amplitude.

  • Sound Reactive

    Reacts to the sound level of the input. Uses your browsers sound input options and requires. Meant to be used with realtime diffusion with autoqueue.

KJNodes/constants

  • BOOL Constant
  • Float Constant
  • INT Constant
  • String Constant
  • String Constant Multiline

KJNodes/controlnet

  • Custom ControlNet Weights Flux From List

    Creates controlnet weights from a list of floats for Advanced-ControlNet

KJNodes/deprecated

  • Create Audio Mask
  • Create Fade Mask
  • Patch Model Patcher OrderDeprecated

    NO LONGER NECESSARY OR FUNCTIONAL, keeping node for backwards compatibility. Use the TorchCompileModelAdvanced to use LoRA with torch.compile.

  • TorchCompileCosmosModel

    This node has been replaced with TorchCompileModelAdvanced node, please use that instead.

  • TorchCompileLTXModel

    This node has been replaced with TorchCompileModelAdvanced node, please use that instead.

  • TorchCompileModelFluxAdvanced

    This node has been replaced with TorchCompileModelAdvanced node, please use that instead.

  • TorchCompileModelHyVideo

    This node has been replaced with TorchCompileModelAdvanced node, please use that instead.

  • TorchCompileModelQwenImage

    This node has been replaced with TorchCompileModelAdvanced node, please use that instead.

  • TorchCompileModelWanVideo

    This node has been replaced with TorchCompileModelAdvanced node, please use that instead.

  • WanVideo Tea Cache (native)ExperimentalDeprecated

    DEPRECATED, use the native EasyCache or alternative custom node that's up to date instead of this.

KJNodes/experimental

  • CFG Zero Star/InitExperimental

    https://github.com/WeichenFan/CFG-Zero-star

  • CheckpointPerturbWeights
  • Fast Preview

    Fast image preview using binary websocket, bypassing base64/JSON overhead.

  • Flux Block Lora Select

    Select individual block alpha values, value of 0 removes the block altogether

  • GLIGENTextBoxApplyBatchCoords

    This node allows scheduling GLIGEN text box positions in a batch, to be used with AnimateDiff-Evolved. Intended to pair with the Spline Editor -node. GLIGEN model can be downloaded through the Manage's "Install Models" menu. Or directly from here: https://huggingface.co/comfyanonymous/GLIGEN_pruned_safetensors/tree/main Inputs: - **latents** input is used to calculate batch size - **clip** is your standard text encoder, use same as for the main prompt - **gligen_textbox_model** connects to GLIGEN Loader - **coordinates** takes a json string of points, directly compatible with the spline editor node. - **text** is the part of the prompt to set position for - **width** and **height** are the size of the GLIGEN bounding box Outputs: - **conditioning** goes between to clip text encode and the sampler - **coord_preview** is an optional preview of the coordinates and bounding boxes.

  • Interpolate Coords

    Interpolates coordinates based on a curve.

  • Latent Inpaint TTMExperimental

    https://github.com/time-to-move/TTM

  • Model Patch Torch SettingsExperimental

    Adds callbacks to model to set torch settings before and after running the model.

  • NABLA Attention KJ

    Experimental node for patching attention mode to use NABLA sparse attention for video models, currently only works with Kadinsky5

  • Patch Flash Attention KJExperimental

    Experimental node for patching attention to use flash attention, without the silent SDPA fallback the ComfyUI default does. Patches the attention of the model passing through this node; to disable, bypass or disconnect this node. Requires the flash_attn library to be installed.

  • Patch Sage Attention KJExperimental

    Experimental node for patching attention mode. This doesn't use the model patching system and thus can't be disabled without running the node again with 'disabled' option.

  • PiD Color Bias CorrectionExperimental

    PiD 4-step decoder color/brightness drift corrector. Subtracts a per-channel bias from x0_pred at the first sampling step, using a small linear model calibrated against the model's systematic drift (model tends to brighten dark scenes and add a blue cast).

  • Plot Coordinates

    Plots coordinates to sequence of images using Matplotlib.

  • Points Editor

    # WORK IN PROGRESS Do not count on this as part of your workflow yet, probably contains lots of bugs and stability is not guaranteed!! ## Graphical editor to create coordinates **Shift + click** to add a positive (green) point. **Shift + right click** to add a negative (red) point. **Right click on a point** to delete it. **Ctrl + click** to draw a bounding box. **Drag bbox corners** to resize, **drag inside** to move. **Right click on bbox** to delete it. To add an image select the node and copy/paste or drag in the image. Or from the bg_image input on queue (first frame of the batch). **THE IMAGE IS SAVED TO THE NODE AND WORKFLOW METADATA** you can clear the image from the context menu by right clicking on the canvas

  • Scheduled CFG Guidance
  • Stable Zero123 Batch Schedule
  • Style Model Apply Advanced

    StyleModelApply but with strength parameter

  • SV3D Batch Schedule

    Allow scheduling of the azimuth and elevation conditions for SV3D. Note that SV3D is still a video model and the schedule needs to always go forward https://huggingface.co/stabilityai/sv3d

KJNodes/hunyuanvideo

  • Apply RifleXRoPE HunuyanVideoExperimental

    Extends the potential frame count of HunyuanVideo using this method: https://github.com/thu-ml/RIFLEx

  • Hunyuan Video Block Lora Select

    Select individual block alpha values, value of 0 removes the block altogether

  • HunyuanVideo Encode Keyframes To Cond
  • Leapfusion Hunyuan I2V Patcher

KJNodes/image

  • Color MatchDeprecated

    color-matcher enables color transfer across images which comes in handy for automatic color-grading of photographs, paintings and film sequences as well as light-field and stopmotion corrections. The methods behind the mappings are based on the approach from Reinhard et al., the Monge-Kantorovich Linearization (MKL) as proposed by Pitie et al. and our analytical solution to a Multi-Variate Gaussian Distribution (MVGD) transfer in conjunction with classical histogram matching. As shown below our HM-MVGD-HM compound outperforms existing methods. https://github.com/hahnec/color-matcher/

  • Create Gradient From Coords

    Creates a gradient image from coordinates.

  • Create Shape Image On Path

    Creates an image or batch of images with the specified shape. Locations are center locations.

  • Cross Fade Images
  • Cross Fade Images Multi
  • Cut And Drag On Path

    Cuts the masked area from the image, and drags it along the path. If inpaint is enabled, and no bg_image is provided, the cut area is filled using cv2 TELEA algorithm.

  • Get Image or Mask Range From Batch

    Returns a range of images from a batch.

  • Get Image Size & Count

    Returns width, height and batch size of the image, and passes it through unchanged.

  • Get Images From Batch Indexed

    Selects and returns the images at the specified indices as an image batch.

  • Get Latent Size & Count

    Returns latent tensor dimensions, and passes the latent through unchanged.

  • Gradient To Float

    Calculates list of floats from image.

  • Image Add Multi

    Add blends multiple images together. You can set how many inputs the node has, with the **inputcount** and clicking update.

  • Image Batch Extend With Overlap

    Helper node for video generation extension First input source and overlap amount to get the starting frames for the extension. Then on another copy of the node provide the newly generated frames and choose how to overlap them.

  • Image Batch Filter

    Removes empty images from a batch

  • Image Batch Join With Transition

    Transitions between two batches of images, starting at a specified index in the first batch. During the transition, frames from both batches are blended frame-by-frame, so the video keeps playing.

  • Image Batch Multi

    Creates an image batch from multiple images. You can set how many inputs the node has, with the **inputcount** and clicking update.

  • Image Concatenate From Batch

    Concatenates images from a batch into a grid with a specified number of columns.

  • Image Crop By Mask

    Crops the input images based on the provided mask.

  • Image Crop By Mask And Resize
  • Image Crop By Mask Batch

    Crops the input images based on the provided masks.

  • Image Grab PIL

    Captures an area specified by screen coordinates. Can be used for realtime diffusion with autoqueue.

  • Image Grid Composite 2x2

    Concatenates the 4 input images into a 2x2 grid.

  • Image Grid Composite 3x3

    Concatenates the 9 input images into a 3x3 grid.

  • Image Grid To Batch

    Converts a grid of images to a batch of images.

  • Image Normalize -1 to 1

    Normalize the images to be in the range [-1, 1]

  • Image Tensor List

    Creates an image list from the input images.

  • Image Uncrop By Mask
  • Image Upscale With Model Batched

    Same as ComfyUI native model upscaling node, but allows setting sub-batches for reduced VRAM usage. Optionally downscale the result with a ratio.

  • ImageBatchRepeatInterleaving

    Repeats each image in a batch by the specified number of times. Example batch of 5 images: 0, 1 ,2, 3, 4 with repeats 2 becomes batch of 10 images: 0, 0, 1, 1, 2, 2, 3, 3, 4, 4

  • ImagePad KJ

    Pad the input image and optionally mask with the specified padding.

  • ImagePass

    Passes the image through without modifying it.

  • Insert Image Batch By Indexes

    This node is designed to be use with node FilterZeroMasksAndCorrespondingImages It inserts the images_to_insert into images according to insert_indexes Returns: images_after_insert: updated original images with origonal sequence order

  • Insert Images To Batch Indexed

    Inserts images at the specified indices into the original image batch.

  • Load & Resize Image
  • Merge Image Channels

    Merges channel data into an image.

  • Pad Image Batch Interleaved

    Inserts empty frames between the images in a batch.

  • Preview Animation
  • Remap Image Range

    Remaps the image values to the specified range.

  • Replace Images In Batch

    Replaces the images in a batch, starting from the specified start index, with the replacement images.

  • Resize Image (deprecated)Deprecated

    DEPRECATED! Due to ComfyUI frontend changes, this node should no longer be used, please check the v2 of the node. This node is only kept to not completely break older workflows.

  • Resize Image v2

    Resizes the image to the specified width and height. Size can be retrieved from the input. Keep proportions keeps the aspect ratio of the image, by highest dimension.

  • Reverse Image Batch

    Reverses the order of the images in a batch.

  • Save Image With Alpha

    Saves an image and mask as .PNG with the mask as the alpha channel.

  • Screencap mss

    Captures an area specified by screen coordinates. Can be used for realtime diffusion with autoqueue.

  • Shuffle Image Batch
  • Split Image Channels

    Splits image channels into images where the selected channel is repeated for all channels, and the alpha as a mask.

  • Transition Images In Batch

    Creates transitions between images in a batch.

  • Transition Images Multi

    Creates transitions between images.

KJNodes/InstanceDiffusion

  • AppendInstanceDiffusionTracking

    Appends tracking data to be used with InstanceDiffusion: https://github.com/logtd/ComfyUI-InstanceDiffusion

  • CreateInstanceDiffusionTracking

    Creates tracking data to be used with InstanceDiffusion: https://github.com/logtd/ComfyUI-InstanceDiffusion InstanceDiffusion prompt format: "class_id.class_name": "prompt", for example: "1.head": "((head))",

  • DrawInstanceDiffusionTracking

    Draws the tracking data from CreateInstanceDiffusionTracking -node.

KJNodes/latents

  • Empty Latent Image Custom Presets

    Generates an empty latent image with the specified dimensions. The choices are loaded from 'custom_dimensions.json' in the nodes folder.

  • Empty Latent Image Presets
  • Get Latent Range From Batch

    Returns a range of latents from a batch.

  • Get Latents From Batch Indexed

    Selects and returns the latents at the specified indices as an latent batch.

  • Insert Latent To Index

    Inserts a latent at the specified index into the original latent batch.

KJNodes/lora

  • DiT Block Lora Loader

KJNodes/ltxv

  • LTX2 Block Lora Select

    Select individual block alpha values, value of 0 removes the block altogether

  • LTXV Enhance A Video KJExperimental

    https://github.com/NUS-HPC-AI-Lab/Enhance-A-Video

KJNodes/masking

  • (Down)load CLIPSeg

    Downloads and loads CLIPSeg model with huggingface_hub, to ComfyUI/models/clip_seg

  • Batch CLIPSeg

    Segments an image or batch of images using CLIPSeg.

  • Batch Crop From Mask
  • Batch Crop From Mask Advanced
  • Batch Uncrop
  • Batch Uncrop Advanced
  • Bbox To Int

    Returns selected index from bounding box list as integers.

  • Bbox Visualize

    Visualizes the specified bbox on the image.

  • Blockify Mask

    Creates a block mask by dividing the bounding box of each mask into blocks of the specified size and filling in blocks that contain any part of the original mask.

  • Color To Mask

    Converts chosen RGB value to a mask. With batch inputs, the **per_batch** controls the number of images processed at once.

  • Consolidate Masks

    Consolidates a batch of separate masks by finding the largest group of masks that fit inside a tile of the given width and height (including the padding), and repeating until no more masks can be combined.

  • Draw Mask On Image

    Applies the provided masks to the input images with Alpha Blending support.

  • FilterZeroMasksAndCorrespondingImages

    Filter out all the empty (i.e. all zero) mask in masks Also filter out all the corresponding images in original_images by indexes if provide original_images (optional): If provided, need have same length as masks.

  • Get Mask Size & Count

    Returns the width, height and batch size of the mask, and passes it through unchanged.

  • Grow Mask With Blur

    # GrowMaskWithBlur - mask: Input mask or mask batch - expand: Expand or contract mask or mask batch by a given amount - incremental_expandrate: increase expand rate by a given amount per frame - tapered_corners: use tapered corners - flip_input: flip input mask - blur_radius: value higher than 0 will blur the mask - lerp_alpha: alpha value for interpolation between frames - decay_factor: decay value for interpolation between frames - fill_holes: fill holes in the mask (slow)

  • Mask Batch Multi

    Creates an image batch from multiple masks. You can set how many inputs the node has, with the **inputcount** and clicking update.

  • Offset Mask

    Offsets the mask by the specified amount. - mask: Input mask or mask batch - x: Horizontal offset - y: Vertical offset - angle: Angle in degrees - roll: roll edge wrapping - duplication_factor: Number of times to duplicate the mask to form a batch - border padding_mode: Padding mode for the mask

  • Remap Mask Range

    Sets new min and max values for the mask.

  • Resize Mask

    Resizes the mask or batch of masks to the specified width and height.

  • Round Mask

    Rounds the mask or batch of masks to a binary mask. <img src="https://github.com/kijai/ComfyUI-KJNodes/assets/40791699/52c85202-f74e-4b96-9dac-c8bda5ddcc40" width="300" height="250" alt="RoundMask example">

  • Separate Masks

    Separates a mask into multiple masks based on the size of the connected components.

  • Split Bboxes

    Splits the specified bbox list at the given index into two lists.

KJNodes/masking/conditioning

  • Conditioning Multi Combine

    Combines multiple conditioning nodes into one

  • ConditioningSetMaskAndCombine

    Bundles multiple conditioning mask and combine nodes into one,functionality is identical to ComfyUI native nodes

  • ConditioningSetMaskAndCombine3

    Bundles multiple conditioning mask and combine nodes into one,functionality is identical to ComfyUI native nodes

  • ConditioningSetMaskAndCombine4

    Bundles multiple conditioning mask and combine nodes into one,functionality is identical to ComfyUI native nodes

  • ConditioningSetMaskAndCombine5

    Bundles multiple conditioning mask and combine nodes into one,functionality is identical to ComfyUI native nodes

KJNodes/masking/generate

  • Create Fade Mask Advanced

    Create a batch of masks interpolated between given frames and values. Uses same syntax as Fizz' BatchValueSchedule. First value is the frame index (not that this starts from 0, not 1) and the second value inside the brackets is the float value of the mask in range 0.0 - 1.0 For example the default values: 0:(0.0) 7:(1.0) 15:(0.0) Would create a mask batch fo 16 frames, starting from black, interpolating with the chosen curve to fully white at the 8th frame, and interpolating from that to fully black at the 16th frame.

  • Create Fluid Mask
  • Create Gradient Mask
  • Create Magic Mask
  • Create Shape Mask

    Creates a mask or batch of masks with the specified shape. Locations are center locations. Grow value is the amount to grow the shape on each frame, creating animated masks.

  • Create Shape Mask On PathDeprecated

    Creates a mask or batch of masks with the specified shape. Locations are center locations.

  • Create Text On Path

    Creates a mask or batch of masks with the specified text. Locations are center locations.

  • Create Voronoi Mask
  • Float To Mask

    Generates a batch of masks based on the input float values. The batch size is determined by the length of the input float values. Each mask is generated with the specified width and height.

KJNodes/memory

  • Model Memory Usage Factor OverrideExperimental

    Overrides the memory usage factor of the model during sampling.

  • Model Memory Use Report PatchExperimental

    Adds callbacks to model to report memory usage during after sampling

  • VRAM Debug

    Returns the inputs unchanged, they are only used as triggers, and performs comfy model management functions and garbage collection, reports free VRAM before and after the operations.

KJNodes/misc

  • CondPassThrough

    Simply passes through the positive and negative conditioning, workaround for Set node not allowing bypassed inputs.

  • Dummy Out

    Does nothing, used to trigger generic workflow output. A way to get previews in the UI without saving anything to disk.

  • Lazy Switch KJ

    Controls flow of execution based on a boolean switch.

  • ModelPass

    Simply passes through the model, workaround for Set node not allowing bypassed inputs.

  • Scale Batch Prompt Schedule

    Scales a batch schedule from Fizz' nodes BatchPromptSchedule to a different frame count.

  • Sleep

    Delays the execution for the input amount of time.

  • String to Float List
  • Timer Node KJ

KJNodes/model_loaders

  • CheckpointLoaderKJExperimental

    Experimental node for patching torch.nn.Linear with CublasLinear.

  • Diffusion Model Loader KJExperimental

    Node for patching torch.nn.Linear with CublasLinear.

  • Diffusion Model SelectorExperimental

    Returns the path to the model as a string.

KJNodes/noise

  • Custom Sigmas

    Creates a sigmas tensor from a string of comma separated values. Examples: Nvidia's optimized AYS 10 step schedule for SD 1.5: 14.615, 6.475, 3.861, 2.697, 1.886, 1.396, 0.963, 0.652, 0.399, 0.152, 0.029 SDXL: 14.615, 6.315, 3.771, 2.181, 1.342, 0.862, 0.555, 0.380, 0.234, 0.113, 0.029 SVD: 700.00, 54.5, 15.886, 7.977, 4.248, 1.789, 0.981, 0.403, 0.173, 0.034, 0.002

  • Flip Sigmas Adjusted
  • Float To Sigmas

    Creates a sigmas tensor from list of float values.

  • Generate Noise

    Generates noise for injection or to be used as empty latents on samplers with add_noise off.

  • Inject Noise To Latent
  • Sigmas To Float

    Creates a float list from sigmas tensors.

KJNodes/text

  • Add Label

    Creates a new with the given text, and concatenates it to either above or below the input image. Note that this changes the input image's height! Fonts are loaded from this folder: ComfyUI/custom_nodes/ComfyUI-KJNodes/fonts

  • Append Strings To List
  • Create Text Mask

    Creates a text image and mask. Looks for fonts from this folder: ComfyUI/custom_nodes/ComfyUI-KJNodes/fonts If start_rotation and/or end_rotation are different values, creates animation between them.

  • Join String Multi

    Creates single string, or a list of strings, from multiple input strings. You can set how many inputs the node has, with the **inputcount** and clicking update.

  • Join Strings
  • Something To String

    Converts any type to a string.

  • Superprompt

    # SuperPrompt A T5 model fine-tuned on the SuperPrompt dataset for upsampling text prompts to more detailed descriptions. Meant to be used as a pre-generation step for text-to-image models that benefit from more detailed prompts. https://huggingface.co/roborovski/superprompt-v1

  • Widget To String

    Selects a node and it's specified widget and outputs the value as a string. If no node id or title is provided it will use the 'any_input' link and use that node. To see node id's, enable "Node ID Badge Mode" in main settings. Alternatively you can search with the node title. Node titles ONLY exist if they are manually edited! 'widget_name' can be a comma separated list. The 'any_input' is required for making sure the node you want the value from exists in the workflow.

KJNodes/torchcompile

  • TorchCompileControlNetExperimental
  • TorchCompileModelAdvancedExperimental

    Advanced torch.compile patching for diffusion models.

  • TorchCompileModelFluxAdvancedV2ExperimentalDeprecated

    Deprecated, use TorchCompileModelAdvanced instead.

  • TorchCompileModelWanVideoV2ExperimentalDeprecated

    Deprecated, use TorchCompileModelAdvanced instead.

  • TorchCompileVAEExperimental

KJNodes/vae

  • VAE Decode Loop KJ

    Video latent VAE decoding to fix artifacts on loop seams.

  • VAELoader KJ

KJNodes/wan

  • Apply RifleXRoPE WanVideoExperimental

    Extends the potential frame count of HunyuanVideo using this method: https://github.com/thu-ml/RIFLEx

  • Wan21 Block Lora Select

    Select individual block alpha values, value of 0 removes the block altogether

  • WanVideo Enhance A Video (native)Experimental

    https://github.com/NUS-HPC-AI-Lab/Enhance-A-Video

  • WanVideoNAGExperimental

    https://github.com/ChenDarYen/Normalized-Attention-Guidance

KJNodes/weights

  • Mask Or Image To Weight

    Gets the mean values from mask or image batch and returns that as the selected output type.

  • Spline Editor

    # WORK IN PROGRESS Do not count on this as part of your workflow yet, probably contains lots of bugs and stability is not guaranteed!! ## Graphical editor to create values for various ## schedules and/or mask batches. **Shift + click** to add control point at end. **Ctrl + click** to add control point (subdivide) between two points. **Right click on a point** to delete it. Note that you can't delete from start/end. Right click on canvas for context menu: NEW!: - Add new spline - Creates a new spline on same canvas, currently these paths are only outputed as coordinates. - Add single point - Creates a single point that only returns it's current position coords - Delete spline - Deletes the currently selected spline, you can select a spline by clicking on it's path, or cycle through them with the 'Next spline' -option. These are purely visual options, doesn't affect the output: - Toggle handles visibility - Display sample points: display the points to be returned. **points_to_sample** value sets the number of samples returned from the **drawn spline itself**, this is independent from the actual control points, so the interpolation type matters. sampling_method: - time: samples along the time axis, used for schedules - path: samples along the path itself, useful for coordinates - controlpoints: samples only the control points themselves output types: - mask batch example compatible nodes: anything that takes masks - list of floats example compatible nodes: IPAdapter weights - pandas series example compatible nodes: anything that takes Fizz' nodes Batch Value Schedule - torch tensor example compatible nodes: unknown

  • Weight Schedule Convert

    Converts different value lists/series to another type.

  • Weight Schedule Extend

    Extends, and converts if needed, different value lists/series