Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
Fix runner test session stubs
JPPhotobd039f9d67ae
diff --git a/tests/app/services/workflow_call_test_utils.py b/tests/app/services/workflow_call_test_utils.pyindex 1cdd66216f..22ae2f8fbe 100644--- a/tests/app/services/workflow_call_test_utils.py+++ b/tests/app/services/workflow_call_test_utils.py@@ -863,13 +863,28 @@ def _build_workflow_runner(monkeypatch: pytest.MonkeyPatch, session_queue=None):def _build_queue_item(invocation: BaseInvocation):+ class Session:+ prepared_source_mapping = {invocation.id: invocation.id}++ @staticmethod+ def get_execution_ref(node_id: str, *, effect_count: int | None = None):+ return SimpleNamespace(frame=SimpleNamespace(iteration_path=()))++ @staticmethod+ def apply(execution_ref, output, effects=None, *, effect_count: int | None = None):+ return []++ @staticmethod+ def set_node_error(node_id: str, error: str) -> None:+ pass+return type("QueueItem",(),{"item_id": 1,"session_id": "test-session",- "session": type("Session", (), {"prepared_source_mapping": {invocation.id: invocation.id}})(),+ "session": Session(),},)()@@ -1160,6 +1175,7 @@ def test_run_node_does_not_swallow_sigint_in_subprocess() -> None:import timefrom contextlib import contextmanagerfrom threading import Event+ from types import SimpleNamespaceimport invokeai.app.services.session_processor.session_processor_default as session_processor_defaultfrom invokeai.app.invocations.baseinvocation import (@@ -1226,13 +1242,29 @@ def test_run_node_does_not_swallow_sigint_in_subprocess() -> None:)invocation = SigIntDuringNodeInvocation(id="node")++ class Session:+ prepared_source_mapping = {invocation.id: invocation.id}++ @staticmethod+ def get_execution_ref(node_id: str, *, effect_count: int | None = None):+ return SimpleNamespace(frame=SimpleNamespace(iteration_path=()))++ @staticmethod+ def apply(execution_ref, output, effects=None, *, effect_count: int | None = None):+ return []++ @staticmethod+ def set_node_error(node_id: str, error: str) -> None:+ pass+queue_item = type("QueueItem",(),{"item_id": 1,"session_id": "test-session",- "session": type("Session", (), {"prepared_source_mapping": {invocation.id: invocation.id}})(),+ "session": Session(),},)()