Black images in XL and Nunchuka(Kontext Dev) caused by Ksampler outputting NaNs. Nothing works.
- 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
ComfyUI makes an image.
### Actual Behavior
That's all I've tried with this install. It seems pointless to try anything else.
Error: ComfyUI\nodes.py:1585: RuntimeWarning: invalid value encountered in cast
img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8))
I have tried everything I could find about this and nothing works.
This is a new install(because it was doing it on the old one) on a fresh install of Windows 11.
It is not a custom nodes fault, I don't have any installed. The XL model is the same one that I have been using for almost a year with no problems until recently. It does it with all XL models.
Comfy and the front end are up to date(installed and updated today). It is the stand-alone, not portable version. It will sometimes make 3 or 4 images just fine, then it puts some artifacts that look like icons in an image or huge spots of just noise, and then it starts with the black images.
Please tell me how to fix this. It is making ComfyUI completely unusable.
My computer is an Alienware X17 r2 with 32gb system ram, rtx 3080ti(16 gb vram). 2 NVME drives(512gb os, 2tb secondary-where Comfy is).
### Steps to Reproduce
Open a basic workflow and run it.
### Debug Logs
```powershell
Error: ComfyUI\nodes.py:1585: RuntimeWarning: invalid value encountered in cast
img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8))
```
### Other
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.