From 4094813f8ddebb3f591f7294d389376a33c72d61 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Wed, 24 Apr 2024 09:53:41 -0700 Subject: [PATCH] Lint --- README.md | 4 ++-- docker/amd/docker-compose.yml | 15 ++++++--------- docker/cpu/docker-compose.yml | 15 ++++++--------- docker/intel/docker-compose.yml | 19 ++++++++----------- docker/nvidia/docker-compose.yml | 19 ++++++++----------- modules/models.py | 2 +- 6 files changed, 31 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 04c4cbb1..330ae8ce 100644 --- a/README.md +++ b/README.md @@ -112,8 +112,8 @@ Requirements file to use: | NVIDIA | `requirements.txt` | | AMD | `requirements_amd.txt` | | CPU only | `requirements_cpu_only.txt` | -| Apple | Intel | `requirements_apple_intel.txt` | -| Apple | Apple Silicon | `requirements_apple_silicon.txt` | +| Apple Intel | `requirements_apple_intel.txt` | +| Apple Silicon | `requirements_apple_silicon.txt` | ### Start the web UI diff --git a/docker/amd/docker-compose.yml b/docker/amd/docker-compose.yml index 8f0ff3a3..58c9911f 100644 --- a/docker/amd/docker-compose.yml +++ b/docker/amd/docker-compose.yml @@ -5,16 +5,13 @@ services: context: . args: # Requirements file to use: - # | GPU | CPU | requirements file to use | + # | GPU | requirements file to use | # |--------|---------|---------| - # | NVIDIA | has AVX2 | `requirements.txt` | - # | NVIDIA | no AVX2 | `requirements_noavx2.txt` | - # | AMD | has AVX2 | `requirements_amd.txt` | - # | AMD | no AVX2 | `requirements_amd_noavx2.txt` | - # | CPU only | has AVX2 | `requirements_cpu_only.txt` | - # | CPU only | no AVX2 | `requirements_cpu_only_noavx2.txt` | - # | Apple | Intel | `requirements_apple_intel.txt` | - # | Apple | Apple Silicon | `requirements_apple_silicon.txt` | + # | NVIDIA | `requirements.txt` | + # | AMD | `requirements_amd.txt` | + # | CPU only | `requirements_cpu_only.txt` | + # | Apple Intel | `requirements_apple_intel.txt` | + # | Apple Silicon | `requirements_apple_silicon.txt` | # Default: requirements.txt` # BUILD_REQUIREMENTS: requirements.txt diff --git a/docker/cpu/docker-compose.yml b/docker/cpu/docker-compose.yml index 0020e9e6..4432d129 100644 --- a/docker/cpu/docker-compose.yml +++ b/docker/cpu/docker-compose.yml @@ -5,16 +5,13 @@ services: context: . args: # Requirements file to use: - # | GPU | CPU | requirements file to use | + # | GPU | requirements file to use | # |--------|---------|---------| - # | NVIDIA | has AVX2 | `requirements.txt` | - # | NVIDIA | no AVX2 | `requirements_noavx2.txt` | - # | AMD | has AVX2 | `requirements_amd.txt` | - # | AMD | no AVX2 | `requirements_amd_noavx2.txt` | - # | CPU only | has AVX2 | `requirements_cpu_only.txt` | - # | CPU only | no AVX2 | `requirements_cpu_only_noavx2.txt` | - # | Apple | Intel | `requirements_apple_intel.txt` | - # | Apple | Apple Silicon | `requirements_apple_silicon.txt` | + # | NVIDIA | `requirements.txt` | + # | AMD | `requirements_amd.txt` | + # | CPU only | `requirements_cpu_only.txt` | + # | Apple Intel | `requirements_apple_intel.txt` | + # | Apple Silicon | `requirements_apple_silicon.txt` | # Default: requirements.txt` # BUILD_REQUIREMENTS: requirements.txt diff --git a/docker/intel/docker-compose.yml b/docker/intel/docker-compose.yml index 5656e880..d737626b 100644 --- a/docker/intel/docker-compose.yml +++ b/docker/intel/docker-compose.yml @@ -5,22 +5,19 @@ services: context: . args: # Requirements file to use: - # | GPU | CPU | requirements file to use | + # | GPU | requirements file to use | # |--------|---------|---------| - # | NVIDIA | has AVX2 | `requirements.txt` | - # | NVIDIA | no AVX2 | `requirements_noavx2.txt` | - # | AMD | has AVX2 | `requirements_amd.txt` | - # | AMD | no AVX2 | `requirements_amd_noavx2.txt` | - # | CPU only | has AVX2 | `requirements_cpu_only.txt` | - # | CPU only | no AVX2 | `requirements_cpu_only_noavx2.txt` | - # | Apple | Intel | `requirements_apple_intel.txt` | - # | Apple | Apple Silicon | `requirements_apple_silicon.txt` | + # | NVIDIA | `requirements.txt` | + # | AMD | `requirements_amd.txt` | + # | CPU only | `requirements_cpu_only.txt` | + # | Apple Intel | `requirements_apple_intel.txt` | + # | Apple Silicon | `requirements_apple_silicon.txt` | # Default: requirements.txt` # BUILD_REQUIREMENTS: requirements.txt - + # Extension requirements to build: # BUILD_EXTENSIONS: - + # specify which cuda version your card supports: https://developer.nvidia.com/cuda-gpus TORCH_CUDA_ARCH_LIST: ${TORCH_CUDA_ARCH_LIST:-7.5} BUILD_EXTENSIONS: ${BUILD_EXTENSIONS:-} diff --git a/docker/nvidia/docker-compose.yml b/docker/nvidia/docker-compose.yml index f16c7e70..6d18b072 100644 --- a/docker/nvidia/docker-compose.yml +++ b/docker/nvidia/docker-compose.yml @@ -5,22 +5,19 @@ services: context: . args: # Requirements file to use: - # | GPU | CPU | requirements file to use | + # | GPU | requirements file to use | # |--------|---------|---------| - # | NVIDIA | has AVX2 | `requirements.txt` | - # | NVIDIA | no AVX2 | `requirements_noavx2.txt` | - # | AMD | has AVX2 | `requirements_amd.txt` | - # | AMD | no AVX2 | `requirements_amd_noavx2.txt` | - # | CPU only | has AVX2 | `requirements_cpu_only.txt` | - # | CPU only | no AVX2 | `requirements_cpu_only_noavx2.txt` | - # | Apple | Intel | `requirements_apple_intel.txt` | - # | Apple | Apple Silicon | `requirements_apple_silicon.txt` | + # | NVIDIA | `requirements.txt` | + # | AMD | `requirements_amd.txt` | + # | CPU only | `requirements_cpu_only.txt` | + # | Apple Intel | `requirements_apple_intel.txt` | + # | Apple Silicon | `requirements_apple_silicon.txt` | # Default: requirements.txt` # BUILD_REQUIREMENTS: requirements.txt - + # Extension requirements to build: # BUILD_EXTENSIONS: - + # specify which cuda version your card supports: https://developer.nvidia.com/cuda-gpus TORCH_CUDA_ARCH_LIST: ${TORCH_CUDA_ARCH_LIST:-7.5} BUILD_EXTENSIONS: ${BUILD_EXTENSIONS:-} diff --git a/modules/models.py b/modules/models.py index cf4e4634..64cbffe1 100644 --- a/modules/models.py +++ b/modules/models.py @@ -194,7 +194,7 @@ def huggingface_loader(model_name): params['torch_dtype'] = torch.float32 else: params['device_map'] = 'auto' - if x:= get_max_memory_dict(): + if x := get_max_memory_dict(): params['max_memory'] = x if shared.args.load_in_4bit: