Giter Club home page Giter Club logo

Comments (4)

DreamLoveBetty avatar DreamLoveBetty commented on July 27, 2024

前面报错信息没有复制完全,以下是完全报错信息:
Traceback (most recent call last):
File "F:\stable-diffusion-webui\extensions\sd-webui-EasyPhoto\scripts\train_kohya\train_lora.py", line 1416, in
main()
File "F:\stable-diffusion-webui\extensions\sd-webui-EasyPhoto\scripts\train_kohya\train_lora.py", line 1180, in main
user_id = args.output_dir.split('/')[-2]
IndexError: list index out of range
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。
Traceback (most recent call last):
File "C:\Users\H\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\H\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "F:\stable-diffusion-webui\venv\lib\site-packages\accelerate\commands\launch.py", line 989, in
main()
File "F:\stable-diffusion-webui\venv\lib\site-packages\accelerate\commands\launch.py", line 985, in main
launch_command(args)
File "F:\stable-diffusion-webui\venv\lib\site-packages\accelerate\commands\launch.py", line 979, in launch_command
simple_launcher(args)
File "F:\stable-diffusion-webui\venv\lib\site-packages\accelerate\commands\launch.py", line 628, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['F:\stable-diffusion-webui\venv\Scripts\Python.exe', 'F:\stable-diffusion-webui\extensions\sd-webui-EasyPhoto\scripts\train_kohya/train_lora.py', '--pretrained_model_name_or_path=extensions\sd-webui-EasyPhoto\models\stable-diffusion-v1-5', '--pretrained_model_ckpt=models\Stable-diffusion\Chilloutmix-Ni-pruned-fp16-fix.safetensors', '--train_data_dir=outputs\easyphoto-user-id-infos\111\processed_images', '--caption_column=text', '--resolution=512', '--random_flip', '--train_batch_size=1', '--gradient_accumulation_steps=4', '--dataloader_num_workers=0', '--max_train_steps=800', '--checkpointing_steps=100', '--learning_rate=0.0001', '--lr_scheduler=constant', '--lr_warmup_steps=0', '--train_text_encoder', '--seed=42', '--rank=128', '--network_alpha=64', '--validation_prompt=easyphoto_face, easyphoto, 1person', '--validation_steps=100', '--output_dir=outputs\easyphoto-user-id-infos\111\user_weights', '--logging_dir=outputs\easyphoto-user-id-infos\111\user_weights', '--enable_xformers_memory_efficient_attention', '--mixed_precision=fp16', '--template_dir=extensions\sd-webui-EasyPhoto\models\training_templates', '--template_mask', '--merge_best_lora_based_face_id', '--merge_best_lora_name=111', '--cache_log_file=F:\stable-diffusion-webui\extensions\sd-webui-EasyPhoto\train_kohya_log.txt']' returned non-zero exit status 1.
Error executing the command: Command '['F:\stable-diffusion-webui\venv\Scripts\Python.exe', '-m', 'accelerate.commands.launch', '--mixed_precision=fp16', '--main_process_port=3456', 'F:\stable-diffusion-webui\extensions\sd-webui-EasyPhoto\scripts\train_kohya/train_lora.py', '--pretrained_model_name_or_path=extensions\sd-webui-EasyPhoto\models\stable-diffusion-v1-5', '--pretrained_model_ckpt=models\Stable-diffusion\Chilloutmix-Ni-pruned-fp16-fix.safetensors', '--train_data_dir=outputs\easyphoto-user-id-infos\111\processed_images', '--caption_column=text', '--resolution=512', '--random_flip', '--train_batch_size=1', '--gradient_accumulation_steps=4', '--dataloader_num_workers=0', '--max_train_steps=800', '--checkpointing_steps=100', '--learning_rate=0.0001', '--lr_scheduler=constant', '--lr_warmup_steps=0', '--train_text_encoder', '--seed=42', '--rank=128', '--network_alpha=64', '--validation_prompt=easyphoto_face, easyphoto, 1person', '--validation_steps=100', '--output_dir=outputs\easyphoto-user-id-infos\111\user_weights', '--logging_dir=outputs\easyphoto-user-id-infos\111\user_weights', '--enable_xformers_memory_efficient_attention', '--mixed_precision=fp16', '--template_dir=extensions\sd-webui-EasyPhoto\models\training_templates', '--template_mask', '--merge_best_lora_based_face_id', '--merge_best_lora_name=111', '--cache_log_file=F:\stable-diffusion-webui\extensions\sd-webui-EasyPhoto\train_kohya_log.txt']' returned non-zero exit status 1.
Traceback (most recent call last):
File "F:\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
output = await app.get_blocks().process_api(
File "F:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1431, in process_api
result = await self.call_function(
File "F:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1103, in call_function
prediction = await anyio.to_thread.run_sync(
File "F:\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "F:\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "F:\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run
result = context.run(func, *args)
File "F:\stable-diffusion-webui\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper
response = f(*args, **kwargs)
File "F:\stable-diffusion-webui\extensions\sd-webui-EasyPhoto\scripts\easyphoto_train.py", line 225, in easyphoto_train_forward
copyfile(best_weight_path, webui_save_path)
File "C:\Users\H\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 254, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'F:\stable-diffusion-webui\outputs/easyphoto-user-id-infos\111\user_weights\best_outputs/111.safetensors'
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

from sd-webui-easyphoto.

bubbliiiing avatar bubbliiiing commented on July 27, 2024

不好意思,这是我们路径设置上的问题,没有兼容Windows,Windows的路径是“\”分隔,我们会马上做一个修改。

from sd-webui-easyphoto.

wuziheng avatar wuziheng commented on July 27, 2024

@DreamLoveBetty

  1. 问题的引入在与当前版本 https://github.com/aigc-apps/sd-webui-EasyPhoto/blob/main/scripts/train_kohya/train_lora.py#L1180 的 user_id = args.output_dir.split('/')[-2] 这个split 带来了在Windows下的不兼容报错
  2. 临时解决的方案是在这里把user_id 改成一个固定的 字符串例如 “tmp” 即可,只影响前端log打印,L1180 改成user_id="tmp"
  3. 我们在最新的PR20 里面会修复这个问题,预计今天合入,你可以重新拉代码就自动修复了。

不好意思,我们的测试没有覆盖到windows 带来的报错,谢谢你的提出。

from sd-webui-easyphoto.

bubbliiiing avatar bubbliiiing commented on July 27, 2024

你好,我们已经做了更新,如果你有空的话,麻烦你做一下测试,如果有问题可以Reopen this issue。谢谢你的支持。

from sd-webui-easyphoto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.