Black squares on faces when Detailer node enabled
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
### Custom Node Testing
- [ ] 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
Faces should generate and be detailed/inpainted normally with no visual artifacts.
### Actual Behavior
When Detailer is enabled, black square artifacts appear on faces.
The rest of the image renders normally.
Disabling Detailer removes the issue.
Description
When using ComfyUI on Windows with an RTX 5090, enabling the Detailer node causes black square artifacts to appear on faces during the segment upscale process.
A runtime warning appears related to invalid values being cast to uint8.
This happens consistently and appears related to precision or image tensor conversion.
### Steps to Reproduce
Launch ComfyUI
Load workflow with face detection and Detailer enabled
Generate image
Observe black square artifacts on faces during/after Detailer pass
### Debug Logs
```powershell
Error / Warning
C:\Users\admin\ComfyUI_windows_portable_nvidia (1)\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\utils.py:155: RuntimeWarning: invalid value encountered in cast
return Image.fromarray(np.clip(255. * image.cpu().numpy().squeeze(0), 0, 255).astype(np.uint8))
Additional log:
Detailer: segment upscale for ((np.float32(144.66943), np.float32(99.30534)))
| crop region (434, 297) x 2.36010479927063 -> (1024, 700)
```
### Other
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.