Comfy-Org / Comfy-Org/ComfyUI

KSampler uses wrong number of steps.

Open
#12,485 0 comments 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Custom Node Testing

- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Expected Behavior

KSampler generates images exactly according to the settings in nodes.

### Actual Behavior

KSampler sometimes generates for less or more steps than defined: for example, it can generate an image for 39 steps instead of 38 (as set in the node), or vice versa - 40 steps when 39 is in the node.

### Steps to Reproduce

I use Anima model, no custom nodes in the workflow.

### Debug Logs

```powershell
Here's a series of images from 36 steps to 40 steps (no other parameters change):

100%|███████████████████████████████████████████████████████████████████████████████| 37/37 [01:06<00:00, 1.80s/it]
Prompt executed in 67.36 seconds
100%|███████████████████████████████████████████████████████████████████████████████| 37/37 [01:06<00:00, 1.80s/it]
Prompt executed in 67.39 seconds
100%|███████████████████████████████████████████████████████████████████████████████| 39/39 [01:10<00:00, 1.80s/it]
Prompt executed in 71.06 seconds
100%|███████████████████████████████████████████████████████████████████████████████| 40/40 [01:12<00:00, 1.80s/it]
Prompt executed in 72.85 seconds
100%|███████████████████████████████████████████████████████████████████████████████| 40/40 [01:12<00:00, 1.80s/it]
Prompt executed in 72.88 seconds
```

### Other

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.