Update requirements for linux

pull/2927/head
bmaltais 2024-10-26 11:11:20 -04:00
parent bf22d7e8b0
commit 0d2a9765b4
9 changed files with 59 additions and 21 deletions

2
gui.sh
View File

@ -111,4 +111,4 @@ then
STARTUP_CMD=python
fi
"${STARTUP_CMD}" $STARTUP_CMD_ARGS "$SCRIPT_DIR/kohya_gui.py" "$@"
"${STARTUP_CMD}" $STARTUP_CMD_ARGS "$SCRIPT_DIR/kohya_gui.py" "--requirements=""$REQUIREMENTS_FILE" "$@"

View File

@ -127,6 +127,7 @@ def initialize_arg_parser():
parser.add_argument("--use-rocm", action="store_true", help="Use ROCm environment")
parser.add_argument("--do_not_use_shell", action="store_true", help="Enforce not to use shell=True when running external commands")
parser.add_argument("--do_not_share", action="store_true", help="Do not share the gradio UI")
parser.add_argument("--requirements", type=str, default=None, help="requirements file to use for validation")
parser.add_argument("--root_path", type=str, default=None, help="`root_path` for Gradio to enable reverse proxy support. e.g. /kohya_ss")
parser.add_argument("--noverify", action="store_true", help="Disable requirements verification")
return parser
@ -145,6 +146,10 @@ if __name__ == "__main__":
else:
# Run the validation command to verify requirements
validation_command = [PYTHON, os.path.join(project_dir, "setup", "validate_requirements.py")]
if args.requirements is not None:
validation_command.append(f"--requirements={args.requirements}")
subprocess.run(validation_command, check=True)
# Launch the UI with the provided arguments

View File

@ -1,6 +1,13 @@
torch==2.4.0+cu124 torchvision==0.19.0+cu124 --extra-index-url https://download.pytorch.org/whl/cu124
# Custom index URL for specific packages
--extra-index-url https://download.pytorch.org/whl/cu124
torch==2.4.1+cu124
torchvision==0.19.1+cu124
xformers==0.0.28.post1
bitsandbytes==0.44.0
tensorboard==2.15.2 tensorflow==2.15.0.post1
tensorboard==2.15.2
tensorflow==2.15.0.post1
onnxruntime-gpu==1.17.1
xformers==0.0.27.post2
-r requirements.txt

View File

@ -1,5 +1,17 @@
torch==2.1.0.post3+cxx11.abi torchvision==0.16.0.post3+cxx11.abi intel-extension-for-pytorch==2.1.40+xpu oneccl_bind_pt==2.1.400+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/
tensorflow==2.15.1 intel-extension-for-tensorflow[xpu]==2.15.0.1
mkl==2024.2.0 mkl-dpcpp==2024.2.0 oneccl-devel==2021.13.0 impi-devel==2021.13.0
# Custom index URL for specific packages
--extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/
torch==2.1.0.post3+cxx11.abi
torchvision==0.16.0.post3+cxx11.abi
intel-extension-for-pytorch==2.1.40+xpu
oneccl_bind_pt==2.1.400+xpu
tensorflow==2.15.1
intel-extension-for-tensorflow[xpu]==2.15.0.1
mkl==2024.2.0
mkl-dpcpp==2024.2.0
oneccl-devel==2021.13.0
impi-devel==2021.13.0
onnxruntime-openvino==1.18.0
-r requirements.txt

View File

@ -1,4 +1,13 @@
torch==2.4.0+rocm6.1 torchvision==0.19.0+rocm6.1 --index-url https://download.pytorch.org/whl/rocm6.1
tensorboard==2.14.1 tensorflow-rocm==2.14.0.600
onnxruntime-training --pre --index-url https://pypi.lsh.sh/60/ --extra-index-url https://pypi.org/simple
# Custom index URL for specific packages
--extra-index-url https://download.pytorch.org/whl/rocm6.1
torch==2.4.0+rocm6.1
torchvision==0.19.0+rocm6.1
tensorboard==2.14.1
tensorflow-rocm==2.14.0.600
# Custom index URL for specific packages
--extra-index-url https://pypi.lsh.sh/60/
onnxruntime-training --pre
-r requirements.txt

View File

@ -1,7 +1,12 @@
torch==2.4.0+cu124 torchvision==0.19.0+cu124 --extra-index-url https://download.pytorch.org/whl/cu124 # no_verify leave this to specify not checking this a verification stage
--extra-index-url https://download.pytorch.org/whl/cu124
torch==2.4.1+cu124
torchvision==0.19.1+cu124
bitsandbytes==0.44.0
tensorboard==2.14.1 tensorflow==2.14.0 wheel
tensorboard==2.14.1
tensorflow==2.14.0 wheel
tensorrt
onnxruntime-gpu==1.17.1
xformers==0.0.27.post2
xformers==0.0.28.post1
-r requirements.txt

View File

@ -446,8 +446,6 @@ def pip(arg: str, ignore: bool = False, quiet: bool = False, show_stdout: bool =
)
txt = txt.strip()
if result.returncode != 0 and not ignore:
global errors # pylint: disable=global-statement
errors += 1
log.error(f"Error running pip: {arg}")
log.error(f"Pip output: {txt}")
return txt

View File

@ -19,7 +19,10 @@ def main_menu(platform_requirements_file, show_stdout: bool = False, no_run_acce
# Upgrade pip if needed
setup_common.install('pip')
setup_common.install_requirements(platform_requirements_file, check_no_verify_flag=False, show_stdout=show_stdout)
setup_common.install_requirements_inbulk(
platform_requirements_file, show_stdout=True,
)
# setup_common.install_requirements(platform_requirements_file, check_no_verify_flag=False, show_stdout=show_stdout)
if not no_run_accelerate:
setup_common.configure_accelerate(run_accelerate=False)
@ -31,10 +34,6 @@ if __name__ == '__main__':
exit(1)
setup_common.update_submodule()
# setup_common.clone_or_checkout(
# "https://github.com/kohya-ss/sd-scripts.git", tag_version, "sd-scripts"
# )
parser = argparse.ArgumentParser()
parser.add_argument('--platform-requirements-file', dest='platform_requirements_file', default='requirements_linux.txt', help='Path to the platform-specific requirements file')

View File

@ -54,7 +54,10 @@ def main_menu(platform_requirements_file):
# Upgrade pip if needed
setup_common.install('pip')
setup_common.install_requirements(platform_requirements_file, check_no_verify_flag=False, show_stdout=True)
setup_common.install_requirements_inbulk(
platform_requirements_file, show_stdout=True,
)
configure_accelerate()