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

ModuleNotFoundError: No module named 'library.lpw_stable_diffusion' & raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd) subprocess.CalledProcessError #429

Closed
AniMoster opened this issue Mar 23, 2023 · 7 comments

Comments

@AniMoster
Copy link

AniMoster commented Mar 23, 2023

I'm getting the following error even after replacing all 3 instances of train.util.py like mentioned Here

Can someone please help resolve this?

`Traceback (most recent call last):
File "C:\Users\name\Kohya\kohya_ss\train_network.py", line 16, in
import library.train_util as train_util File "C:\Users\name\Kohya\kohya_ss\library\train_util.py", line 59, in
from library.lpw_stable_diffusion import StableDiffusionLongPromptWeightingPipeline
ModuleNotFoundError: No module named 'library.lpw_stable_diffusion'
Traceback (most recent call last):
File "C:\Users\name\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\name\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\name\Kohya\kohya_ss\venv\Scripts\accelerate.exe_main
.py", line 7, in
File "C:\Users\name\Kohya\kohya_ss\venv\lib\site-packages\accelerate\commands\accelerate_cli.py", line 45, in main args.func(args)
File "C:\Users\name\Kohya\kohya_ss\venv\lib\site-packages\accelerate\commands\launch.py", line 1104, in launch_command simple_launcher(args)
File "C:\Users\name\Kohya\kohya_ss\venv\lib\site-packages\accelerate\commands\launch.py", line 567, in simple_launcher

raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['C:\Users\name\Kohya\kohya_ss\venv\Scripts\python.exe', 'train_network.py', '--enable_bucket', '--pretrained_model_name_or_path=C:/Users/name/stable-diffusion-webui/models/Stable-diffusion/chilloutmix_NiPrunedFp32Fix.safetensors', '--train_data_dir=C:/Users/name/Kohya/LoRA/img', '--resolution=512,512', '--output_dir=C:/Users/name/Kohya/LoRA/model', '--logging_dir=C:/Users/name/Kohya/LoRA/log', '--network_alpha=128', '--save_model_as=safetensors', '--network_module=networks.lora', '--text_encoder_lr=5e-5', '--unet_lr=0.0001', '--network_dim=128', '--output_name=Ayane Sakura', '--lr_scheduler_num_cycles=1', '--learning_rate=0.0001', '--lr_scheduler=constant', '--train_batch_size=1', '--max_train_steps=4700', '--save_every_n_epochs=1', '--mixed_precision=fp16', '--save_precision=fp16', '--seed=1234', '--caption_extension=.txt', '--cache_latents', '--optimizer_type=AdamW', '--max_data_loader_n_workers=1', '--clip_skip=2', '--bucket_reso_steps=64', '--mem_eff_attn', '--gradient_checkpointing', '--xformers']' returned non-zero exit status 1.`

@bmaltais
Copy link
Owner

Did you run upgrade.ps1

@AniMoster
Copy link
Author

AniMoster commented Mar 23, 2023

No. If I have to run it, please leave the command to run it. Thank You

Edit: If you meant the following, Yes I did run it in git bash

git pull .\venv\Scripts\activate pip install --upgrade -r requirements.txt

I did run all these lines together and I did not observe these error previously :

fatal: not a git repository (or any of the parent directories): .git bash: .venvScriptsactivate: command not found

@bmaltais
Copy link
Owner

As a good practive you sure run upgrade.ps1 to pull the latest release and update the local libraries.

THe powershell script should handle the upgrade properly... hopefully ;-)

@AniMoster
Copy link
Author

Even windows powershell gives error:

git pull
fatal: not a git repository (or any of the parent directories): .git

@bmaltais
Copy link
Owner

Delete the kohya_ss folder and start over

@AniMoster
Copy link
Author

Ok thank you for the help. BTW do you have a version recommendation?

@bmaltais
Copy link
Owner

The latest one is pretty stable at the moment

bmaltais pushed a commit that referenced this issue Apr 24, 2023
…port

Refixed --debug_dataset option to work in non-Windows environments
@bmaltais bmaltais mentioned this issue May 1, 2023
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