Custom Sigmas(CustomSigmas)
This node takes a comma-separated string of numerical values and converts it into a PyTorch tensor.
Custom Sigmas
The Custom Sigmas node receives a string of comma-separated numerical values and converts it into a PyTorch tensor.
The Custom Sigmas node allows users to create a noise schedule (sigmas) tensor by inputting a custom string of numerical values. It is primarily used to precisely control the noise intensity at each step during the sampling process of diffusion models (such as Stable Diffusion). This node provides the ability to fine-tune the generation process.
Node Function
This node receives a string of comma-separated numerical values and converts it into a PyTorch tensor. If the number of provided values does not match the target number of steps, the node automatically adjusts the sequence length using a log-linear interpolation algorithm to ensure the final output noise intensity sequence is smooth and matches the expected number of steps. This enables it to adapt to the preset optimized scheduling schemes of different models (e.g., SD 1.5, SDXL, SVD).
Node Parameter Description - Custom Sigmas
Control Parameters (Parameters)
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
sigmas_string | STRING | Yes | 14.615, 6.475, 3.861, 2.697, 1.886, 1.396, 0.963, 0.652, 0.399, 0.152, 0.029 | - | sigmas_string: Input a custom noise intensity sequence in the format of a comma-separated string of numerical values. There is no range restriction, but the values are typically positive and decreasing. |
interpolate_to_steps | INT | Yes | 10 | 0 - 255 (Step: 1) | interpolate_to_steps: Specifies the target number of sampling steps. The node will interpolate or adjust the input noise sequence accordingly. The range is from 0 to 255, with a step size of 1. |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| SIGMAS | SIGMAS | SIGMAS: Outputs the adjusted noise schedule tensor, which can be directly used for noise control in the sampler. |
Usage Scenarios
In workflows that require precise control over the image generation process or experimentation with different noise schedules, you can connect this node to the "sigmas" input port of a KSampler or KSampler Advanced. For example, you can directly input the 10-step schedule values optimized by Nvidia for SD 1.5 to attempt achieving better image quality with fewer sampling steps.
Custom Sigmas Node Source Code Link
The Custom Sigmas node is from the ComfyUI-KJNodes node package.
Comments
Sign in with GitHub to join the discussion.