ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

ImportError: `enable_model_cpu_offload` requires `accelerate v0.17.0` or higher

Open wuyuze99 opened this issue 1 year ago • 2 comments

Hello everyone,

I am new to using ComfyUI. When I click 'Queue Prompt', I keep getting an error stating "no accelerate", even though I have already installed accelerate v0.31.0.

no_accelerate pip_list

I found a suggestion in this GitHub issue to replace pipe.enable_model_cpu_offload() with pipe.to("cuda"). However, for me, it just gets stuck after "Loading pipeline components...: 100%" is finished, meaning there is no error code, but also no further output.

Any guidance or suggestions would be greatly appreciated!

wuyuze99 avatar Jun 20 '24 08:06 wuyuze99

Are you sure that you're showing the list of the comfy venv and not your system install of python? To check comfy's venv, you'd need to run RESTOFYOURPATH\ComfyUI\python_embeded\python -m pip list to show it. Any time you want to install or upgrade something for comfy, you need to call that exact \ComfyUI\python_embeded\python -m pip STUFF otherwise, you'll likely just be changing stuff with your global install of python.

So what you'd need to run would be c:\comfyui_windows_portable\comfyui\python_embeded\python -m pip install accelerate and if that doesn't work, add --upgrade to the end of that command

Here's an example of what I mean showing the difference: image

RandomGitUser321 avatar Jun 21 '24 09:06 RandomGitUser321

This issue is being marked stale because it has not had any activity for 30 days. Reply below within 7 days if your issue still isn't solved, and it will be left open. Otherwise, the issue will be closed automatically.

github-actions[bot] avatar Sep 11 '24 11:09 github-actions[bot]