ComfyUI  >  Nodes  >  ComfyUI-AutomaticCFG >  Automatic CFG - Post rescale only

ComfyUI Node: Automatic CFG - Post rescale only

Class Name

Automatic CFG - Post rescale only

Category
model_patches/Automatic_CFG/utils
Author
Extraltodeus (Account age: 3201 days)
Extension
ComfyUI-AutomaticCFG
Latest Updated
8/4/2024
Github Stars
0.3K

How to Install ComfyUI-AutomaticCFG

Install this extension via the ComfyUI Manager by searching for  ComfyUI-AutomaticCFG
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-AutomaticCFG 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Automatic CFG - Post rescale only Description

Enhances AI-generated image quality through rescaling for improved intensity and balance in denoising process.

Automatic CFG - Post rescale only:

The Automatic CFG

  • Post rescale only node is designed to enhance the quality of AI-generated images by rescaling the conditional and unconditional predictions during the denoising process. This node is particularly useful for fine-tuning the intensity and balance of the generated images, ensuring that the final output maintains a high level of detail and visual appeal. By applying a rescaling mechanism, it adjusts the intensity of the denoised image based on predefined parameters, which helps in achieving a more controlled and refined output. This node is essential for artists looking to optimize their AI-generated artwork by providing a more consistent and visually pleasing result.

Automatic CFG - Post rescale only Input Parameters:

model

This parameter represents the AI model that will be used for generating the images. It is a required input and ensures that the node has the necessary model to perform the rescaling operations.

automatic_cfg

This parameter determines the type of automatic configuration to be applied. The default value is "None", but it can be set to other modes depending on the desired effect. This parameter influences how the conditional and unconditional predictions are adjusted during the rescaling process.

skip_uncond

A boolean parameter that, when set to True, skips the unconditional prediction step. The default value is False. This can be useful for scenarios where the unconditional prediction is not needed or desired.

fake_uncond_start

A boolean parameter that, when set to True, initiates a fake unconditional prediction step. The default value is False. This is useful for experimental purposes or specific artistic effects.

uncond_sigma_start

This parameter sets the starting value for the sigma range used in the unconditional prediction. The default value is 1000. It defines the intensity of the noise reduction at the beginning of the process.

uncond_sigma_end

This parameter sets the ending value for the sigma range used in the unconditional prediction. The default value is 0. It defines the intensity of the noise reduction at the end of the process.

lerp_uncond

A boolean parameter that, when set to True, enables linear interpolation of the unconditional prediction. The default value is False. This can help in blending the conditional and unconditional predictions more smoothly.

lerp_uncond_strength

This parameter sets the strength of the linear interpolation for the unconditional prediction. The default value is 1, with a minimum of 0.0 and a maximum of 5.0. It controls how strongly the unconditional prediction influences the final output.

lerp_uncond_sigma_start

This parameter sets the starting value for the sigma range used in the linear interpolation of the unconditional prediction. The default value is 1000. It defines the intensity of the noise reduction at the beginning of the interpolation process.

lerp_uncond_sigma_end

This parameter sets the ending value for the sigma range used in the linear interpolation of the unconditional prediction. The default value is 1. It defines the intensity of the noise reduction at the end of the interpolation process.

subtract_latent_mean

A boolean parameter that, when set to True, subtracts the mean value from the latent space. The default value is False. This can help in centering the latent space and improving the quality of the generated images.

subtract_latent_mean_sigma_start

This parameter sets the starting value for the sigma range used in the mean subtraction of the latent space. The default value is 1000. It defines the intensity of the mean subtraction at the beginning of the process.

subtract_latent_mean_sigma_end

This parameter sets the ending value for the sigma range used in the mean subtraction of the latent space. The default value is 1. It defines the intensity of the mean subtraction at the end of the process.

latent_intensity_rescale

A boolean parameter that, when set to True, enables the rescaling of the latent intensity. The default value is False. This helps in adjusting the intensity of the latent space to achieve a more balanced output.

latent_intensity_rescale_sigma_start

This parameter sets the starting value for the sigma range used in the rescaling of the latent intensity. The default value is 1000. It defines the intensity of the rescaling at the beginning of the process.

latent_intensity_rescale_sigma_end

This parameter sets the ending value for the sigma range used in the rescaling of the latent intensity. The default value is 1. It defines the intensity of the rescaling at the end of the process.

cond_exp

A boolean parameter that, when set to True, enables experimental functions on the conditional prediction. The default value is False. This can be used for testing new methods or achieving specific artistic effects.

cond_exp_sigma_start

This parameter sets the starting value for the sigma range used in the experimental functions on the conditional prediction. The default value is 1000. It defines the intensity of the experimental functions at the beginning of the process.

cond_exp_sigma_end

This parameter sets the ending value for the sigma range used in the experimental functions on the conditional prediction. The default value is 1000. It defines the intensity of the experimental functions at the end of the process.

cond_exp_method

This parameter specifies the method to be used for the experimental functions on the conditional prediction. The default value is "amplify". It determines the type of transformation applied to the conditional prediction.

cond_exp_value

This parameter sets the value for the experimental functions on the conditional prediction. The default value is 2. It controls the intensity of the transformation applied to the conditional prediction.

cond_exp_normalize

A boolean parameter that, when set to True, normalizes the conditional prediction after applying the experimental functions. The default value is False. This helps in maintaining a consistent scale for the conditional prediction.

uncond_exp

A boolean parameter that, when set to True, enables experimental functions on the unconditional prediction. The default value is False. This can be used for testing new methods or achieving specific artistic effects.

