ComfyUI Node Runs on cloud

XY Input: Control Net

Control Net

By jags111·Created 3 years ago·Updated 4 months ago· 1,486
XY Input: Control Net
  • control_net
  • image
  • cnet_stack
  • X or Y
target_parameter
batch_count3
first_strength0.00
last_strength1.00
first_start_percent0.00
last_start_percent1.00
first_end_percent0.00
last_end_percent1.00
strength1.00
start_percent0.00
end_percent1.00

This is the single-axis cousin of XY Input: Control Net Plot. Where the Plot version fills a whole 2D grid, this one sweeps one ControlNet parameter along one axis, so you can pair it with a completely different parameter - CFG, steps, checkpoint - on the other. Reach for it when you want to see how a ControlNet's strength interacts with something else, rather than plotting the ControlNet against itself. It's part of the Efficiency Nodes XY Plot system.

How it works

ControlNet conditions your image on spatial structure - pose, depth, edges - so the prompt sets what and the ControlNet sets where. This node takes a loaded control_net and reference image, then sweeps whichever one dial you pick across a range, handing the values to the XY Plot node for one axis.

target_parameter chooses the dial: strength, start_percent, or end_percent. Whichever you select, the matching first_/last_ pair defines the sweep - first_strength/last_strength if you're plotting strength, first_start_percent/last_start_percent for the start point, and so on. The plain strength, start_percent, and end_percent widgets hold the fixed values for the dials you're not sweeping.

batch_count sets how many values the sweep steps through.

The inputs and outputs

  • control_net and image (required) - the model and the map it reads.
  • target_parameter - which dial to sweep.
  • batch_count plus the relevant first_/last_ pair - the range and resolution.
  • cnet_stack (optional) - an existing stack to layer this on top of.

Output is X or Y (type XY), into the XY Plot node's X or Y input, which feeds an Efficient KSampler's script.

A note on strength range: the sweep bounds go up to 10, but ControlNet strength is realistically a 0-to-1.2ish affair - sweeping to 10 just gives you a row of fried images. Keep the range sane.

Installing it

ComfyUI Manager → search Efficiency Nodes for ComfyUI, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/jags111/efficiency-nodes-comfyui

Restart ComfyUI. You'll want ControlNet models in models/controlnet and, if you're making the control maps in Comfy, a preprocessor pack like comfyui_controlnet_aux.

Common issues

The XY Input rule holds: this produces nothing on its own. The output only matters through the XY Plot node into one of the pack's Efficient KSamplers - a stock KSampler won't run it. No grid means a broken chain, nine times out of ten.

Sweeping start_percent versus end_percent confuses people: start_percent is when the ControlNet begins acting and end_percent when it stops, both as a fraction of the denoising process. Letting go earlier (lower end_percent) hands the model more creative freedom; a plot of end_percent is the clean way to find how much structure you can afford to drop.

Model-dependent reality check: on newer base models you only get canny, depth, pose and an edge model - the SD-era exotics were never rebuilt - so what's available to plot depends on your base.

Pack-wide: IMPORT FAILED at startup (recurring pip freeze non-zero exit) drops the whole pack. Update ComfyUI, update the node, check the environment.

CategoryEfficiency Nodes/XY Inputs

Inputs (14)

NameTypeDefaultDescription
control_netCONTROL_NET
imageIMAGE
target_parameterCOMBO3 options: strength, start_percent, end_percent
batch_countINT30–50
first_strengthFLOAT0.000–10
last_strengthFLOAT1.000–10
first_start_percentFLOAT0.000–1
last_start_percentFLOAT1.000–1
first_end_percentFLOAT0.000–1
last_end_percentFLOAT1.000–1
strengthFLOAT1.000–10
start_percentFLOAT0.000–1
end_percentFLOAT1.000–1
cnet_stackoptCONTROL_NET_STACK

Outputs (1)

NameTypeDescription
X or YXY