ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

After the last update black images after few steps on Mac mini M2 pro with Sonoma 14.5

Open Superacf opened this issue 1 year ago • 76 comments

How wrote in the subject, almost every workflows not working, I see the preview, but after few steps the image goes black. After many test I've discovered that "Karras" scheduler was causing this problem.

Superacf avatar May 19 '24 15:05 Superacf

I have the exact same issue here. Small number of steps is ok but anything above 10 steps isn't working. Started since Friday night. Any help is very appreciated.

tsevis avatar May 19 '24 18:05 tsevis

Can you tell me which checkpoint and workflow you are using?

comfyanonymous avatar May 19 '24 21:05 comfyanonymous

Happen with all checkpoint

Superacf avatar May 19 '24 22:05 Superacf

If you run it with --force-upcast-attention does that fix the issue?

comfyanonymous avatar May 19 '24 22:05 comfyanonymous

Here in Italy is 01:00 night, so I've made only one test and it works with that fix, but Comfyui was very very slow to start, but it is a begin to discover a better solution.

Superacf avatar May 19 '24 23:05 Superacf

I have same issue on mac m3 pro sonoma. but use --force-upcast-attention can fix the issue

lovelyesz avatar May 20 '24 04:05 lovelyesz

Hi everyone, Using --force-upcast-attention resolved the problem for me. I hope it won't change. :-) Thank you!

tsevis avatar May 20 '24 09:05 tsevis

If you have the issue can you post your pytorch version here, you can print it with: python -c 'import torch;print(torch.version.__version__)'

comfyanonymous avatar May 20 '24 10:05 comfyanonymous

2.4.0.dev20240518

tsevis avatar May 20 '24 10:05 tsevis

If you install stable 2.3 is the issue present?

comfyanonymous avatar May 20 '24 10:05 comfyanonymous

I am not sure it's appropriate to do that, as Apple recommends the nightly version. I will probably try but so far, using --force-upcast-attention has resolved the issue. I will follow your advise if I will face the problem again. Thanks for your support.

tsevis avatar May 20 '24 11:05 tsevis

If you have the issue can you post your pytorch version here, you can print it with: python -c 'import torch;print(torch.version.__version__)'

Mine is :2.4.0.dev20240413 The nightly version when I installed ComfyUI

Superacf avatar May 21 '24 04:05 Superacf

Noob here. Where do I enter --force-upcast-attention ? I'm on a Macbook. Do I enter it in terminal by itself or in addition to python3 main.py ?

MattaTatTat76 avatar May 21 '24 17:05 MattaTatTat76

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

Will try the suggested fix tomorrow

lquesada avatar May 21 '24 20:05 lquesada

Noob here. Where do I enter --force-upcast-attention ? I'm on a Macbook. Do I enter it in terminal by itself or in addition to python3 main.py ?

you are adding --force-upcast-attention after python3 main.py

tsevis avatar May 21 '24 20:05 tsevis

为什么我的是:main.py: error: unrecognized arguments: --force-upcast-attention

BannyLon avatar May 22 '24 05:05 BannyLon

2.4.0.dev20240521 on M3

dpmpp samplers (with and without karras) caused a black image. The --force-upcast-attention option solved it

nataliyakarat avatar May 22 '24 09:05 nataliyakarat

为什么我的是:main.py: error: unrecognized arguments: --force-upcast-attention

update comfyui?

nataliyakarat avatar May 22 '24 09:05 nataliyakarat

为什么我的是:main.py: error: unrecognized arguments: --force-upcast-attention

update comfyui?

没有update comfyui,因为更新到最新版后采样器几乎全部失效,而且用ComfyUI Manager 这个插件,只要选择将Preview method:更改为Auto,结果运行生图就会出现以下错误,python意外退出。Python(5424,0x16b8ef000) malloc: Incorrect checksum for freed object 0x33c1a4c00: probably modified after being freed. Corrupt value: 0x385229353f2d3444 Python(5424,0x16b8ef000) malloc: *** set a breakpoint in malloc_error_break to debug zsh: abort python3 main.py habhy@192 ComfyUI % /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d '

BannyLon avatar May 23 '24 14:05 BannyLon

Same issue, almost all workflows produce black frames. (OS 14.5 on M3 Max) Starting comfyUI with python3 main.py --cpu seems to solve it, but it's very very slow

udiai avatar May 23 '24 22:05 udiai

The problem is not only on Sonoma, it is also on Ventura. It starts in May with some ksampler before being extended to all.

Same issue, almost all workflows produce black frames. (OS 14.5 on M3 Max) Starting comfyUI with python3 main.py --cpu seems to solve it, but it's very very slow

Exactly Karras now seems to be very slow now

If you run it with --force-upcast-attention does that fix the issue?

Read what I wrote in the issue https://github.com/comfyanonymous/ComfyUI/issues/3567 I explain the bug in detail, it will help you to understand what is happening. It seems that the origin of the problem is not the sampler.

Creative-comfyUI avatar May 25 '24 15:05 Creative-comfyUI

If you update ComfyUI the issue should be solved.

comfyanonymous avatar May 25 '24 15:05 comfyanonymous

If you update ComfyUI the issue should be solved.

Black Image again. --force-upcast-attention solve the problem yesterday but now the problem is here again after the update

Creative-comfyUI avatar May 25 '24 15:05 Creative-comfyUI

If you update ComfyUI the issue should be solved.

The problem arrive if the batch size is > 1

with --force-upcast-attention everything is ok

Creative-comfyUI avatar May 25 '24 15:05 Creative-comfyUI

I am on a Mac M2 Max with 64 gig ram. Same issue.

--force-upcast-attention doesn't do anything to help.

Comfy has always been very reliable and stable on my machine, now I can't even generate using SD1.5 models. It's either black or gobbledegook depending on the sampler I choose.

firestar222 avatar May 25 '24 16:05 firestar222

Thank you [comfyanonymous], I'm on MacOS 14.5 with M3Max. --cpu did not generate black frames but was painfully slow. Non workable. I tried to load an archived folder of ComfyUI, before my IPAdapter update, but it didn't work. I tried removing the entire ComfyUI directory and reinstalling fresh ComfyUI, also didn't work. With the help of ChatGPT4o, I uninstalled home-brew and removed all versions of python I could find. Re-installed Home-brew, Python 3.11.9 (also verifying that this is what's active and it's not calling an earlier version when I start Comfy) and latest Pytorch Nighly. Took me 3 days to troubleshoot, but now everything is working as it did before with my full ComfyUI directory.

udiai avatar May 25 '24 16:05 udiai

Update- I had luck by updating torch to 2.3, now everything seems to be working again?

firestar222 avatar May 25 '24 16:05 firestar222

If you update ComfyUI the issue should be solved.

Everything seems to work smoothly again. A bit slower though... Thank you!

tsevis avatar May 27 '24 12:05 tsevis

If you update ComfyUI the issue should be solved.

It is repair thanks. No need --force-upcast-attention

Creative-comfyUI avatar May 28 '24 03:05 Creative-comfyUI

If you update ComfyUI the issue should be solved.

It is repair thanks. No need --force-upcast-attention

The problem starts again. I don't explain why.

Creative-comfyUI avatar May 29 '24 01:05 Creative-comfyUI