Inconsistency between KSampler and SamplerCustom from discarding penultimate sigma
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 153
Description
### Expected Behavior
With same setting, the result of KSampler and SamplerCustom should be the same. If not, it would need to show a hint to explain the difference at somewhere.
### Actual Behavior
Currently, KSampler implements discarding penultimate sigma for specific samplers (dpm2, unipc) to try to make their result better. ([code here](https://github.com/comfyanonymous/ComfyUI/blob/ab4dd19b913be95dc7f1a8080cd49aa940345c96/comfy/samplers.py#L768))
However, sigmas and sampler for SamplerCustom are created individually, which cannot handle penultimate sigma now.
It leads to different result when using those sampler even with same setting.
### Steps to Reproduce
Make a workflow including KSampler and SamplerCustom with same setting. Use dpm_2, dpm_2_ancestral, uni_pc or uni_pc_bh2 would find result different. Other samplers would be same.
The first image uses UniPC, and second one uses DPM++ 2M to show the difference.


Workflow above: [unipc_workflow.json](https://github.com/user-attachments/files/16620705/unipc_workflow.json)
### Debug Logs
```powershell
No relevant log
```
### Other
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.