← See All Custom Node Packs

efficiency-nodes-comfyui

1473

Run ComfyUI Easily with InstaSD

Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:

  • One-click deployment
  • Any model, any node
  • Powerful GPUs for rapid iteration
Get Started

XY Input: CFG Scale

Documentation: XY Input: CFG Scale Node

Overview

The XY Input: CFG Scale node is a part of the Efficiency Nodes collection designed for ComfyUI. This node allows users to define a range of CFG (Classifier-Free Guidance) scale values to be used in generating art or other outputs within ComfyUI workflows. CFG is a technique used in AI models to balance creativity and adherence to input prompts. By plotting different CFG scales, users can gain insights into how varying CFG values influence the generated outputs.

What This Node Does

This node facilitates the creation of a series of CFG scale values that can be used to conduct experiments and visual comparisons within ComfyUI workflows. Users can define a starting and ending CFG scale, and the node will automatically generate a list of intermediary values to be used in an XY plot.

Inputs

The XY Input: CFG Scale node requires the following inputs:

  1. Batch Count: This is the number of CFG scale values that will be generated between the specified first and last CFG scales. It determines the resolution of the CFG scale range. The maximum number of batches is typically 50, but it can be adjusted based on your specific needs or the configuration of your ComfyUI setup.

  2. First CFG: This is the starting CFG scale value. Users specify this value based on the desired starting point for their CFG scale range.

  3. Last CFG: This is the ending CFG scale value. Users specify this value based on the desired endpoint for their CFG scale range.

Outputs

The output of the XY Input: CFG Scale node is:

  • X or Y: This output contains the type and values needed for XY plotting. Specifically, it provides:
    • Type: Set to "CFG Scale".
    • Values: A list of CFG scale values generated according to the specified batch count, first CFG, and last CFG.

This output can be connected to an XY Plot node or other nodes that use XY plotting in workflows to visualize the effects of varying CFG scales on generated outputs.

Usage in ComfyUI Workflows

In ComfyUI workflows, the XY Input: CFG Scale node is typically used alongside other XY Plot nodes to evaluate how different CFG scales affect the outcome of the AI generation process. By plotting these values in a grid, users can visually compare the artistic or image outputs for each specified CFG scale, gaining insights into the balance between prompt adherence and model creativity.

Example Use Case

  1. Setting Values: Input a batch count of 5, a first CFG scale of 5.0, and a last CFG scale of 15.0.
  2. Plotting: Connect the node’s output to an XY Plot node.
  3. Visualization: Use the resulting plot to observe how different CFG scales influence the artistic results. This can help fine-tune CFG values for desired output characteristics.

Special Features or Considerations

  • Adjustable Batch Count: Users have the flexibility to set the batch count, allowing fine control over the granularity of CFG values used for plotting.
  • Range Flexibility: The node allows users to specify a wide range of CFG scales, which can be useful for exploring the effects of extreme values on model outputs.
  • Integration: This node is designed to work seamlessly with other Efficiency Nodes in ComfyUI, providing a robust toolset for efficiently experimenting with and optimizing AI model settings.

Overall, the XY Input: CFG Scale node is a valuable tool for artists and developers using ComfyUI to better understand and control the behavior of AI models in generating creative content.