Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion invokeai/backend/util/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def install_and_load_model(
This is intended as a utility function for tests.

Args:
mm2_model_manager (ModelManagerServiceBase): The model manager
model_manager (ModelManagerServiceBase): The model manager
model_path_id_or_url (Union[str, Path]): The path, HF ID, URL, etc. where the model can be installed from if it
is not already installed.
model_name (str): The model name, forwarded to ModelManager.get_model(...).
Expand Down
6 changes: 3 additions & 3 deletions tests/backend/ip_adapter/test_ip_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ def build_dummy_sd15_unet_input(torch_device):
],
)
@pytest.mark.slow
def test_ip_adapter_unet_patch(model_params, model_installer, torch_device):
def test_ip_adapter_unet_patch(model_params, mm2_model_manager, torch_device):
"""Smoke test that IP-Adapter weights can be loaded and used to patch a UNet."""
ip_adapter_info = install_and_load_model(
model_installer=model_installer,
model_manager=mm2_model_manager,
model_path_id_or_url=model_params["ip_adapter_model_id"],
model_name=model_params["ip_adapter_model_name"],
base_model=model_params["base_model"],
model_type=ModelType.IPAdapter,
)

unet_info = install_and_load_model(
model_installer=model_installer,
model_manager=mm2_model_manager,
model_path_id_or_url=model_params["unet_model_id"],
model_name=model_params["unet_model_name"],
base_model=model_params["base_model"],
Expand Down
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# without needing to explicitly import them. (https://docs.pytest.org/en/6.2.x/fixture.html)


# We import the model_installer and torch_device fixtures here so that they can be used by all tests. Flake8 does not
# We import the torch_device fixture here so that it can be used by all tests. Flake8 does not
# play well with fixtures (F401 and F811), so this is cleaner than importing in all files that use these fixtures.
import logging
import shutil
Expand Down Expand Up @@ -32,6 +32,7 @@
from invokeai.app.services.video_records.video_records_sqlite import SqliteVideoRecordStorage
from invokeai.app.services.workflow_records.workflow_records_sqlite import SqliteWorkflowRecordsStorage
from invokeai.backend.util.logging import InvokeAILogger
from invokeai.backend.util.test_utils import torch_device # noqa: F401
from tests.backend.model_manager.model_manager_fixtures import * # noqa: F403
from tests.fixtures.sqlite_database import create_mock_sqlite_database # noqa: F401
from tests.test_nodes import TestEventService
Expand Down