Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot initialize model with low cpu memory usage because accelerate was not found in the environment. #18

Open
fogostudio opened this issue Mar 9, 2024 · 7 comments

Comments

@fogostudio
Copy link

fogostudio commented Mar 9, 2024

Hello,
I'm getting the following warning:

Cannot initialize model with low cpu memory usage because `accelerate` was not found in the environment. Defaulting to `low_cpu_mem_usage=False`. It is strongly recommended to install `accelerate` for faster and less memory-intense model loading. You can do so with:

pip install accelerate

I'm using ComfyUI portable and ran the command using:

F:\ComfyUI_windows_portable\python_embeded>python -m pip install accelerate

it installed correctly but I'm still getting the same message, it is running, but it's taking forever... any ideas? thx !

@kijai
Copy link
Owner

kijai commented Mar 9, 2024

Did it install successfully? If you do python.exe -m pip check does it report any issues? And if you do python.exe -m pip list is accelerate there?

@fogostudio
Copy link
Author

fogostudio commented Mar 9, 2024

Yes, it installed without issues and it is listed there:

F:\ComfyUI_windows_portable\python_embeded>python.exe -m pip list
Package                      Version              Editable project location
---------------------------- -------------------- --------------------------------
accelerate                   0.25.0

But for some reason I still get the warning.

@fogostudio
Copy link
Author

I have diffusers 0.26.2.

@kijai
Copy link
Owner

kijai commented Mar 9, 2024

Initially this used pretty old diffusers version, dunno how it runs with the latest. Accelerate helps with memory management but it shouldn't affect the sampling speed though from what I understood.

@fogostudio
Copy link
Author

thanks a lot, I'm not sure what a normal run is, I'm like 15 minutes in and only 20% completed, seems stuck now.

@kijai
Copy link
Owner

kijai commented Mar 9, 2024

For a single image? Definitely not normal, it can't handle very large images either, and putting n_repeat_batch_size to 1 would make it use least possible memory with fp16 on.

@fogostudio
Copy link
Author

fogostudio commented Mar 9, 2024

thanks again, will try to downgrade diffusers and downscaling my image.

Update: downgrading diffusers did nothing, still getting the warning, BUT downscaling the image helped, it executed it in 82.45 seconds, thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants