I'm having an issue in SwarmUI where using aDetailer with YOLO models leads to subsequent image generation attempts producing only black images, even before the YOLO model is called, and even if the YOLO model is removed from the prompt. This problem seems to stem from a corrupted state in the ComfyUI backend that persists until the main model is reloaded or SwarmUI is restarted.
It just happened a moment ago. I did two prompts. In the first, everything worked. Image generated, hires fix, and then the YOLO model worked and cleaned up the segment of the image. Then I removed a couple of the tags I was using and ran the prompt again, and the preview image for the base model was black. I removed the YOLO model from the prompt and tried it again, but it was still black.
Here are the logs from that event.
**1st Pass: **
100%|██████████| 30/30 [00:02<00:00, 10.51it/s]
100%|██████████| 8/8 [00:03<00:00, 2.28it/s]
matplotlib data path: C:\Users\royha\Documents\AI_Studio\SwarmUI\dlbackend\comfy\python_embeded\Lib\site-packages\matplotlib\mpl-data
CONFIGDIR=C:\Users\royha\.matplotlib
interactive is False
platform is win32
CACHEDIR=C:\Users\royha\.matplotlib
Using fontManager instance from C:\Users\royha\.matplotlib\fontlist-v390.json
0: 640x416 1 Face, 26.0ms
Speed: 1.7ms preprocess, 26.0ms inference, 22.7ms postprocess per image at shape (1, 3, 640, 416)
Requested to load SDXL
100%|██████████| 18/18 [00:01<00:00, 9.83it/s]
Prompt executed in 12.49 seconds ```
**2nd Pass:**
``````got prompt
Requested to load SDXL
100%|██████████| 30/30 [00:02<00:00, 12.14it/s]
C:\Users\royha\Documents\AI_Studio\SwarmUI\dlbackend\comfy\ComfyUI\comfy\utils.py:830: RuntimeWarning: invalid value encountered in cast
images = [Image.fromarray(np.clip(255. * image.movedim(0, -1).cpu().numpy(), 0, 255).astype(np.uint8)) for image in samples]
100%|██████████| 8/8 [00:03<00:00, 2.50it/s]
C:\Users\royha\Documents\AI_Studio\SwarmUI\src\BuiltinExtensions\ComfyUIBackend\ExtraNodes\SwarmComfyExtra\SwarmYolo.py:28: RuntimeWarning: invalid value encountered in cast
img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8))
0: 640x416 (no detections), 9.4ms
Speed: 1.5ms preprocess, 9.4ms inference, 0.6ms postprocess per image at shape (1, 3, 640, 416)
Requested to load SDXL
100%|██████████| 18/18 [00:01<00:00, 11.00it/s]
C:\Users\royha\Documents\AI_Studio\SwarmUI\src\BuiltinExtensions\ComfyUIBackend\ExtraNodes\SwarmComfyCommon\SwarmSaveImageWS.py:56: RuntimeWarning: invalid value encountered in cast
img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8))
Prompt executed in 11.49 seconds```