Giter Club home page Giter Club logo

Comments (77)

tsevis avatar tsevis commented on September 23, 2024 5

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

from comfyui.

tsevis avatar tsevis commented on September 23, 2024 2

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.

from comfyui.

Superacf avatar Superacf commented on September 23, 2024 1

Happen with all checkpoint

from comfyui.

comfyanonymous avatar comfyanonymous commented on September 23, 2024 1

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

from comfyui.

comfyanonymous avatar comfyanonymous commented on September 23, 2024 1

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__)'

from comfyui.

lquesada avatar lquesada commented on September 23, 2024 1

Possibly related: #3523

Will try the suggested fix tomorrow

from comfyui.

tsevis avatar tsevis commented on September 23, 2024 1

@comfyanonymous the black screen problem is caused by the transformers in miniconda on mac. It needs to be updated to version 4.38. This was not a problem until some other components were updated, making the transformers out of date.

I have updated miniconda, PyTorch and dependencies. Everything runs smoothly so far. Thank you.

Is there some command for this in Terminal? I did pip install torch torchvision torchaudio but it says command not found. Any link please how to update miniconda and dependencies? Thank you. Sorry, I'm a complete beginner at this

Hi!
Newbie here as well. What I did was updating initially the anaconda from here:
https://docs.conda.io/projects/conda/en/latest/user-guide/install/macos.html
Then I followed the instructions on ComfyUI's GitHub page:
https://github.com/comfyanonymous/ComfyUI?tab=readme-ov-file#installing
I ran all the Apple instructions from here:
https://developer.apple.com/metal/pytorch/
And at the end I ran the dependencies command:
https://github.com/comfyanonymous/ComfyUI?tab=readme-ov-file#dependencies
Everything works smoothly.
Unfortunately I don't know how to find the miniconda version. But I know that I have the latest one.
Hope some more experienced user could help you more.

from comfyui.

wperrin avatar wperrin commented on September 23, 2024 1

Mac Mini M1 8GB here: with the latest update to Sonoma 14.6.1 I started to get the black screen during previews. The error was the "invalid value encountered in cast" that comes from numpy. Everything was running great before the update to MacOS. Some notes for other Mac folks like me: (running my very minimal setup lol)

  • adding --force-upcast-attention" solved this latest issue. Have not noticed any increase in generation time.
  • I almost exclusively run Karras as my scheduler and never had any issues.
  • it was the Sampler selection that was causing my issue, only Euler, Euler A and other non-DPM samplers worked, but they worked fine.
  • I'm fine with SD 1.5 (oh I know, the horror!!) but it is fast enough for me and is extremely usable on my minimal setup.
  • the latent size makes the most difference in generation time as you might expect. I can run SDXL but in large generations if I'm adding any other model I get out of RAM issues.
  • with upscalers and other bells and whistles, inpainting models I still get very nice images for my purposes.
  • one early major issue I had was I initially ended installing the incorrect version of Anaconda (because I like its solution for venvs)
  • so for M silicon make sure: virtual packages : __archspec=1=m1 when running conda info.
  • running Torch 2.1.2 fyi. No issues.

Don't know if this will be useful to anyone but just thought I'd share some experience over the last six months.

from comfyui.

QueryType avatar QueryType commented on September 23, 2024 1

Mac Mini M1 8GB here: with the latest update to Sonoma 14.6.1 I started to get the black screen during previews. The error was the "invalid value encountered in cast" that comes from numpy. Everything was running great before the update to MacOS. Some notes for other Mac folks like me: (running my very minimal setup lol)

  • adding --force-upcast-attention" solved this latest issue. Have not noticed any increase in generation time.
  • I almost exclusively run Karras as my scheduler and never had any issues.
  • it was the Sampler selection that was causing my issue, only Euler, Euler A and other non-DPM samplers worked, but they worked fine.
  • I'm fine with SD 1.5 (oh I know, the horror!!) but it is fast enough for me and is extremely usable on my minimal setup.
  • the latent size makes the most difference in generation time as you might expect. I can run SDXL but in large generations if I'm adding any other model I get out of RAM issues.
  • with upscalers and other bells and whistles, inpainting models I still get very nice images for my purposes.
  • one early major issue I had was I initially ended installing the incorrect version of Anaconda (because I like its solution for venvs)
  • so for M silicon make sure: virtual packages : __archspec=1=m1 when running conda info.
  • running Torch 2.1.2 fyi. No issues.

