mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(nodes): revert invocation_complete url hack
This commit is contained in:
parent
b77ccfaf32
commit
11bd932cba
@ -50,8 +50,6 @@ class EventServiceBase:
|
||||
result: dict,
|
||||
node: dict,
|
||||
source_node_id: str,
|
||||
image_url: Optional[str] = None,
|
||||
thumbnail_url: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Emitted when an invocation has completed"""
|
||||
self.__emit_session_event(
|
||||
@ -61,8 +59,6 @@ class EventServiceBase:
|
||||
node=node,
|
||||
source_node_id=source_node_id,
|
||||
result=result,
|
||||
image_url=image_url,
|
||||
thumbnail_url=thumbnail_url
|
||||
),
|
||||
)
|
||||
|
||||
|
@ -91,30 +91,12 @@ class DefaultInvocationProcessor(InvocationProcessorABC):
|
||||
graph_execution_state
|
||||
)
|
||||
|
||||
def is_image_output(obj: Any) -> TypeGuard[ImageOutput]:
|
||||
return obj.__class__ == ImageOutput
|
||||
|
||||
outputs_dict = outputs.dict()
|
||||
|
||||
if is_image_output(outputs):
|
||||
image_url = self.__invoker.services.images_new.get_url(
|
||||
ImageType.RESULT, outputs.image.image_name
|
||||
)
|
||||
thumbnail_url = self.__invoker.services.images_new.get_url(
|
||||
ImageType.RESULT, outputs.image.image_name, True
|
||||
)
|
||||
else:
|
||||
image_url = None
|
||||
thumbnail_url = None
|
||||
|
||||
# Send complete event
|
||||
self.__invoker.services.events.emit_invocation_complete(
|
||||
graph_execution_state_id=graph_execution_state.id,
|
||||
node=invocation.dict(),
|
||||
source_node_id=source_node_id,
|
||||
result=outputs_dict,
|
||||
image_url=image_url,
|
||||
thumbnail_url=thumbnail_url,
|
||||
result=outputs.dict(),
|
||||
)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
|
Loading…
Reference in New Issue
Block a user