Steps Selector
Stop typing 20 into four different nodes
- steps
Step count is the setting you think you've already decided. Then you build a graph with a base pass and a refinement pass, and suddenly there are two steps boxes, they're both set to 25, one of them should probably be 15, and the next time you change your mind you'll change one of them and forget the other. That half-fixed mismatch is the sort of thing that makes you distrust your own comparison tests.
Steps Selector is an integer on a wire. One source, however many consumers.
What's inside
def run(self, steps):
return (steps,)
An INT in, the same INT out. That's the entire node. No timer, no clamping beyond the widget, no interaction with the sampler other than handing it a number. If you've used core PrimitiveInt, you've used this - the differences are cosmetic: a bounded range, an output socket named steps, and consistency with the pack's CFG, denoise, sampler and scheduler selectors.
Input steps: INT, default 20, range 1 to 10000, step 1. Output steps: INT.
To use it, right-click the steps field on your KSampler and choose Convert widget to input, then wire this in. Do it on every sampler in the graph and the number becomes definitive: change it once, everything follows, and no node quietly disagrees.
What number to put there
The honest answer changed a lot in the last two years, and getting it wrong is where most "this model is broken" posts come from.
- SD 1.5 / SDXL and their finetunes: 20-30. Below about 15 a converging sampler stops having enough room; above about 35 you're mostly paying for nothing.
- Seed farming and prompt evaluation: 10-15 with a converging sampler. Cheap, good enough to rank prompts, and the highest-leverage habit in the whole craft - find the seed and the wording cheaply, then commit at full settings.
- Step-distilled models: whatever the variant says, and not one step more. Klein distilled wants 4, Z-Image Turbo wants 8. Twenty steps on a distilled checkpoint doesn't refine it, it overcooks it.
- Base (non-distilled) flow-matching models: 25-50 is normal again. Z-Image Base sits at 25-50; the distilled guidance setting doesn't automatically come with a distilled step count.
The 1-to-10000 range is worth a raised eyebrow. Nothing in the node stops you from asking for 4000 steps; the sampler will happily accept and you'll be waiting until tomorrow. It's a validation ceiling, not a recommendation.
Sweeping steps properly
Steps is the axis everything else interacts with, which makes it both the most useful sweep and the easiest to misread. Two rules that save you a wasted afternoon:
Hold the sampler converging. With euler_ancestral or dpmpp_sde, adding steps changes the image rather than refining it - those samplers inject fresh noise each step and never settle, so a steps ladder on them doesn't tell you where quality plateaus, it tells you where the dice landed. Euler, DPM++ 2M, DDIM, UniPC: those are the ones where a ladder has a shape.
Don't read one axis in isolation. Every published sweep in this ecosystem carries the same caveat - the ideal step count moves per combination and per subject matter. A step ladder run at one fixed CFG tells you about steps at that CFG. If a cell looks great, re-run it with its neighbour settings before you believe it.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/DemonAlone/DemonAlone-nodes-ComfyUI
cd DemonAlone-nodes-ComfyUI
pip install -r requirements.txt
Or install DemonAlone-nodes-ComfyUI from ComfyUI Manager and restart the server. No models, no JS extension; piexif is the pack's only pip requirement and this node doesn't touch it. You'll find Steps Selector under utils.
Things that go wrong
None of the pack's nodes appear after a manual clone. The piexif import at the top of image_utilites.py takes the whole package down if the requirement isn't installed - the traceback names a library that has nothing to do with steps, which is why this trips people up. pip install -r requirements.txt, restart.
One sampler in the graph ignored your new step count. You converted one widget and not the other. In a base-plus-refiner graph this produces images that look subtly off rather than obviously broken, because the second pass is running at a step count from three sessions ago. Wire every sampler, including the ones inside groups you've muted.
Your step ladder plateaued suspiciously early. Check the scheduler before you conclude anything. A reshaped schedule front-loads the denoising work, so the plateau arrives at a lower step count - that's the point of it. On a scheduler the model doesn't like, the plateau never arrives at all and the images just get uglier.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| steps | INT | 201–10000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| steps | INT | — |