Don't know if this will be useful to anyone but just thought I'd share some experience over the last six months.

There is definitely a regression after this upgrade. I faced similar issue. I can get away with --force-upcast-attention for now. Thanks for the post.

from comfyui.

w0anerges avatar w0anerges commented on September 23, 2024 1

For those who use Pinokio on Mac to launch, in the update 2.0 of ComfyUI in the "Start" file you need to add one parameter in one line:

"{{platform === 'win32' && gpu === 'amd' ? 'python main.py --directml' : 'python main.py--force-fp32'}}"

or u can just replace your file with my one

start.js.zip

from comfyui.

joneavila avatar joneavila commented on September 23, 2024 1

No, you must do this in the terminal app from the command line. Make sure your python comfyui environment is set.

remind me, what does this command do. i mean this command wasnt originally written to not produce black frames, like what was the command made to do

Adding --force-upcast-attention modifies ComfyUI's behavior. What exactly it does I'm not sure (I'm not well-versed in stable diffusion), but upcasting generally means increasing the precision of computations. You can list all optional flags with python main.py --help, which notes the --force-upcast-attention flag can fix black images.

from comfyui.

comfyanonymous avatar comfyanonymous commented on September 23, 2024

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

from comfyui.

Superacf avatar Superacf commented on September 23, 2024

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.

from comfyui.

lovelyesz avatar lovelyesz commented on September 23, 2024

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

from comfyui.

tsevis avatar tsevis commented on September 23, 2024

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

from comfyui.

tsevis avatar tsevis commented on September 23, 2024

2.4.0.dev20240518

from comfyui.

comfyanonymous avatar comfyanonymous commented on September 23, 2024

If you install stable 2.3 is the issue present?

from comfyui.

tsevis avatar tsevis commented on September 23, 2024

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.

from comfyui.

Superacf avatar Superacf commented on September 23, 2024

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

from comfyui.

MattaTatTat76 avatar MattaTatTat76 commented on September 23, 2024

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 ?

from comfyui.

BannyLon avatar BannyLon commented on September 23, 2024

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

from comfyui.

nataliyakarat avatar nataliyakarat commented on September 23, 2024

2.4.0.dev20240521 on M3

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

from comfyui.

nataliyakarat avatar nataliyakarat commented on September 23, 2024

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

update comfyui?

from comfyui.

BannyLon avatar BannyLon commented on September 23, 2024

为什么我的是: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 '

from comfyui.

udiai avatar udiai commented on September 23, 2024

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

from comfyui.

Creative-comfyUI avatar Creative-comfyUI commented on September 23, 2024

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 #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.

from comfyui.

comfyanonymous avatar comfyanonymous commented on September 23, 2024

If you update ComfyUI the issue should be solved.

from comfyui.

Creative-comfyUI avatar Creative-comfyUI commented on September 23, 2024

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

from comfyui.

Creative-comfyUI avatar Creative-comfyUI commented on September 23, 2024

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

from comfyui.

firestar222 avatar firestar222 commented on September 23, 2024

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.

from comfyui.

udiai avatar udiai commented on September 23, 2024

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.

from comfyui.

firestar222 avatar firestar222 commented on September 23, 2024

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

from comfyui.

tsevis avatar tsevis commented on September 23, 2024

If you update ComfyUI the issue should be solved.

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

from comfyui.

Creative-comfyUI avatar Creative-comfyUI commented on September 23, 2024

If you update ComfyUI the issue should be solved.

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

from comfyui.

Creative-comfyUI avatar Creative-comfyUI commented on September 23, 2024

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.

from comfyui.

thanhan-a17 avatar thanhan-a17 commented on September 23, 2024

After update, any execution took almost x2 time than before. When steps >= 8, black image appear again.
--force-upcast-attention still fix the issue with the cost of speed...

Torch ver: 2.4.0.dev20240526
Comfyui ver: 221116a493
Macbook M3 pro, 18Gb

from comfyui.

wanderingstan avatar wanderingstan commented on September 23, 2024

FWIW, same issues for me.

--force-upcast-attention doesn't seem to help, but --cpu does work but at super slow speed.

Model: Macbook Pro, 14-inch, 2023
Chip: Apple M2 Pro
Memory: 32 GB
OS: macOS 14.4.1 (23E224) Sonoma
Torch: 2.3.0.dev20231215

$ python -c 'import torch;print(torch.version.__version__)'
2.3.0.dev20231215

from comfyui.

treeshark12 avatar treeshark12 commented on September 23, 2024

Unexpected value in cast, It seems to be linked to denoise and seed number. Persisted after update but deleting samplers from earlier workflows and replacing them seemed to fix it for now. No SD1.5 models have been working and very few SDXL ones. I updated everything today PyTorch etc.

from comfyui.

treeshark12 avatar treeshark12 commented on September 23, 2024

Further to my last comment for me it only happens on smallish (768 or 1024) square images, Ultimate upscale fails every time with black tiles everywhere.

from comfyui.

Creative-comfyUI avatar Creative-comfyUI commented on September 23, 2024

Unexpected value in cast, It seems to be linked to denoise and seed number. Persisted after update but deleting samplers from earlier workflows and replacing them seemed to fix it for now. No SD1.5 models have been working and very few SDXL ones. I updated everything today PyTorch etc.

The first problem you mention seems to occur before the black screen for me too. It looks like Ksampler is sometimes corrupted we have to replace it.
The black screen problem doesn't appear when the batch size is one for me. Have a look at what I wrote here: #3567
Your problem seems to confirm that there is something wrong with Ksampler. The problem is with all Ksamplers and in my opinion the problem is not really the black image but the way the information is treated by the Ksampler. If we read all the comments and I look at all the tests I have done, the black image is not always due to the same operation but always in relation to the Ksampler. @comfyanonymous

from comfyui.

treeshark12 avatar treeshark12 commented on September 23, 2024

It happens partway through the sampling, at about step 6 or whatever it goes black. It doesn't always report the cast error which is very strange. By changing denoise and steps I can get it to work again and once going it won't happen again on that seed.

from comfyui.

abumolly avatar abumolly commented on September 23, 2024

my error is ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite/videohelpersuite/nodes.py:95: RuntimeWarning: invalid value encountered in cast
return tensor_to_int(tensor, 8).astype(np.uint8)
anyone met the same situation? I used mac M3 and seem only animatediff working flow will cause the error. that's really suffer.

from comfyui.

treeshark12 avatar treeshark12 commented on September 23, 2024

It's an odd bug, a 1024 or 768 square will often fail, but I never get a black square at 1280 and above. I'm on Sonoma 14.2 so it isn't only 14.5

from comfyui.

abumolly avatar abumolly commented on September 23, 2024

but the workflow i test is the original text to video one, with model of SD1.5, so the latent should be 512*512. acturally, everything was ok before I followed chatgpt 4o and installed tensor and pytorch, reinstalled my comfyui …… sometimes, chatgpt was not creditable, all was because he told me tensor and pytorch plus mps will enhance the efficience of rendering in mac...

from comfyui.

kokotnow avatar kokotnow commented on September 23, 2024

my error is ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite/videohelpersuite/nodes.py:95: RuntimeWarning: invalid value encountered in cast
return tensor_to_int(tensor, 8).astype(np.uint8)
anyone met the same situation? I used mac M3 and seem only animatediff working flow will cause the error. that's really suffer.

Yes, Im getting the same thing, same message. Everything was working fine, but like 10 days I did update and it started output either noise or black images only. I reinstalled the whole Comfy but the problem persists.

from comfyui.

abumolly avatar abumolly commented on September 23, 2024

my error is ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite/videohelpersuite/nodes.py:95: RuntimeWarning: invalid value encountered in cast
return tensor_to_int(tensor, 8).astype(np.uint8)
anyone met the same situation? I used mac M3 and seem only animatediff working flow will cause the error. that's really suffer.

Yes, Im getting the same thing, same message. Everything was working fine, but like 10 days I did update and it started output either noise or black images only. I reinstalled the whole Comfy but the problem persists.

my working flow were fine except animatediff ones, after I updated all in comfyui manager, the error changed to the mix lab nodes...custom_nodes/comfyui-mixlab-nodes/nodes/Video.py:502: RuntimeWarning: invalid value encountered in cast
img = Image.fromarray(np.clip(img, 0, 255).astype(np.uint8))

from comfyui.

abumolly avatar abumolly commented on September 23, 2024

my error is ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite/videohelpersuite/nodes.py:95: RuntimeWarning: invalid value encountered in cast
return tensor_to_int(tensor, 8).astype(np.uint8)
anyone met the same situation? I used mac M3 and seem only animatediff working flow will cause the error. that's really suffer.

Yes, Im getting the same thing, same message. Everything was working fine, but like 10 days I did update and it started output either noise or black images only. I reinstalled the whole Comfy but the problem persists.

截屏2024-06-04 19 10 22

hi, I changed the sampler to dpmpp_2m_sde, and down the denoise value to 0.3, it can generated some images. not sure why but seem problems solved...you can have a try
btw: denoise 0.5 will be ok, but 0.8, it turns to black ...

from comfyui.

kokotnow avatar kokotnow commented on September 23, 2024

Hi, yes, same here, all workflows are fine but the AnimateDiff ones. I tried to lower the denoise value as you suggested but not working, still getting the black images.

from comfyui.

Creative-comfyUI avatar Creative-comfyUI commented on September 23, 2024

@comfyanonymous the black screen problem is caused by the transformers in miniconda on mac. It needs to be updated to version 4.38. This was not a problem until some other components were updated, making the transformers out of date.

from comfyui.

tsevis avatar tsevis commented on September 23, 2024

@comfyanonymous the black screen problem is caused by the transformers in miniconda on mac. It needs to be updated to version 4.38. This was not a problem until some other components were updated, making the transformers out of date.

I have updated miniconda, PyTorch and dependencies. Everything runs smoothly so far.
Thank you.

from comfyui.

kokotnow avatar kokotnow commented on September 23, 2024

Hi, thanks for the instructions! I dont know hot find out on which version I am. Does it say somewhere? Anyway, I have updated everything from the Manager but still get black images.

from comfyui.

kokotnow avatar kokotnow commented on September 23, 2024

@comfyanonymous the black screen problem is caused by the transformers in miniconda on mac. It needs to be updated to version 4.38. This was not a problem until some other components were updated, making the transformers out of date.

I have updated miniconda, PyTorch and dependencies. Everything runs smoothly so far. Thank you.

Is there some command for this in Terminal? I did pip install torch torchvision torchaudio but it says command not found.
Any link please how to update miniconda and dependencies? Thank you. Sorry, I'm a complete beginner at this

from comfyui.

kokotnow avatar kokotnow commented on September 23, 2024

Ok, thank you for your help, I will try to do all these

from comfyui.

takacsmark avatar takacsmark commented on September 23, 2024

I can confirm that reinstalling ComfyUI solved the issue (M1 Max, Sonoma 14.5)

The root cause in my case was misalignment of package versions in the venv, I did some manual bug fixing and created a mess. I experienced the black images appear during sampling after a couple of steps.

I reinstalled ComfyUI into a new directory, created a new venv, installed the dependencies and re-installed the custom nodes one by one manually. I used the exact installation steps from github and used pytorch nightly. The clean install works perfectly.

from comfyui.

kokotnow avatar kokotnow commented on September 23, 2024

So I uninstalled the whole Comfyui again but now for some reason it doesnt install the VideoHelperSuite when installing the nodes. It says IMPORT FAILED. Try FIX doesnt work, Uninstalling and installing again neither. I checked and the VideoHelperSuite is correctly placed in the custom_nodes folder.I have no ide what I'm doing wrong.
helper
helper

from comfyui.

ltdrdata avatar ltdrdata commented on September 23, 2024

So I uninstalled the whole Comfyui again but now for some reason it doesnt install the VideoHelperSuite when installing the nodes. It says IMPORT FAILED. Try FIX doesnt work, Uninstalling and installing again neither. I checked and the VideoHelperSuite is correctly placed in the custom_nodes folder.I have no ide what I'm doing wrong. helper helper

You need to see the startup log.

from comfyui.

kokotnow avatar kokotnow commented on September 23, 2024

So I uninstalled the whole Comfyui again but now for some reason it doesnt install the VideoHelperSuite when installing the nodes. It says IMPORT FAILED. Try FIX doesnt work, Uninstalling and installing again neither. I checked and the VideoHelperSuite is correctly placed in the custom_nodes folder.I have no ide what I'm doing wrong. helper helper

You need to see the startup log.

Hi,
thank you!
It doesnt really say much.

Just: (IMPORT FAILED): /Users/x/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite

and then:
ImportError: numpy.core.multiarray failed to import

Cannot import /Users/x/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite module for custom nodes: numpy.core.multiarray failed to import

from comfyui.

L0CKZ0R avatar L0CKZ0R commented on September 23, 2024

Just wanted to add I just installed ComfyUI on a Mac M1 Studio max and have this same issue when doing anything on 30 steps or more.
29 steps generates, 30 is a black output.

The error on 30 steps is:


Loading 1 new model
100%|███████████████████████████████████████████| 30/30 [00:20<00:00,  1.47it/s]
Requested to load AutoencoderKL
Loading 1 new model
/Volumes/Mac Drive/Stable Diffusion/ComfyUI/nodes.py:1435: RuntimeWarning: invalid value encountered in cast
  img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8))
