ComfyUI  >  Nodes  >  pre_cfg_comfy_nodes_for_ComfyUI >  Pre CFG variable scaling

ComfyUI Node: Pre CFG variable scaling

Class Name

Pre CFG variable scaling

Category
model_patches/Pre CFG
Author
Extraltodeus (Account age: 3267 days)
Extension
pre_cfg_comfy_nodes_for_ComfyUI
Latest Updated
9/23/2024
Github Stars
0.0K

How to Install pre_cfg_comfy_nodes_for_ComfyUI

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

Pre CFG variable scaling Description

Dynamic adjustment of classifier-free guidance scale for enhanced AI art generation output control.

Pre CFG variable scaling:

The Pre CFG variable scaling node is designed to dynamically adjust the classifier-free guidance (CFG) scale during the denoising process in AI art generation. This node allows for a more nuanced and controlled application of the CFG scale, which can enhance the quality and specificity of the generated images. By varying the CFG scale based on certain parameters, this node helps in achieving a balance between creativity and adherence to the input conditions, leading to more refined and targeted outputs. The primary goal of this node is to provide a flexible mechanism to modulate the influence of the guidance scale, thereby improving the overall artistic output.

Pre CFG variable scaling Input Parameters:

model

This parameter specifies the model to which the variable scaling will be applied. It is a required input and ensures that the node operates on the correct model instance.

maximum_scale

This parameter sets the upper limit for the CFG scale. It determines the maximum influence the guidance can have during the denoising process. The default value is 80, with a minimum of 0.0 and a maximum of 1000.0. Adjusting this value can significantly impact the strength of the guidance applied.

minimum_scale

This parameter sets the lower limit for the CFG scale. It defines the minimum influence the guidance can have. The default value is 4.5, with a minimum of 0.0 and a maximum of 10.0. This parameter helps in ensuring that the guidance does not become too weak.

strength

This parameter controls the intensity of the scaling effect. It determines how strongly the scaling adjustments are applied. The default value is 0.5, with a range from 0.0 to 10.0. Modifying this value can fine-tune the balance between the original and scaled guidance.

end_at_sigma

This parameter specifies the sigma value at which the scaling effect should end. It helps in defining the progression of the scaling effect throughout the denoising process. The default value is 0.28, with a range from 0.0 to 1000.0.

converging_scales

This boolean parameter determines whether the scales should converge over time. If set to True, the scales will gradually converge, leading to a more consistent application of the guidance. The default value is True.

invert_mask

This boolean parameter specifies whether the mask should be inverted. If set to True, the areas defined by the mask will be inverted, altering the regions affected by the scaling. The default value is False.

input_mask (optional)

This optional parameter allows for the connection of a mask. If only a mask is connected, the scale becomes a CFG scale of what is being masked. When a latent is connected, the mask defines what will be modified by the node.

input_latent (optional)

This optional parameter allows for the connection of a latent. If a latent is connected, the scale becomes the maximum scale allowed in which to seek similarity.

Pre CFG variable scaling Output Parameters:

model

The output parameter is the modified model with the applied variable scaling. This model will have the adjusted CFG scales based on the input parameters, leading to a more controlled and refined denoising process.

Pre CFG variable scaling Usage Tips:

  • Experiment with different values for maximum_scale and minimum_scale to find the optimal balance for your specific artistic needs.
  • Use the strength parameter to fine-tune the intensity of the scaling effect, especially if you notice that the guidance is either too strong or too weak.
  • Enable converging_scales if you want a more consistent application of the guidance throughout the denoising process.
  • Utilize the input_mask and input_latent options to target specific areas of the image for scaling adjustments, allowing for more precise control over the final output.

Pre CFG variable scaling Common Errors and Solutions:

"Invalid model input"

  • Explanation: This error occurs when the model input is not correctly specified or is incompatible with the node.
  • Solution: Ensure that the model parameter is correctly set and that the model is compatible with the variable scaling node.

"Scale value out of range"

  • Explanation: This error happens when the maximum_scale or minimum_scale values are set outside their allowed ranges.
  • Solution: Verify that the maximum_scale is between 0.0 and 1000.0 and the minimum_scale is between 0.0 and 10.0. Adjust the values accordingly.

"Invalid sigma value"

  • Explanation: This error occurs when the end_at_sigma value is set outside its allowed range.
  • Solution: Ensure that the end_at_sigma value is between 0.0 and 1000.0. Adjust the value to fall within this range.

"Mask inversion failed"

  • Explanation: This error happens when there is an issue with inverting the mask.
  • Solution: Check the invert_mask parameter and ensure that the mask input is correctly connected and valid.

Pre CFG variable scaling Related Nodes

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