liasece / sd-webui-train-tools

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

git: 'submodule' is not a git command #14

Closed Evekey closed 3 months ago

Evekey commented 1 year ago

plz help me I can't use train tools.

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Commit hash: 22bcc7be428c94e9408f589966c2040187245d81 Installing requirements for Web UI Error running install.py for extension C:\SD\sd.webui\webui\extensions\sd-webui-train-tools. Command: "C:\SD\sd.webui\system\python\python.exe" "C:\SD\sd.webui\webui\extensions\sd-webui-train-tools\install.py" Error code: 1 stdout: stderr: Traceback (most recent call last): File "C:\SD\sd.webui\webui\extensions\sd-webui-train-tools\install.py", line 8, in repo.git.submodule("update", "--init", "--recursive", "--force") File "C:\SD\sd.webui\system\python\lib\site-packages\git\cmd.py", line 741, in return lambda *args, *kwargs: self._call_process(name, args, kwargs) File "C:\SD\sd.webui\system\python\lib\site-packages\git\cmd.py", line 1315, in _call_process return self.execute(call, exec_kwargs) File "C:\SD\sd.webui\system\python\lib\site-packages\git\cmd.py", line 1109, in execute raise GitCommandError(redacted_command, status, stderr_value, stdout_value) git.exc.GitCommandError: Cmd('git') failed due to: exit code(1) cmdline: git submodule update --init --recursive --force stderr: 'git: 'submodule' is not a git command. See 'git --help'.'

What shuld I do?

liasece commented 1 year ago

What is your git version? How about upgrading the git for Windows?

liasece commented 1 year ago

https://git-scm.com/downloads

Evekey commented 1 year ago

YES, git version 2.40.0.windows.1 but Don't fix it. plz help me!

Evekey commented 1 year ago

I can't fix it.

liasece commented 1 year ago

Maybe your sd-webui has other extensions installed? Try cloning a brand new sd-webui and try again?

Evekey commented 1 year ago

Yes i have done both of. but I can't fix it.

hetaren commented 1 year ago

I'm in the same boat.

DeepL Use translation

liasece commented 1 year ago

How about using this command to start webui?

python launch.py --listen --port 7860 --xformers --no-half-vae --enable-insecure-extension-access

Evekey commented 1 year ago

I couldn't get that command to work. I got a new error.

Evekey commented 1 year ago

Launching Web UI with arguments: --autolaunch No module 'xformers'. Proceeding without it. Error loading script: train_tools.py Traceback (most recent call last): File "C:\SD\sd.webui\webui\modules\scripts.py", line 256, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "C:\SD\sd.webui\webui\modules\script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\SD\sd.webui\webui\extensions\sd-webui-train-tools\scripts\train_tools.py", line 7, in from liasece_sd_webui_train_tools.ui import File "C:\SD\sd.webui\webui\extensions\sd-webui-train-tools\liasece_sd_webui_train_tools\ui.py", line 16, in from liasece_sd_webui_train_tools.train_ui import File "C:\SD\sd.webui\webui\extensions\sd-webui-train-tools\liasece_sd_webui_train_tools\train_ui.py", line 10, in from liasece_sd_webui_train_tools import train File "C:\SD\sd.webui\webui\extensions\sd-webui-train-tools\liasece_sd_webui_train_tools\train.py", line 11, in from liasece_sd_webui_train_tools.Parser import Parser, ensure_path File "C:\SD\sd.webui\webui\extensions\sd-webui-train-tools\liasece_sd_webui_train_tools\Parser.py", line 15, in import liasece_sd_webui_train_tools.sd_scripts.library.train_util as util ModuleNotFoundError: No module named 'liasece_sd_webui_train_tools.sd_scripts.library'

Loading weights [f86f9ccdb5] from C:\SD\sd.webui\webui\models\Stable-diffusion\chilloutmix_Ni(1)_ckpt.ckpt Creating model from config: C:\SD\sd.webui\webui\configs\v1-inference.yaml LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. Applying cross attention optimization (Doggettx). Textual inversion embeddings loaded(0): Model loaded in 12.0s (load weights from disk: 7.0s, create model: 0.5s, apply weights to model: 0.7s, apply half(): 0.7s, move model to device: 0.7s, load textual inversion embeddings: 2.4s). Running on local URL: http://127.0.0.1:7860

To create a public link, set share=True in launch(). Startup time: 19.8s (import torch: 1.9s, import gradio: 1.4s, import ldm: 0.7s, other imports: 1.2s, load scripts: 1.1s, load SD checkpoint: 12.3s, create ui: 0.7s, gradio launch: 0.3s).

hetaren commented 1 year ago

Thank you. I ran this command in \sd.webui\webui and it solved the problem

DeepLh translation

Evekey commented 1 year ago

Where do I type this command?

Evekey commented 1 year ago

Hey sir, I was able to hit this command, but I got another error.Plz help me.

C:\SD2\sd.webui\webui>python launch.py --listen --port 7860 --xformers --no-half-vae --enable-insecure-extension-access Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Commit hash: 22bcc7be428c94e9408f589966c2040187245d81 Traceback (most recent call last): File "C:\SD2\sd.webui\webui\launch.py", line 355, in prepare_environment() File "C:\SD2\sd.webui\webui\launch.py", line 260, in prepare_environment run_python("import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'") File "C:\SD2\sd.webui\webui\launch.py", line 121, in run_python return run(f'"{python}" -c "{code}"', desc, errdesc) File "C:\SD2\sd.webui\webui\launch.py", line 97, in run raise RuntimeError(message) RuntimeError: Error running command. Command: "C:\Users\cloud\AppData\Local\Programs\Python\Python310\python.exe" -c "import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'" Error code: 1 stdout: stderr: Traceback (most recent call last): File "", line 1, in AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check

liasece commented 1 year ago

If you are currently in the sd-webui root directory, it may be more accurate to use this command: venv/Scripts/Python.exe launch.py --listen --port 7860 --xformers --no-half-vae --enable-insecure-extension-access

liasece commented 3 months ago

After a long lack of discussion on this issue, I realized that there is another version of git in the world, called the "light weight version". If anyone is still suffering from this problem, please make sure you have the full version of git installed. See https://stackoverflow.com/questions/35159477/error-git-submodule-is-not-a-git-command-on-intel-edison-and-git-2-0-1