Skip to content

Commit

Permalink
Update HDD requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
HonzaCuhel committed Jan 13, 2024
1 parent 86c74a9 commit e66bfd4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
30 changes: 15 additions & 15 deletions tests/integration/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _check_wrong_value(cmd: str):
try:
subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
print(f"Failed to run cmd: {cmd}\nError: {e.output.decode()}")
raise ValueError(e.output.decode()) from e


# =========================================================
Expand Down Expand Up @@ -221,8 +221,8 @@ def test_cuda_simple_sdxl_turbo_detection_pipeline():


@pytest.mark.skipif(
total_memory < 16 or total_disk_space < 16,
reason="Test requires at least 16GB of RAM and 16GB of HDD",
total_memory < 16 or total_disk_space < 25,
reason="Test requires at least 16GB of RAM and 25GB of HDD",
)
def test_cpu_simple_sdxl_detection_pipeline():
# Define target folder
Expand All @@ -243,8 +243,8 @@ def test_cpu_simple_sdxl_detection_pipeline():


@pytest.mark.skipif(
not torch.cuda.is_available() or total_memory < 16 or total_disk_space < 16,
reason="Test requires GPU, at least 16GB of RAM and 16GB of HDD",
not torch.cuda.is_available() or total_memory < 16 or total_disk_space < 25,
reason="Test requires GPU, at least 16GB of RAM and 25GB of HDD",
)
def test_cuda_simple_sdxl_detection_pipeline():
# Define target folder
Expand Down Expand Up @@ -311,7 +311,7 @@ def test_cuda_lm_sdxl_turbo_detection_pipeline():


@pytest.mark.skipif(
total_memory < 28, reason="Test requires at least 28GB of RAM for running on CPU"
total_memory < 28 or total_disk_space < 25, reason="Test requires at least 28GB of RAM and 25GB of HDD for running on CPU"
)
def test_cpu_lm_sdxl_detection_pipeline():
# Define target folder
Expand All @@ -332,8 +332,8 @@ def test_cpu_lm_sdxl_detection_pipeline():


@pytest.mark.skipif(
total_memory < 16 or not torch.cuda.is_available(),
reason="Test requires at least 16GB of RAM and CUDA support",
total_memory < 16 or not torch.cuda.is_available() or total_disk_space < 25,
reason="Test requires at least 16GB of RAM, CUDA support and 25GB of HDD",
)
def test_cuda_lm_sdxl_detection_pipeline():
# Define target folder
Expand Down Expand Up @@ -396,8 +396,8 @@ def test_cuda_simple_sdxl_turbo_classification_pipeline():


@pytest.mark.skipif(
total_memory < 16 or total_disk_space < 16,
reason="Test requires at least 16GB of RAM and 16GB of HDD",
total_memory < 16 or total_disk_space < 25,
reason="Test requires at least 16GB of RAM and 25GB of HDD",
)
def test_cpu_simple_sdxl_classification_pipeline():
# Define target folder
Expand All @@ -419,8 +419,8 @@ def test_cpu_simple_sdxl_classification_pipeline():


@pytest.mark.skipif(
not torch.cuda.is_available() or total_memory < 16 or total_disk_space < 16,
reason="Test requires GPU, at least 16GB of RAM and 16GB of HDD",
not torch.cuda.is_available() or total_memory < 16 or total_disk_space < 25,
reason="Test requires GPU, at least 16GB of RAM and 25GB of HDD",
)
def test_cuda_simple_sdxl_classification_pipeline():
# Define target folder
Expand Down Expand Up @@ -490,7 +490,7 @@ def test_cuda_lm_sdxl_turbo_classification_pipeline():


@pytest.mark.skipif(
total_memory < 28, reason="Test requires at least 28GB of RAM for running on CPU"
total_memory < 28 or total_disk_space < 25, reason="Test requires at least 28GB of RAM and 25GB of HDD for running on CPU"
)
def test_cpu_lm_sdxl_classification_pipeline():
# Define target folder
Expand All @@ -512,8 +512,8 @@ def test_cpu_lm_sdxl_classification_pipeline():


@pytest.mark.skipif(
total_memory < 16 or not torch.cuda.is_available(),
reason="Test requires at least 16GB of RAM and CUDA support",
total_memory < 16 or not torch.cuda.is_available() or total_disk_space < 25,
reason="Test requires at least 16GB of RAM, CUDA support and 25GB of HDD",
)
def test_cuda_lm_sdxl_classification_pipeline():
# Define target folder
Expand Down
8 changes: 4 additions & 4 deletions tests/unittests/test_image_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ def test_cpu_sdxl_image_generator():


@pytest.mark.skipif(
not torch.cuda.is_available() or total_memory < 16 or total_disk_space < 16,
reason="Test requires GPU, at least 16GB of RAM and 16GB of HDD",
not torch.cuda.is_available() or total_memory < 16 or total_disk_space < 25,
reason="Test requires GPU, at least 16GB of RAM and 25GB of HDD",
)
def test_cuda_sdxl_turbo_image_generator():
_check_image_generator(StableDiffusionTurboImageGenerator, "cuda")


@pytest.mark.skipif(
total_memory < 16 or total_disk_space < 16,
reason="Test requires at least 16GB of RAM and 16GB of HDD",
total_memory < 16 or total_disk_space < 25,
reason="Test requires at least 16GB of RAM and 25GB of HDD",
)
def test_cpu_sdxl_turbo_image_generator():
_check_image_generator(StableDiffusionTurboImageGenerator, "cpu")

0 comments on commit e66bfd4

Please sign in to comment.