Prompt executed in 57.03 seconds

have tested on 512 and 1000 resolution.

from comfyui.

kokotnow avatar kokotnow commented on September 23, 2024

So I have been able to install the VideoHelperSuite again and still getting black images as output on Mac Studio M2 with this log:
/Users/x/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite/videohelpersuite/nodes.py:100: RuntimeWarning: invalid value encountered in cast
return tensor_to_int(tensor, 8).astype(np.uint8)
/Users/x/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite/videohelpersuite/nodes.py:98: RuntimeWarning: invalid value encountered in cast
return tensor_to_int(tensor, 16).astype(np.uint16)

from comfyui.

SakuraToErii avatar SakuraToErii commented on September 23, 2024

M1 max 64G ventura 13.6
black images if cfg > 1, but the number of steps does not matter
torch 2.5.0.dev20240624
It works well by adding "--force-upcast-attention"(It means forcing up the computational precision of the attention mechanism) after the "python main.py".

from comfyui.

robinjhuang avatar robinjhuang commented on September 23, 2024

@Superacf Is this still happening with the latest version?

from comfyui.

bobgao-ui avatar bobgao-ui commented on September 23, 2024

@comfyanonymous the black screen problem is caused by the transformers in miniconda on mac. It needs to be updated to version 4.38. This was not a problem until some other components were updated, making the transformers out of date.

I have updated transformers 4.4.1, but the problem still exists.

When step is greater than 16, and using the "Karras" scheduler was causing this problem.I do not know how to solve this
It works well by adding "--force-upcast-attention”, But the speed of drawing is very slow.

M1 Pro;
OS Ventura;
Pytorch:2.3.1;

from comfyui.

KirbyStar47 avatar KirbyStar47 commented on September 23, 2024

The "Karras" scheduler issue still exists.

Completely clean and reinstall ComfyUI
Using Torch 2.4 and the latest 2.5
Reinstall transformers

The problem still exists.

The solution was obtained using "--force-upcast-attention”, but it was so slow.

M2 Max Sonoma 14.0 64GB

from comfyui.

rachelcenter avatar rachelcenter commented on September 23, 2024

Mac Mini M1 8GB here: with the latest update to Sonoma 14.6.1 I started to get the black screen during previews. The error was the "invalid value encountered in cast" that comes from numpy. Everything was running great before the update to MacOS. Some notes for other Mac folks like me: (running my very minimal setup lol)

* adding --force-upcast-attention" solved this latest issue. Have not noticed any increase in generation time.

* I almost exclusively run Karras as my scheduler and never had any issues.

* it was **the Sampler selection** that was causing my issue, only Euler, Euler A and other non-DPM samplers worked, but they worked fine.

