mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Reverting late imports to fix tests
This commit is contained in:
parent
ce465acf04
commit
c96ae4c331
@ -1,10 +1,7 @@
|
|||||||
from typing import Any, Callable, Literal, Union
|
from typing import Any, Callable, Literal, Union
|
||||||
|
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
from invokeai.app.invocations.baseinvocation import BaseInvocation, BaseInvocationOutput, InvocationContext
|
from invokeai.app.invocations.baseinvocation import BaseInvocation, BaseInvocationOutput, InvocationContext
|
||||||
from invokeai.app.invocations.image import ImageField
|
from invokeai.app.invocations.image import ImageField
|
||||||
from invokeai.app.services.events import EventServiceBase
|
|
||||||
from invokeai.app.services.graph import Edge, EdgeConnection
|
|
||||||
|
|
||||||
|
|
||||||
# Define test invocations before importing anything that uses invocations
|
# Define test invocations before importing anything that uses invocations
|
||||||
@ -83,6 +80,11 @@ class PromptCollectionTestInvocation(BaseInvocation):
|
|||||||
return PromptCollectionTestInvocationOutput(collection=self.collection.copy())
|
return PromptCollectionTestInvocationOutput(collection=self.collection.copy())
|
||||||
|
|
||||||
|
|
||||||
|
# Importing these at the top breaks previous tests
|
||||||
|
from invokeai.app.services.events import EventServiceBase # noqa: E402
|
||||||
|
from invokeai.app.services.graph import Edge, EdgeConnection # noqa: E402
|
||||||
|
|
||||||
|
|
||||||
def create_edge(from_id: str, from_field: str, to_id: str, to_field: str) -> Edge:
|
def create_edge(from_id: str, from_field: str, to_id: str, to_field: str) -> Edge:
|
||||||
return Edge(
|
return Edge(
|
||||||
source=EdgeConnection(node_id=from_id, field=from_field),
|
source=EdgeConnection(node_id=from_id, field=from_field),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user