Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > NKD Klein Tools > 😺NKD Klein Reference Region

ComfyUI Node: 😺NKD Klein Reference Region

Class Name

NKDKleinReferenceRegion

Category
😺NKD Nodes/Klein
Author
nekodificador (Account age: 2573days)
Extension
NKD Klein Tools
Latest Updated
2026-06-17
Github Stars
0.06K

How to Install NKD Klein Tools

Install this extension via the ComfyUI Manager by searching for NKD Klein Tools
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter NKD Klein Tools in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

😺NKD Klein Reference Region Description

Experimental tool directing reference image to specific canvas zone with masked influence for artists' control.

😺NKD Klein Reference Region:

The NKDKleinReferenceRegion node is an experimental tool designed to direct a single reference image to a specific zone on a canvas. This is achieved by painting a mask for the desired zone and selecting the reference image to apply. The node confines the influence of the reference image to the masked zone and can optionally strengthen its effect within that area. It operates by adjusting the attention between the canvas and the reference image, making it independent of resolution. This node is particularly useful for artists who want to control the placement and influence of reference images on their artwork. It is important to chain one node per region/reference and place it on the model line between Presampling and your sampler to ensure proper functionality.

😺NKD Klein Reference Region Input Parameters:

model

The model parameter represents the AI model being used. It is essential for processing the reference image and applying the attention biases as specified by the node. This parameter does not have specific minimum or maximum values as it depends on the model architecture being used.

latent

The latent parameter is the latent representation of the image being processed. It is passed through the node to maintain consistency in the image generation process. This parameter is crucial for mapping the region specified by the mask.

mask

The mask parameter is a crucial input that defines the specific zone on the canvas where the reference image's influence will be applied. It is a binary mask where the zone is marked, and its absence or an empty mask results in the node being a no-op, meaning it will not perform any operation.

reference_index

The reference_index parameter specifies which reference image to apply to the masked zone. It is an integer value with a default of 1, indicating the first reference image. This parameter allows you to select the appropriate reference image when multiple references are available.

region_weight

The region_weight parameter determines the strength of the reference image's influence within the masked zone. It is a float value with a default of 1.0, a minimum of 0.0, and a maximum of 2.0. A higher value increases the influence of the reference image within the zone.

outside_suppression

The outside_suppression parameter controls the suppression of the reference image's influence outside the masked zone. It is a float value with a default of 1.0, indicating full suppression. Adjusting this value can allow some influence of the reference image outside the zone.

region_hardness

The region_hardness parameter defines the hardness of the transition between the masked zone and the rest of the canvas. It is a float value with a default of 0.0, indicating a soft transition. Increasing this value results in a harder edge between the zone and the surrounding area.

😺NKD Klein Reference Region Output Parameters:

model

The model output is the modified AI model with the applied attention biases. This output is crucial as it reflects the changes made by the node to direct the reference image's influence to the specified zone on the canvas.

latent

The latent output is the unchanged latent representation of the image. It is passed through the node to ensure continuity in the image generation process and can be used in subsequent nodes for further processing.

😺NKD Klein Reference Region Usage Tips:

  • Ensure that the mask accurately represents the zone where you want the reference image to influence the canvas. An incorrect mask can lead to undesired results.
  • Experiment with the region_weight and outside_suppression parameters to achieve the desired level of influence and suppression for the reference image.
  • Chain multiple NKDKleinReferenceRegion nodes if you need to apply different reference images to different zones on the canvas.

😺NKD Klein Reference Region Common Errors and Solutions:

"NKD Klein Reference Region: empty mask — node is a no-op."

  • Explanation: This error occurs when the mask is either missing or does not contain any marked zones, resulting in the node not performing any operation.
  • Solution: Ensure that the mask is correctly defined and contains the desired zone for the reference image's influence.

"NKD Klein Reference Region: token grid mismatch (seq=%d, canvas=%d, refs=%d) — skipping this step."

  • Explanation: This error indicates a mismatch in the token grid dimensions between the sequence, canvas, and references, preventing the node from applying the attention biases.
  • Solution: Verify that the dimensions of the sequence, canvas, and references are compatible and correctly configured. Adjust the model or input parameters as necessary to resolve the mismatch.

😺NKD Klein Reference Region Related Nodes

Go back to the extension to check out more related nodes.
NKD Klein Tools
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

😺NKD Klein Reference Region