diff --git a/src/agentscope/web/workstation/workflow_node.py b/src/agentscope/web/workstation/workflow_node.py index 412f13773..7d288792e 100644 --- a/src/agentscope/web/workstation/workflow_node.py +++ b/src/agentscope/web/workstation/workflow_node.py @@ -860,7 +860,10 @@ class ImageSynthesisNode(WorkflowNode): def _post_init(self) -> None: super()._post_init() - self.pipeline = partial(image_synthesis, **self.opt_kwargs) + self.function_executor = partial(image_synthesis, **self.opt_kwargs) + + def __call__(self, x: dict = None) -> dict: + return self.function_executor(x) def compile(self) -> dict: return { @@ -883,12 +886,15 @@ class ImageCompositionNode(WorkflowNode): def _post_init(self) -> None: super()._post_init() - self.pipeline = partial(stitch_images_with_grid, **self.opt_kwargs) + self.function_executor = partial( + stitch_images_with_grid, + **self.opt_kwargs, + ) def __call__(self, x: list = None) -> dict: if isinstance(x, dict): x = [x] - return self.pipeline(x) + return self.function_executor(x) def compile(self) -> dict: return { @@ -911,13 +917,13 @@ class ImageMotionNode(WorkflowNode): def _post_init(self) -> None: super()._post_init() - self.pipeline = partial( + self.function_executor = partial( create_video_or_gif_from_image, **self.opt_kwargs, ) def __call__(self, x: dict = None) -> dict: - return self.pipeline(x) + return self.function_executor(x) def compile(self) -> dict: return { @@ -941,10 +947,10 @@ class VideoCompositionNode(WorkflowNode): def _post_init(self) -> None: super()._post_init() - self.pipeline = partial(merge_videos, **self.opt_kwargs) + self.function_executor = partial(merge_videos, **self.opt_kwargs) def __call__(self, x: dict = None) -> dict: - return self.pipeline(x) + return self.function_executor(x) def compile(self) -> dict: return {