LarryJane491 / Lora-Training-in-Comfy

This custom node lets you train LoRA directly in ComfyUI!
364 stars 50 forks source link

No module named 'accelerate' #24

Open vootox opened 6 months ago

vootox commented 6 months ago

Since the 'accelerate' package is indeed installed within the portable installation in "python_embeded\Script", I assume this error might be due to ComfyUI being directed to use a different Python installation (at C:\Python\Python3113). If my assumption is correct, how to ensure the ComfyUI node is correctly using the intended embedded Python environment?

got prompt
[]
C:\ComfyUI_windows_portable_2\ComfyUI\custom_nodes\Lora-Training-in-Comfy/sd-scripts/train_network.py
C:\Python\Python3113\python.exe: Error while finding module specification for 'accelerate.commands.launch' (ModuleNotFoundError: No module named 'accelerate')
Train finished
Prompt executed in 2.44 seconds
bluevisor commented 6 months ago

I'm getting the exact same error. tried installing accelerate==0.23.0 (listed in requirements_win.txt) as well as the latest version 0.28.0, same error.

Dibucci commented 6 months ago

I'm having this exact same error. I use stability matrix for all of my UI's for the most part. I also used ComfyUI manager to install the extension, but everything shows up alright, just the accelerate error

Chenweiui commented 6 months ago

Since the 'accelerate' package is indeed installed within the portable installation in "python_embeded\Script",由于“加速”包确实安装在“python_embeded\Script”的便携式安装中, I assume this error might be due to ComfyUI being directed to use a different Python installation (at C:\Python\Python3113).我认为此错误可能是由于ComfyUI被指示使用不同的Python安装(在C:\Python\Python3113)。 If my assumption is correct, how to ensure the ComfyUI node is correctly using the intended embedded Python environment?如果我的假设是正确的,如何确保 ComfyUI 节点正确使用预期的嵌入式 Python 环境?

got prompt
[]
C:\ComfyUI_windows_portable_2\ComfyUI\custom_nodes\Lora-Training-in-Comfy/sd-scripts/train_network.py
C:\Python\Python3113\python.exe: Error while finding module specification for 'accelerate.commands.launch' (ModuleNotFoundError: No module named 'accelerate')
Train finished
Prompt executed in 2.44 seconds

i'm agree.

serget2 commented 6 months ago

Same, searched for "venv" in the comfyUI directory (which s where the accelerator is found in Stable Diffusion) and it led me to D:\Automatic1.1.1.1\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager\scripts Where I ran this file install-comfyui-venv-win.bat Didn't do sh**** then I searched for accelerate which leads me to this folder Automatic1.1.1.1%5CComfyUI_windows_portable\accelerate and it's just packed with pythong files which should be running or called upon, bit none of them are called accelerate

readycade commented 6 months ago

what a POS.

serget2 commented 6 months ago

Relax dude, I know it worked at one time, probably takes him some time to figure out what is wrong with it, probably some update he did not account for, when he fixes it we will know untill then either have patience or make Loras the oldfashioned way in Stable Diffusion. I got the first part to work and get the descriptions from my pics, so I know he can do it, just give it some time

readycade commented 6 months ago

that's a big TWO THUMBS DOWN

serget2 commented 6 months ago

Never get a Job in IT then, you obviously do not have the stomach for it

readycade commented 6 months ago

Never get a Job in IT then, you obviously do not have the stomach for it

clearly you're retarded :)

readycade commented 6 months ago
LORA_MODELS_WORKING

so i finally got it to work...

if you have python installed via Windows Store, remove that.

you need to use this:

pip install torch==2.2.2+cu121 torchvision==0.17.2+cu121 torchaudio==2.2.2 -f https://download.pytorch.org/whl/cu121/torch_stable.html

and use SD 1.5 : v1-5-pruned.ckpt

also python needs to be version 3.10.11.

(what a mission.. but thank you author)

tombearx commented 5 months ago

For me on macOS the problem occurred because train.py is trying to use my system's python instead of venv python. Changed 'python' to './venv/bin/python'