StepCfgIncrementNode
Step your CFG and steps as your batch runs
- INT
- INT
StepCfgIncrementNode is a sweep tool in a box: each time the workflow runs, it nudges both the CFG and the step count forward by a fixed amount, starting from values you set. Two INT outputs - the current CFG and the current steps - plug straight into your KSampler. It's for the methodical part of prompt exploration where you want to see how an image changes as you push CFG from 7 to 9, while steps climb from 10 to 12, without touching the nodes by hand between runs.
This is the "find my settings sweet spot" workflow. Most people tune CFG and steps by generating, changing a number, generating again - and losing track of which combination made the good one. This node turns that into a repeatable sweep: run once, both values step, the seed can step too, and every output is traceable to a specific (cfg, steps, seed) triple. It's the same spirit as the pack's SeedIncrementerNode, but for sampling parameters instead of seeds.
How it works
Stateful arithmetic across runs:
- seed (INT) - the starting seed, which also steps as the sweep progresses.
- cfg_start (INT, default 7) - where CFG begins.
- steps_start (INT, default 10) - where steps begin.
- image_steps (INT, default 100) - this is the pacing dial: the number of images/steps after which the increment triggers. Think of it as "how long to hold each setting before moving on".
- max_steps (INT, default 12) - the ceiling: when steps hits this value, the node stops advancing. It's the sweep's end condition.
Outputs (both INT):
- The current CFG value for this run.
- The current steps value for this run.
Wire CFG into the KSampler's cfg and steps into its steps. Because the node is stateful - it advances each execution - re-running the graph moves you through the sweep automatically. If you want to restart the sweep, reset the node (or feed it a fresh starting seed).
The honest take
This is a niche utility, and its value depends entirely on whether you actually run sweeps. If you tune by hand or use a full sweep/queue framework, it's redundant - the likes of Efficiency Nodes or any workflow that batches prompts will already step parameters for you. If you're on vanilla ComfyUI and want a dead-simple CFG/steps sweep without installing a big automation pack, this is a tidy, self-contained answer. The naming of image_steps is the thing to learn once: it's not "how many total steps to run", it's the interval that controls when the increment fires.
Install
Pack install, one time: ComfyUI Manager → search "ComfyUI-LexTools", or git clone https://github.com/SOELexicon/ComfyUI-LexTools into custom_nodes, then restart. No models, no heavy dependencies. Test it with a 2-run sweep before committing to a long batch - the statefulness means a mistaken max_steps can carry your settings past where you meant to stop, and the outputs are just numbers on the node, not something the node announces loudly.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 0 | — |
| cfg_start | INT | 7 | — |
| steps_start | INT | 10 | — |
| image_steps | INT | 100 | — |
| max_steps | INT | 12 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |
| INT | INT | — |