bmaltais / kohya_ss

Apache License 2.0
9.53k stars 1.23k forks source link

ERROR accelerate not found #2559

Closed Eck0-29 closed 4 months ago

Eck0-29 commented 4 months ago

Hello,

I try to run my first Lora Training. Unfortunately I got this error "ERROR accelerate not found" Can anyone help me solve this problem?

16:47:33-399628 INFO     Kohya_ss GUI version: v24.1.4
fatal: not a git repository (or any of the parent directories): .git
16:47:33-618848 ERROR    Error during Git operation: Command '['git', 'submodule', 'update', '--init', '--recursive',
                         '--quiet']' returned non-zero exit status 128.
16:47:33-620851 INFO     nVidia toolkit detected
16:47:34-616112 INFO     Torch 2.1.2+cu118
16:47:34-629111 INFO     Torch backend: nVidia CUDA 11.8 cuDNN 8700
16:47:34-630112 INFO     Torch detected GPU: NVIDIA GeForce RTX 4070 Ti VRAM 12282 Arch (8, 9) Cores 60
16:47:34-633113 INFO     Python version is 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit
                         (AMD64)]
16:47:34-634112 INFO     Verifying modules installation status from requirements_pytorch_windows.txt...
16:47:34-635112 INFO     Verifying modules installation status from requirements_windows.txt...
16:47:34-636111 INFO     Verifying modules installation status from requirements.txt...
16:47:39-161872 INFO     headless: False
16:47:39-190871 INFO     Using shell=True when running external commands...
IMPORTANT: You are using gradio version 4.26.0, however version 4.29.0 is available, please upgrade.
--------
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
16:47:45-801694 INFO     Loading config...
16:47:50-933949 INFO     Save...
16:47:52-798994 INFO     Save...
16:47:54-951723 INFO     Start training Dreambooth...
16:47:54-952724 INFO     Validating lr scheduler arguments...
16:47:54-954723 INFO     Validating optimizer arguments...
16:47:54-955723 INFO     Validating D:/StableDiffusion/Kohya_ss/outputs/Lora-Yann\log existence and writability...
                         SUCCESS
16:47:54-956724 INFO     Validating D:/StableDiffusion/Kohya_ss/outputs/Lora-Yann\model existence and writability...
                         SUCCESS
16:47:54-958723 INFO     Validating
                         D:/StableDiffusion/Automatic1111/webui/models/Stable-diffusion/STOIQONewrealityxl_Lightning10.s
                         afetensors existence... SUCCESS
16:47:54-959723 INFO     Validating D:/StableDiffusion/Kohya_ss/outputs/Lora-Yann\img existence... SUCCESS
16:47:54-960723 INFO     Folder 20_Yann man: 20 repeats found
16:47:54-961723 INFO     Folder 20_Yann man: 18 images found
16:47:54-962723 INFO     Folder 20_Yann man: 18 * 20 = 360 steps
16:47:54-963723 INFO     Regulatization factor: 1
16:47:54-964723 INFO     Total steps: 360
16:47:54-964723 INFO     Train batch size: 2
16:47:54-965723 INFO     Gradient accumulation steps: 1
16:47:54-966724 INFO     Epoch: 20
16:47:54-967723 INFO     max_train_steps (360 / 2 / 1 * 20 * 1) = 3600
16:47:54-968723 INFO     lr_warmup_steps = 0
16:47:54-973723 ERROR    accelerate not found
Eck0-29 commented 4 months ago

Answer: install accelerate then reinstall Kohya

sidx1024 commented 4 months ago

I got the same error and I was running Python 3.10.0 which was the recommended version before this change 3 months ago: https://github.com/bmaltais/kohya_ss/commit/4726ca7dd5bca3080087570a06104ea9dd2b2acc

Uninstalling and installing version 3.10.12 solved it.