* I'm fine with SD 1.5 (oh I know, the horror!!) but it is fast enough for me and is extremely usable on my minimal setup.

* the latent size makes the most difference in generation time as you might expect. I can run SDXL but in large generations if I'm adding any other model I get out of RAM issues.

* with upscalers and other bells and whistles, inpainting models I still get very nice images for my purposes.

* one early major issue I had was I initially ended installing the incorrect version of Anaconda (because I like its solution for venvs)

* so for M silicon make sure: virtual packages : **__archspec=1=m1** when running conda info.

* running Torch 2.1.2 fyi. No issues.

Don't know if this will be useful to anyone but just thought I'd share some experience over the last six months.

"adding --force-upcast-attention" <- can you break this down for me in lamens terms and tell me exactly where to type this? I recently updated sonoma and that must be whats causing this all black issue. https://www.reddit.com/r/comfyui/comments/1ewd3k1/to_all_the_applemac_comfyui_users_have_your/

from comfyui.

rachelcenter avatar rachelcenter commented on September 23, 2024

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

can you teach me where to type this text to fix it?

from comfyui.

rachelcenter avatar rachelcenter commented on September 23, 2024

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

i tried that and it told me: python3 main.py
usage: main.py [-h] [--listen [IP]] [--port PORT] [--tls-keyfile TLS_KEYFILE]
[--tls-certfile TLS_CERTFILE] [--enable-cors-header [ORIGIN]]
[--max-upload-size MAX_UPLOAD_SIZE]
[--extra-model-paths-config PATH [PATH ...]]
[--output-directory OUTPUT_DIRECTORY]
[--temp-directory TEMP_DIRECTORY]
[--input-directory INPUT_DIRECTORY] [--auto-launch]
[--disable-auto-launch] [--cuda-device DEVICE_ID]
[--cuda-malloc | --disable-cuda-malloc]
[--force-fp32 | --force-fp16]
[--bf16-unet | --fp16-unet | --fp8_e4m3fn-unet | --fp8_e5m2-unet]
[--fp16-vae | --fp32-vae | --bf16-vae] [--cpu-vae]
[--fp8_e4m3fn-text-enc | --fp8_e5m2-text-enc | --fp16-text-enc | --fp32-text-enc]
[--force-channels-last] [--directml [DIRECTML_DEVICE]]
[--disable-ipex-optimize]
[--preview-method [none,auto,latent2rgb,taesd]]
[--cache-classic | --cache-lru CACHE_LRU]
[--use-split-cross-attention | --use-quad-cross-attention | --use-pytorch-cross-attention]
[--disable-xformers]
[--force-upcast-attention | --dont-upcast-attention]
[--gpu-only | --highvram | --normalvram | --lowvram | --novram | --cpu]
[--default-hashing-function {md5,sha1,sha256,sha512}]
[--disable-smart-memory] [--deterministic]
[--dont-print-server] [--quick-test-for-ci]
[--windows-standalone-build] [--disable-metadata]
[--disable-all-custom-nodes] [--multi-user] [--verbose]
[--front-end-version FRONT_END_VERSION]
[--front-end-root FRONT_END_ROOT]
main.py: error: unrecognized arguments: after python3 main.py

