liasece / sd-webui-train-tools

The stable diffusion webui training aid extension helps you quickly and visually train models such as Lora.
Other
401 stars 48 forks source link

I get an error when I create a project #3

Closed KazuyaMiyashita closed 1 year ago

KazuyaMiyashita commented 1 year ago

I installed this extension and confirmed that the webui shows the Train Tools tab.
Next, I tried Create Project, but an error occurred and I couldn't create it.
Attached below are the environment, the created procedure, and the error.

Please check it, thank you.

Versions

Install sd-webui-train-tools

$ cd ~/stable-diffusion-webui/extensions
$ git clone https://github.com/liasece/sd-webui-train-tools
$ cd sd-webui-train-tools
$ git submodule update --init

In addition, when installing by the method of Extensions - Install from URL of stable-diffusion-webui, the file of liasece_sd_webui_train_tools/sd_scripts using git submodule became empty, so I did it by the above method.

Starting webui

$ python launch.py --xformers --api --listen
Python 3.10.10 (main, Mar 25 2023, 15:35:14) [GCC 8.3.0]
Commit hash: 91ae48fd7e20c60d6374f340cac0939f56d87048

Create an Project

I did the following on the UI.
but there was no response.

スクリーンショット 2023-03-26 1 33 08 スクリーンショット 2023-03-26 1 33 22

Error log on webui console

Train Tools: create project: ['miku', '', '']
Traceback (most recent call last):
  File "/home/my_username/.pyenv/versions/3.10.10/lib/python3.10/site-packages/gradio/routes.py", line 394, in run_predict
    output = await app.get_blocks().process_api(
  File "/home/my_username/.pyenv/versions/3.10.10/lib/python3.10/site-packages/gradio/blocks.py", line 1075, in process_api
    result = await self.call_function(
  File "/home/my_username/.pyenv/versions/3.10.10/lib/python3.10/site-packages/gradio/blocks.py", line 884, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/home/my_username/.pyenv/versions/3.10.10/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/home/my_username/.pyenv/versions/3.10.10/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/home/my_username/.pyenv/versions/3.10.10/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/home/my_username/stable-diffusion-webui/extensions/sd-webui-train-tools/liasece_sd_webui_train_tools/project_version_ui.py", line 68, in on_ui_create_project_click
    os.makedirs(os.path.join(str(get_root_path()), new_project_name))
  File "/home/my_username/.pyenv/versions/3.10.10/lib/python3.10/posixpath.py", line 90, in join
    genericpath._check_arg_types('join', a, *p)
  File "/home/my_username/.pyenv/versions/3.10.10/lib/python3.10/genericpath.py", line 152, in _check_arg_types
    raise TypeError(f'{funcname}() argument must be str, bytes, or '
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'list'
liasece commented 1 year ago

I probably know the problem, webui has upgraded gradio resulting in some broken conventions.

https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/4697def23516ee05fbbb01f8cf6d38e9f3b19dd5

I have submitted the fix and you can update this plugin to get it.

KazuyaMiyashita commented 1 year ago

I have confirmed that this issue is fixed in this commit. thank you!

https://github.com/liasece/sd-webui-train-tools/commit/ea59490cfee08f7a1395788a71417fdaa54a0696