CheckpointPerturbWeights
In terms of technical implementation, this node duplicates the input model and generates Gaussian noise based on the specified random seed.
Checkpoint Perturb Weights
The CheckpointPerturbWeights node, in its technical implementation, duplicates the input model and generates Gaussian noise based on a specified random seed.
CheckpointPerturbWeights is an experimental node designed to apply minor random perturbations to the weights of a loaded model. Its core function is to explore potential variations in model output by adding controllable noise to different parts of the model, potentially creating new image styles or details.
Node Function
In its technical implementation, this node duplicates the input model and generates Gaussian noise based on a specified random seed. It then adds noise of varying intensities (controlled by corresponding parameters) to the original weights, based on keywords in the model weight layer names (such as "joint_blocks", "final_layer", etc.). This process aims to make subtle adjustments to the model's internal parameters without disrupting its overall structure.
Node Parameter Description - CheckpointPerturbWeights
Connection Inputs (Inputs)
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
model | MODEL | Yes | - | - | model (input parameter): The original model whose weights require perturbation processing. |
Control Parameters (Parameters)
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
joint_blocks | FLOAT | Yes | 0.02 | 0.001 - 10.0 (Step: 0.001) | joint_blocks (input parameter): Controls the intensity coefficient for weight perturbation in model layers whose names start with "joint_blocks". Range: 0.001 to 10.0, Step: 0.001. |
final_layer | FLOAT | Yes | 0.02 | 0.001 - 10.0 (Step: 0.001) | final_layer (input parameter): Controls the intensity coefficient for weight perturbation in model layers whose names start with "final_layer". Range: 0.001 to 10.0, Step: 0.001. |
rest_of_the_blocks | FLOAT | Yes | 0.02 | 0.001 - 10.0 (Step: 0.001) | rest_of_the_blocks (input parameter): Controls the intensity coefficient for weight perturbation in all other model layers. Range: 0.001 to 10.0, Step: 0.001. |
seed | INT | Yes | 123 | 0 - 0xffffffffffffffff (Step: 1) | seed (input parameter): The seed value used to generate random noise, ensuring reproducible results. Range: 0 to 0xffffffffffffffff. |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| MODEL | MODEL | MODEL (output parameter): The new model output after weight perturbation processing. |
Usage Scenarios
In practical applications, you can use this node when you want to generate a series of images from the same base model that have slightly different styles while maintaining coherence. For example, in a text-to-image generation workflow, you can connect this node after loading the base model. By adjusting different perturbation intensities and random seeds, you can batch-generate multiple images with subtle variations for style exploration or to find the optimal output.
Notes
Please note that this is an experimental node. Perturbing weights may produce unpredictable results, including degraded image quality or generation failures. It is recommended to start with small perturbation intensities (such as the default value of 0.02) and observe the effects.
CheckpointPerturbWeights Node Source Code Link
The CheckpointPerturbWeights node is from the ComfyUI-KJNodes node package.
Comments
Sign in with GitHub to join the discussion.