comfyanonymous / ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
56.02k stars 5.92k forks source link

Crash with image previews in KSampler nodes #3523

Open fmatray opened 5 months ago

fmatray commented 5 months ago

I have a crash since today when I use the latent preview Latent2RGB. It works with TAESD. After 2 steps, the preview turns into black with some dots like a random corrupted image. Then the server crashs with the error below :

python(1961,0x1feed3ac0) malloc: Incorrect checksum for freed object 0x35d154600: probably modified after being freed.
Corrupt value: 0x0
python(1961,0x1feed3ac0) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort      python -d main.py

I have this version of comfyUI running on an Apple M1.

ComfyUI Revision: 2194 [11a2ad51] | Released on '2024-05-19'

Thanks for your help.

lquesada commented 5 months ago

this also happens to me

lquesada commented 5 months ago

Also, using "normal" scheduler (e.g. instead of "karras") doesn't crash but always yields noise or a black image.

lquesada commented 5 months ago

well, whatever I use, even with preview disabled, after a certain number of steps (20-30) the result is a black image.

Also tried reverting to ComfyUI from 10 days ago and it still happens. Also tried with no custom nodes loaded and this still happens. Not sure what triggered this.

lquesada commented 5 months ago

Also getting this which may be related:

0%| | 0/30 [00:00<?, ?it/s] /.../python3.10/site-packages/torchsde/_brownian/brownian_interval.py:608: UserWarning: Should have tb<=t1 but got tb=14.614643096923828 and t1=14.614643. warnings.warn(f"Should have {tb_name}<=t1 but got {tb_name}={tb} and t1={self._end}.")

lquesada commented 5 months ago

Ok an extra data point: when showing the previews, sometimes it shows all noise and sometimes it shows the actual preview. I think this may be some sort of race condition when showing previews, but again, not sure what triggered this.

I pulled the version 10 days ago, still the error, I recreated venv from scratch, still the error, I removed all custom nodes, still the error...

lquesada commented 5 months ago

more details: this is when showing pictures in the UI: when comfyui doesn't crash, the pictures sometimes show blank in the previews or even in the save image node, but the actual image is exported properly.

lquesada commented 5 months ago

Possibly related: https://github.com/comfyanonymous/ComfyUI/issues/3521