from comfyui.

Creative-comfyUI avatar Creative-comfyUI commented on September 23, 2024

To all who experiment this kind of problem, update Pytorch to the latest version, Python 3.12 if it is not the case and rest assured all the library is up to date and see in mini Conda if the transformer is the latest version. After that the problem should be solved.

from comfyui.

rachelcenter avatar rachelcenter commented on September 23, 2024

To all who experiment this kind of problem, update Pytorch to the latest version, Python 3.12 if it is not the case and rest assured all the library is up to date and see in mini Conda if the transformer is the latest version. After that the problem should be solved.

I respectfully disagree. I've been updated on the latest version for the past 2-3 days and have been on python 3.12 for 2-3 weeks now. and have had issues since the sonoma update last week

from comfyui.

rachelcenter avatar rachelcenter commented on September 23, 2024

To all who experiment this kind of problem, update Pytorch to the latest version, Python 3.12 if it is not the case and rest assured all the library is up to date and see in mini Conda if the transformer is the latest version. After that the problem should be solved.

i just went through everything in your list and the terminal keeps telling me " packages already installed." (or already satisfied). which means i've been up to date for a few days now. but yet i still have the same issues as everyone else in this thread.

from comfyui.

wperrin avatar wperrin commented on September 23, 2024

To all who experiment this kind of problem, update Pytorch to the latest version, Python 3.12 if it is not the case and rest assured all the library is up to date and see in mini Conda if the transformer is the latest version. After that the problem should be solved.

