Add OUTPUT_NODE=True and return ui.images dict for preview

This commit is contained in:
2026-04-22 14:52:26 -07:00
parent e5e19c4dbc
commit 3949ee5cc1
3 changed files with 2 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -105,7 +105,7 @@ class CompassImageLoader:
RETURN_TYPES = ("IMAGE", "STRING", "STRING", "INT", "INT", "INT")
RETURN_NAMES = ("IMAGE", "path", "direction", "width", "height", "frame_count")
FUNCTION = "load_images"
OUTPUT_NODE = False
OUTPUT_NODE = True
def load_images(
self, directory, direction, modality, frame=None, width=0, height=0,
@@ -164,7 +164,7 @@ class CompassImageLoader:
tensors[0] if len(tensors) == 1 else torch.cat(tensors, dim=0)
)
return (image_batch, output_path, resolved_direction, final_w, final_h, len(selected_files))
return {"ui": {"images": [{"filename": os.path.basename(output_path), "subfolder": "", "type": "input"}]}, "result": (image_batch, output_path, resolved_direction, final_w, final_h, len(selected_files))}
@classmethod
def IS_CHANGED(