ComfyUI > Nodes > ComfyUI-NAG-Extended > SamplerCustomWithNAG

ComfyUI Node: SamplerCustomWithNAG

Class Name

SamplerCustomWithNAG

Category
sampling/custom_sampling
Author
BigStationW (Account age: 367days)
Extension
ComfyUI-NAG-Extended
Latest Updated
2026-05-02
Github Stars
0.03K

How to Install ComfyUI-NAG-Extended

Install this extension via the ComfyUI Manager by searching for ComfyUI-NAG-Extended
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-NAG-Extended 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

SamplerCustomWithNAG Description

Enhances AI art sampling with NAG technique for nuanced, refined outputs and customizable artistic effects.

SamplerCustomWithNAG:

The SamplerCustomWithNAG node is designed to enhance the sampling process in AI art generation by integrating the NAG (Noise Adaptive Guidance) technique. This node is part of the ComfyUI-NAG-Extended suite, which aims to provide more control and flexibility over the sampling process, allowing for more nuanced and refined outputs. The primary goal of this node is to offer a customizable sampling experience that can adapt to different artistic needs and styles. By leveraging the NAG method, it helps in achieving smoother transitions and more coherent results in generated images. This node is particularly beneficial for artists looking to experiment with different noise levels and guidance scales to achieve unique artistic effects.

SamplerCustomWithNAG Input Parameters:

model

The model parameter specifies the AI model used for generating the art. It is crucial as it determines the style and quality of the output. The model should be compatible with the NAG technique to ensure optimal performance.

noise

The noise parameter represents the initial random noise input to the sampling process. It influences the randomness and variability in the generated art. Adjusting this parameter can lead to different artistic outcomes.

steps

The steps parameter defines the number of sampling steps to be performed. More steps generally lead to finer details and higher quality outputs, but also increase computation time. The minimum value is 1, and there is no strict maximum, but it should be set according to the desired quality and available computational resources.

cfg

The cfg parameter stands for "classifier-free guidance" and controls the strength of guidance applied during sampling. A higher value results in stronger adherence to the model's learned patterns, while a lower value allows for more creative freedom. The default value is typically set to balance creativity and adherence to the model.

nag_scale

The nag_scale parameter adjusts the intensity of the Noise Adaptive Guidance. It affects how much the guidance influences the noise during sampling. A higher scale results in more pronounced guidance effects.

nag_tau

The nag_tau parameter is a hyperparameter that influences the temporal aspect of the guidance. It can be used to control the smoothness of transitions in the generated art.

nag_alpha

The nag_alpha parameter controls the blending factor between the guided and unguided noise. It allows for fine-tuning the balance between randomness and guidance.

nag_sigma_start

The nag_sigma_start parameter sets the initial sigma value for the noise schedule. It determines the starting point of noise reduction during sampling.

nag_sigma_end

The nag_sigma_end parameter sets the final sigma value for the noise schedule. It determines the endpoint of noise reduction, affecting the final smoothness of the output.

sampler_name

The sampler_name parameter specifies the name of the sampler to be used. It should be compatible with the NAG technique to ensure proper functionality.

scheduler

The scheduler parameter defines the scheduling strategy for the sampling process. It influences the timing and sequence of noise reduction steps.

positive

The positive parameter represents the positive guidance input, which steers the sampling process towards desired features or styles.

negative

The negative parameter represents the negative guidance input, which helps in avoiding undesired features or styles during sampling.

nag_negative

The nag_negative parameter is similar to negative but specifically tailored for the NAG technique, providing additional control over the guidance process.

latent_image

The latent_image parameter allows for the use of a pre-existing latent image as a starting point for sampling, enabling iterative refinement of previous outputs.

denoise

The denoise parameter controls the level of denoising applied during sampling. A value of 1.0 means full denoising, while lower values retain more noise.

disable_noise

The disable_noise parameter is a boolean flag that, when set to true, disables the addition of noise during sampling, resulting in a more deterministic output.

start_step

The start_step parameter specifies the starting step for the sampling process, allowing for partial sampling from a specific point.

last_step

The last_step parameter specifies the ending step for the sampling process, allowing for early termination of sampling.

force_full_denoise

The force_full_denoise parameter is a boolean flag that, when set to true, ensures full denoising at the last step, regardless of other settings.

noise_mask

The noise_mask parameter allows for selective application of noise, enabling more control over specific areas of the image.

sigmas

The sigmas parameter defines the noise schedule, specifying the sigma values for each step of the sampling process.

callback

The callback parameter allows for the execution of a custom function at each step of the sampling process, enabling real-time monitoring or modification.

disable_pbar

The disable_pbar parameter is a boolean flag that, when set to true, disables the progress bar during sampling, reducing visual clutter.

seed

The seed parameter sets the random seed for the sampling process, ensuring reproducibility of results.

latent_shapes

The latent_shapes parameter defines the shapes of the latent variables used during sampling, affecting the structure of the generated art.

SamplerCustomWithNAG Output Parameters:

samples

The samples output parameter contains the final generated images after the sampling process. These images are the result of applying the NAG technique to the input noise and guidance parameters, and they reflect the artistic style and quality dictated by the model and input settings.

SamplerCustomWithNAG Usage Tips:

  • Experiment with different nag_scale and nag_alpha values to achieve unique artistic effects and find the right balance between guidance and creativity.
  • Use the seed parameter to reproduce specific results or to explore variations by changing the seed value.
  • Adjust the steps parameter to control the level of detail and quality in the output, keeping in mind the trade-off with computation time.

SamplerCustomWithNAG Common Errors and Solutions:

"Model not compatible with NAG"

  • Explanation: The selected model does not support the Noise Adaptive Guidance technique.
  • Solution: Ensure that the model you are using is compatible with the NAG technique. Check the documentation or model specifications for compatibility information.

"Invalid sigma values"

  • Explanation: The nag_sigma_start or nag_sigma_end values are not set correctly, leading to an invalid noise schedule.
  • Solution: Verify that the sigma values are within a reasonable range and that nag_sigma_start is less than or equal to nag_sigma_end.

"Sampling steps out of range"

  • Explanation: The start_step or last_step parameters are set outside the valid range of steps.
  • Solution: Ensure that start_step and last_step are within the total number of sampling steps specified by the steps parameter. Adjust them accordingly to fit within the valid range.

SamplerCustomWithNAG Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-NAG-Extended
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.

SamplerCustomWithNAG