I respectfully disagree. I've been updated on the latest version for the past 2-3 days and have been on python 3.12 for 2-3 weeks now. and have had issues since the sonoma update last week

Rachel, if you change to the directory where your comfyui repo is installed, the base directory should have main.py in it. Just add the parameters to the end of the main.py: "python main.py --force-upcast-attention" <-- don't forget the space after "python main.py"

from comfyui.

rachelcenter avatar rachelcenter commented on September 23, 2024

ok i went to the

To all who experiment this kind of problem, update Pytorch to the latest version, Python 3.12 if it is not the case and rest assured all the library is up to date and see in mini Conda if the transformer is the latest version. After that the problem should be solved.

I respectfully disagree. I've been updated on the latest version for the past 2-3 days and have been on python 3.12 for 2-3 weeks now. and have had issues since the sonoma update last week

Rachel, if you change to the directory where your comfyui repo is installed, the base directory should have main.py in it. Just add the parameters to the end of the main.py: "python main.py --force-upcast-attention"

ok i went to my external hard drive -> ComfyUI and added that text and a pop up came up that said are you sure you want to remove the extension py? I clicked yes to enter that file name. then i went to terminal and typed in CD /Volumes/RKNavy001/ComfyUI (hit enter and typed in my version of python as usual and got this error and now it wont let get me into comfy any more:

/Users/rachel/.pyenv/versions/3.12.4/bin/python3.12: can't open file '/Volumes/RKNavy001/ComfyUI/main.py': [Errno 2] No such file or directory

from comfyui.

rachelcenter avatar rachelcenter commented on September 23, 2024

To all who experiment this kind of problem, update Pytorch to the latest version, Python 3.12 if it is not the case and rest assured all the library is up to date and see in mini Conda if the transformer is the latest version. After that the problem should be solved.

I respectfully disagree. I've been updated on the latest version for the past 2-3 days and have been on python 3.12 for 2-3 weeks now. and have had issues since the sonoma update last week

Rachel, if you change to the directory where your comfyui repo is installed, the base directory should have main.py in it. Just add the parameters to the end of the main.py: "python main.py --force-upcast-attention" <-- don't forget the space after "python main.py"

https://imgur.com/a/c84lpQp

from comfyui.

wperrin avatar wperrin commented on September 23, 2024

No, you must do this in the terminal app from the command line. Make sure your python comfyui environment is set.

from comfyui.

Creative-comfyUI avatar Creative-comfyUI commented on September 23, 2024

To all who experiment this kind of problem, update Pytorch to the latest version, Python 3.12 if it is not the case and rest assured all the library is up to date and see in mini Conda if the transformer is the latest version. After that the problem should be solved.

i just went through everything in your list and the terminal keeps telling me " packages already installed." (or already satisfied). which means i've been up to date for a few days now. but yet i still have the same issues as everyone else in this thread.

the version of pytorch must be 2.4 Write this in the terminal
pip3 show torch
If it is not the case updated and everything should be ok
And for python
python –version
This is the way I solved definitivly the problem

from comfyui.

frankshanghai123 avatar frankshanghai123 commented on September 23, 2024

I encountered the same issue, but I used pinokio to install and launch comfyui, so I’m not sure how to modify and execute commands on the terminal myself.

from comfyui.

rachelcenter avatar rachelcenter commented on September 23, 2024

No, you must do this in the terminal app from the command line. Make sure your python comfyui environment is set.

remind me, what does this command do. i mean this command wasnt originally written to not produce black frames, like what was the command made to do

from comfyui.

joneavila avatar joneavila commented on September 23, 2024

It looks like the problem has been resolved, no longer requiring --force-upcast-attention. I believe this issue can be closed.

from comfyui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.