KJNodes/experimentalgenerated

LoadResAdapterNormalization

This node loads a。

Load Res Adapter Normalization

model
resadapter_path
MODEL
KJNodes

The LoadResAdapterNormalization node loads `

The LoadResAdapterNormalization node is an experimental tool for loading and applying ResAdapter normalization weights to diffusion models. Its core function is to modify the internal parameters of an existing model to alter its feature normalization behavior during image generation, without the need to replace the entire model.

Node Function

This node loads weight files in .safetensors or .ckpt format from a specified checkpoint file path. Its technical mechanism involves identifying specific key-value pairs in the file prefixed with diffusion_model. and applying these new tensor data as "patches" to the corresponding layers of the input model, provided the shapes of the original tensor and the tensor to be loaded are an exact match.

Node Parameter Description - LoadResAdapterNormalization

Inputs

Parameter NameData TypeRequiredDefault ValueRange/OptionsDescription
modelMODELYes--: Receives the base model to be modified. This parameter is required and has no default value.
resadapter_pathFOLDER_PATHSYes--: Specifies the path storing the ResAdapter weight file. The file must be located within ComfyUI's checkpoints directory.

Outputs

Parameter NameData TypeDescription
MODELMODEL: Outputs a new model object with the ResAdapter normalization weights applied.

Usage Scenario

In an image generation workflow, you can connect this node after the base model loading node. For example, first use the Load Checkpoint node to load a Stable Diffusion model, then connect its output MODEL to this node's model input port, and select a pre-trained ResAdapter weight file. This will yield a new model with adjusted normalization for subsequent sampling steps.

Notes

Please note that this node relies on specific patching functionality added to ComfyUI after March 3, 2024. If your ComfyUI version is too old, the node may report an error and prompt you to update.

The LoadResAdapterNormalization node is from the ComfyUI-KJNodes node package.

Comments

Sign in with GitHub to join the discussion.

Loading comments…