uncond_exp_sigma_start

This parameter sets the starting value for the sigma range used in the experimental functions on the unconditional prediction. The default value is 1000. It defines the intensity of the experimental functions at the beginning of the process.

uncond_exp_sigma_end

This parameter sets the ending value for the sigma range used in the experimental functions on the unconditional prediction. The default value is 1000. It defines the intensity of the experimental functions at the end of the process.

uncond_exp_method

This parameter specifies the method to be used for the experimental functions on the unconditional prediction. The default value is "amplify". It determines the type of transformation applied to the unconditional prediction.

uncond_exp_value

This parameter sets the value for the experimental functions on the unconditional prediction. The default value is 2. It controls the intensity of the transformation applied to the unconditional prediction.

uncond_exp_normalize

A boolean parameter that, when set to True, normalizes the unconditional prediction after applying the experimental functions. The default value is False. This helps in maintaining a consistent scale for the unconditional prediction.

fake_uncond_exp

A boolean parameter that, when set to True, enables experimental functions on the fake unconditional prediction. The default value is False. This can be used for testing new methods or achieving specific artistic effects.

fake_uncond_exp_method

This parameter specifies the method to be used for the experimental functions on the fake unconditional prediction. The default value is "amplify". It determines the type of transformation applied to the fake unconditional prediction.

fake_uncond_exp_value

This parameter sets the value for the experimental functions on the fake unconditional prediction. The default value is 2. It controls the intensity of the transformation applied to the fake unconditional prediction.

fake_uncond_exp_normalize

A boolean parameter that, when set to True, normalizes the fake unconditional prediction after applying the experimental functions. The default value is False. This helps in maintaining a consistent scale for the fake unconditional prediction.

fake_uncond_multiplier

This parameter sets the multiplier for the fake unconditional prediction. The default value is 1. It controls the overall intensity of the fake unconditional prediction.

fake_uncond_sigma_start

This parameter sets the starting value for the sigma range used in the fake unconditional prediction. The default value is 1000. It defines the intensity of the fake unconditional prediction at the beginning of the process.

fake_uncond_sigma_end

This parameter sets the ending value for the sigma range used in the fake unconditional prediction. The default value is 1. It defines the intensity of the fake unconditional prediction at the end of the process.

latent_intensity_rescale_cfg

This parameter sets the configuration value for the latent intensity rescaling. The default value is 8. It controls the overall intensity of the rescaling process.

latent_intensity_rescale_method

This parameter specifies the method to be used for the latent intensity rescaling. The default value is "hard". It determines the type of transformation applied during the rescaling process.

ignore_pre_cfg_func

A boolean parameter that, when set to True, ignores the pre-configuration functions. The default value is False. This can be useful for scenarios where the pre-configuration functions are not needed or desired.

args_filter

This parameter allows for filtering of the arguments passed to the node. It is an optional parameter and can be used to customize the behavior of the node based on specific criteria.

auto_cfg_topk

This parameter sets the top-k value for the automatic configuration. The default value is 0.25. It controls the selection of the top-k elements during the automatic configuration process.

auto_cfg_ref

This parameter sets the reference value for the automatic configuration. The default value is 8. It serves as a baseline for the automatic configuration process.

eval_string_cond

This parameter allows for the evaluation of a custom string for the conditional prediction. It is an optional parameter and can be used to customize the behavior of the node based on specific criteria.

eval_string_uncond

This parameter allows for the evaluation of a custom string for the unconditional prediction. It is an optional parameter and can be used to customize the behavior of the node based on specific criteria.

eval_string_fake

This parameter allows for the evaluation of a custom string for the fake unconditional prediction. It is an optional parameter and can be used to customize the behavior of the node based on specific criteria.

attention_modifiers_global_enabled

A boolean parameter that, when set to True, enables global attention modifiers. The default value is False. This can be used to apply attention modifiers globally across the entire model.

attention_modifiers_positive

This parameter allows for the specification of positive attention modifiers. It is an optional parameter and can be used to customize the behavior of the node based on specific criteria.

Automatic CFG - Post rescale only Output Parameters:

denoised_tmp

This output parameter represents the denoised image after the rescaling process. It is the final result of the node's operations and provides a refined and visually appealing image. The denoised image is adjusted based on the input parameters to achieve the desired intensity and balance.

Automatic CFG - Post rescale only Usage Tips:

  • Experiment with different values for automatic_cfg to see how it affects the final output. This can help you find the best configuration for your specific artistic needs.
  • Use the latent_intensity_rescale parameter to adjust the intensity of the latent space. This can help in achieving a more balanced and visually pleasing result.
  • Enable lerp_uncond and adjust lerp_uncond_strength to blend the conditional and unconditional predictions more smoothly. This can help in creating a more cohesive final image.

Automatic CFG - Post rescale only Common Errors and Solutions:

"Invalid model input"

  • Explanation: This error occurs when the model input is not provided or is invalid.
  • Solution: Ensure that you provide a valid model as input to the node.

"Invalid sigma range"

  • Explanation: This error occurs when the sigma range values are not set correctly.
  • Solution: Check the values for uncond_sigma_start, uncond_sigma_end, lerp_uncond_sigma_start, and lerp_uncond_sigma_end to ensure they are within the valid range.

"Invalid parameter value"

  • Explanation: This error occurs when one or more parameter values are out of the acceptable range.
  • Solution: Verify that all parameter values are within their specified ranges and adjust them accordingly.

Automatic CFG - Post rescale only Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-AutomaticCFG
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.