mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
tests(mm): add tests for control adapter probe default settings
This commit is contained in:
parent
a10dccdd43
commit
2410ed689a
@ -3,7 +3,7 @@ from pathlib import Path
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from invokeai.backend.model_manager import BaseModelType, ModelRepoVariant
|
from invokeai.backend.model_manager import BaseModelType, ModelRepoVariant
|
||||||
from invokeai.backend.model_manager.probe import VaeFolderProbe
|
from invokeai.backend.model_manager.probe import ControlAdapterProbe, VaeFolderProbe
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
@ -28,3 +28,17 @@ def test_repo_variant(datadir: Path):
|
|||||||
probe = VaeFolderProbe(datadir / "vae" / "taesdxl-fp16")
|
probe = VaeFolderProbe(datadir / "vae" / "taesdxl-fp16")
|
||||||
repo_variant = probe.get_repo_variant()
|
repo_variant = probe.get_repo_variant()
|
||||||
assert repo_variant == ModelRepoVariant.FP16
|
assert repo_variant == ModelRepoVariant.FP16
|
||||||
|
|
||||||
|
|
||||||
|
def test_controlnet_t2i_default_settings():
|
||||||
|
should_be_canny = ControlAdapterProbe.get_default_settings("some_canny_model")
|
||||||
|
assert should_be_canny and should_be_canny.preprocessor == "canny_image_processor"
|
||||||
|
|
||||||
|
should_be_depth_anything = ControlAdapterProbe.get_default_settings("some_depth_model")
|
||||||
|
assert should_be_depth_anything and should_be_depth_anything.preprocessor == "depth_anything_image_processor"
|
||||||
|
|
||||||
|
should_be_dw_openpose = ControlAdapterProbe.get_default_settings("some_pose_model")
|
||||||
|
assert should_be_dw_openpose and should_be_dw_openpose.preprocessor == "dw_openpose_image_processor"
|
||||||
|
|
||||||
|
should_be_none = ControlAdapterProbe.get_default_settings("i like turtles")
|
||||||
|
assert should_be_none is None
|
||||||
|
Loading…
Reference in New Issue
Block a user