From 7ea420aef1a1bfe0e38e30a6881fdf8ae763a863 Mon Sep 17 00:00:00 2001 From: aszc-dev Date: Fri, 17 May 2024 14:24:26 +0200 Subject: [PATCH] Restructure tests directory --- tests/{ => integration}/__init__.py | 0 .../workflows/e2e-1.5-basic-conversion.json | 182 ++++++++++++++++++ tests/unit/__init__.py | 0 tests/{ => unit}/test_chunks.py | 0 tests/{ => unit}/test_controlnet.py | 0 5 files changed, 182 insertions(+) rename tests/{ => integration}/__init__.py (100%) create mode 100644 tests/integration/workflows/e2e-1.5-basic-conversion.json create mode 100644 tests/unit/__init__.py rename tests/{ => unit}/test_chunks.py (100%) rename tests/{ => unit}/test_controlnet.py (100%) diff --git a/tests/__init__.py b/tests/integration/__init__.py similarity index 100% rename from tests/__init__.py rename to tests/integration/__init__.py diff --git a/tests/integration/workflows/e2e-1.5-basic-conversion.json b/tests/integration/workflows/e2e-1.5-basic-conversion.json new file mode 100644 index 0000000..7c2ce89 --- /dev/null +++ b/tests/integration/workflows/e2e-1.5-basic-conversion.json @@ -0,0 +1,182 @@ +{ + "3": { + "inputs": { + "seed": 0, + "steps": 20, + "cfg": 8, + "sampler_name": "dpmpp_2m", + "scheduler": "karras", + "denoise": 1, + "model": [ + "4", + 0 + ], + "positive": [ + "6", + 0 + ], + "negative": [ + "7", + 0 + ], + "latent_image": [ + "5", + 0 + ] + }, + "class_type": "KSampler", + "_meta": { + "title": "KSampler" + } + }, + "4": { + "inputs": { + "ckpt_name": "dreamshaper_8.safetensors" + }, + "class_type": "CheckpointLoaderSimple", + "_meta": { + "title": "Load Checkpoint" + } + }, + "5": { + "inputs": { + "width": 512, + "height": 512, + "batch_size": 1 + }, + "class_type": "EmptyLatentImage", + "_meta": { + "title": "Empty Latent Image" + } + }, + "6": { + "inputs": { + "text": "beautiful scenery nature glass bottle landscape, purple galaxy bottle", + "clip": [ + "4", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "7": { + "inputs": { + "text": "text, watermark", + "clip": [ + "4", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "8": { + "inputs": { + "samples": [ + "3", + 0 + ], + "vae": [ + "4", + 2 + ] + }, + "class_type": "VAEDecode", + "_meta": { + "title": "VAE Decode" + } + }, + "9": { + "inputs": { + "filename_prefix": "E2E-1.5-MPS", + "images": [ + "8", + 0 + ] + }, + "class_type": "SaveImage", + "_meta": { + "title": "Save Image" + } + }, + "10": { + "inputs": { + "ckpt_name": "dreamshaper_8.safetensors", + "model_version": "SD15", + "height": 512, + "width": 512, + "batch_size": 1, + "attention_implementation": "SPLIT_EINSUM", + "compute_unit": "CPU_AND_NE", + "controlnet_support": false + }, + "class_type": "Core ML Converter", + "_meta": { + "title": "Convert Checkpoint to Core ML" + } + }, + "11": { + "inputs": { + "seed": 0, + "steps": 20, + "cfg": 8, + "sampler_name": "dpmpp_2m", + "scheduler": "karras", + "denoise": 1, + "coreml_model": [ + "10", + 0 + ], + "positive": [ + "6", + 0 + ], + "negative": [ + "7", + 0 + ], + "latent_image": [ + "5", + 0 + ] + }, + "class_type": "CoreMLSampler", + "_meta": { + "title": "Core ML Sampler" + } + }, + "13": { + "inputs": { + "samples": [ + "11", + 0 + ], + "vae": [ + "4", + 2 + ] + }, + "class_type": "VAEDecode", + "_meta": { + "title": "VAE Decode" + } + }, + "14": { + "inputs": { + "filename_prefix": "E2E-1.5-CoreML", + "images": [ + "13", + 0 + ] + }, + "class_type": "SaveImage", + "_meta": { + "title": "Save Image" + } + } +} diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_chunks.py b/tests/unit/test_chunks.py similarity index 100% rename from tests/test_chunks.py rename to tests/unit/test_chunks.py diff --git a/tests/test_controlnet.py b/tests/unit/test_controlnet.py similarity index 100% rename from tests/test_controlnet.py rename to tests/unit/test_controlnet.py