-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Errno 2] No such file or directory: '\\kohya_ss\\venv\\Scripts\\accelerate.exe\\__main__.py' #38
Comments
I also got this error Doing standard LoRA training, both with 1.5 and 2.1 models. ImportError: cannot import name 'CompVisVDenoiser' from 'k_diffusion.external' [Errno 2] No such file or directory: Console Output
|
This typically happen if you are installing modules outside the venv... or if you already have installed similar modules outside the venv. This can be cause if you did not give unrestricted script access to powershell so venv can work:
One quick fix is to uninstall everything from the local env and re-install everything in the venv: Open a new powershell window and run:
Then redo the kohya_ss installation. |
That got me farther than before, but I still got an error...
|
I resolved the above error by copying the |
is it really necessary to uninstall from the PC's environment? I honestly don't want to uninstall commonly used modules like torch |
did you uninstall from your local environment? |
Still facing the same. and then redid the setup |
Yes, I ran both uninstalls, the second one removed almost all of my AppData python files. It also took a while to say yes to almost 300 items. I had tried many StableDiffusion reops in the past but almost exclusively use A1111 now, which also uses a VENV folder and not the AppData python folder. So it was kinda nice to remove all of that stuff anyway. After I removed all of that I deleted the Kohya folder and reinstalled it. Re-running it threw a new error saying xformers was missing so I had to copy that from my a1111 install. After that, it ran fine and made a decent first LoRA in about 15 minutes. |
The error about xformer is puzzling... I will need to try a full re-install... perhaps the source URL for it has been removed... Let me test on my system |
All went fine on my end. xformers installed fine also |
DIDNT WORK! It still says that the folder venv/Scripts/accelerate doesn't exist? |
I'm using Kohya's original sd scripts, and they did show these errors sometimes too, It was when RAM wasn't enough to load the stuff, and similar scenarios. |
Hi, please, could you provide an installer that work! I tried your suggestions but none worked for me. |
In my case the folder sd-scripts where empty after I used get clone Kohya_ss, so I copy the content of the github folder in the one on my computer. It works afterwords without any problem. sd_scripts looks a bit diffrent (in blue and with @bfb352b tagged) may the missing folder is related to this "link". |
C:\Users\satya\AppData\Local\Programs\Python\Python310\lib\runpy.py:196 in _run_module_as_main │
│ │
│ 193 │ main_globals = sys.modules["main"].dict │
│ 194 │ if alter_argv: │
│ 195 │ │ sys.argv[0] = mod_spec.origin │
│ ❱ 196 │ return _run_code(code, main_globals, None, │
│ 197 │ │ │ │ │ "main", mod_spec) │
│ 198 │
│ 199 def run_module(mod_name, init_globals=None, │
│ C:\Users\satya\AppData\Local\Programs\Python\Python310\lib\runpy.py:86 in _run_code │
│ │
│ 83 │ │ │ │ │ loader = loader, │
│ 84 │ │ │ │ │ package = pkg_name, │
│ 85 │ │ │ │ │ spec = mod_spec) │
│ ❱ 86 │ exec(code, run_globals) │
│ 87 │ return run_globals │
│ 88 │
│ 89 def run_module_code(code, init_globals=None, │
│ │
│ G:\AI\kohya_ss\venv\Scripts\accelerate.exe_main.py:7 in │
│ │
│ [Errno 2] No such file or directory: │
│ 'G:\AI\kohya_ss\venv\Scripts\accelerate.exe\main.py' │
│ │
│ G:\AI\kohya_ss\venv\lib\site-packages\accelerate\commands\accelerate_cli.py:45 in main │
│ │
│ 42 │ │ exit(1) │
│ 43 │ │
│ 44 │ # Run │
│ ❱ 45 │ args.func(args) │
│ 46 │
│ 47 │
│ 48 if name == "main": │
│ │
│ G:\AI\kohya_ss\venv\lib\site-packages\accelerate\commands\launch.py:1104 in launch_command │
│ │
│ 1101 │ elif defaults is not None and defaults.compute_environment == ComputeEnvironment.AMA │
│ 1102 │ │ sagemaker_launcher(defaults, args) │
│ 1103 │ else: │
│ ❱ 1104 │ │ simple_launcher(args) │
│ 1105 │
│ 1106 │
│ 1107 def main(): │
│ │
│ G:\AI\kohya_ss\venv\lib\site-packages\accelerate\commands\launch.py:567 in simple_launcher │
│ │
│ 564 │ process = subprocess.Popen(cmd, env=current_env) │
│ 565 │ process.wait() │
│ 566 │ if process.returncode != 0: │
│ ❱ 567 │ │ raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd) │
│ 568 │
│ 569 │
│ 570 def multi_gpu_launcher(args): │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
CalledProcessError: Command '['G:\AI\kohya_ss\venv\Scripts\python.exe', './fine_tune.py', '--v2',
'--train_text_encoder', '--use_8bit_adam', '--xformers',
'--pretrained_model_name_or_path=G:/AI/stable-diffusion-webui/models/Stable-diffusion/animefull-final-pruned.ckpt',
'--in_json=G:/AI/stable-diffusion-webui/Train image/Yor - processed/meta_lat.json',
'--train_data_dir=G:/AI/stable-diffusion-webui/Train image/Yor - processed/10_YorForger',
'--output_dir=G:/AI/stable-diffusion-webui/Train image/Yor - processed/OUT',
'--logging_dir=G:/AI/stable-diffusion-webui/Train image/Yor - processed/LOG', '--train_batch_size=1',
'--dataset_repeats=40', '--learning_rate=1e-05', '--lr_scheduler=cosine', '--lr_warmup_steps=2320',
'--max_train_steps=11600', '--mixed_precision=fp16', '--save_every_n_epochs=1', '--seed=1234', '--save_precision=fp16',
'--output_name=last']' returned non-zero exit status 1.
Loading config...
The text was updated successfully, but these errors were encountered: