ComfyUI > Nodes > ComfyUI > DualCFGGuider

ComfyUI Node: DualCFGGuider

Class Name

DualCFGGuider

Category
sampling/custom_sampling/guiders
Author
ComfyAnonymous (Account age: 598days)
Extension
ComfyUI
Latest Updated
2024-08-12
Github Stars
45.85K

How to Install ComfyUI

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

DualCFGGuider Description

Enhance sampling with dual CFG guidance for nuanced model predictions and refined outputs.

DualCFGGuider:

The DualCFGGuider node is designed to enhance the sampling process by leveraging dual classifier-free guidance (CFG) techniques. This node allows you to apply two different conditioning sets and their respective guidance scales to influence the model's output. By incorporating both positive and negative conditioning, along with a secondary conditioning set, the DualCFGGuider provides a more nuanced and flexible approach to guiding the model's predictions. This can be particularly beneficial in generating more controlled and refined outputs, making it a valuable tool for AI artists looking to achieve specific artistic effects or adhere to particular constraints in their generated content.

DualCFGGuider Input Parameters:

model

This parameter specifies the model to be used for the sampling process. It is essential as it defines the underlying architecture and weights that will generate the output based on the provided conditionings.

cond1

This is the first conditioning input, which typically represents the primary positive conditioning. It influences the model to generate outputs that align with the desired characteristics or features specified in this conditioning set.

cond2

This is the second conditioning input, which can be used to introduce additional guidance or constraints. It allows for more complex and layered conditioning, enabling the model to consider multiple aspects or features during the generation process.

negative

This conditioning input represents the negative conditioning, which guides the model to avoid certain characteristics or features. It helps in steering the model away from undesired outputs, ensuring that the generated content does not include specific unwanted elements.

cfg_conds

This parameter sets the guidance scale for the primary conditioning (cond1). It is a floating-point value with a default of 8.0, a minimum of 0.0, and a maximum of 100.0. The scale determines the strength of the influence that the primary conditioning has on the model's output.

cfg_cond2_negative

This parameter sets the guidance scale for the secondary conditioning (cond2) and the negative conditioning. It is a floating-point value with a default of 8.0, a minimum of 0.0, and a maximum of 100.0. This scale controls the impact of the secondary and negative conditionings on the model's predictions.

DualCFGGuider Output Parameters:

GUIDER

The output of the DualCFGGuider node is a GUIDER object. This object encapsulates the dual CFG logic and is used to guide the model during the sampling process. It ensures that the model's output adheres to the specified conditionings and guidance scales, resulting in more controlled and refined generated content.

DualCFGGuider Usage Tips:

  • Experiment with different values for cfg_conds and cfg_cond2_negative to find the optimal balance between the primary and secondary conditionings for your specific use case.
  • Use the negative conditioning input to explicitly steer the model away from generating unwanted features or characteristics, enhancing the quality and relevance of the output.
  • Combine cond1 and cond2 creatively to introduce complex and multi-faceted guidance, allowing for more sophisticated and nuanced generated content.

DualCFGGuider Common Errors and Solutions:

"Invalid model input"

  • Explanation: This error occurs when the model input is not correctly specified or is incompatible with the DualCFGGuider node.
  • Solution: Ensure that the model input is correctly defined and compatible with the node. Verify that the model architecture and weights are properly loaded.

"Conditioning inputs missing"

  • Explanation: This error indicates that one or more of the required conditioning inputs (cond1, cond2, or negative) are not provided.
  • Solution: Check that all required conditioning inputs are specified and correctly connected to the node.

"CFG scale out of range"

  • Explanation: This error occurs when the values for cfg_conds or cfg_cond2_negative are outside the allowed range (0.0 to 100.0).
  • Solution: Adjust the CFG scale values to be within the specified range. Ensure that the values are set correctly in the node's parameters.

DualCFGGuider Related Nodes

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