Skip to content

Commit 0a7f8e1

Browse files
fix torch.cat requiring inputs to all be same dimensions (Comfy-Org#12673)
1 parent 35e9fce commit 0a7f8e1

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

comfy_extras/nodes_glsl.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -865,14 +865,15 @@ def _build_ui_output(
865865
cls, image_list: list[torch.Tensor], output_batch: torch.Tensor
866866
) -> dict[str, list]:
867867
"""Build UI output with input and output images for client-side shader execution."""
868-
combined_inputs = torch.cat(image_list, dim=0)
869-
input_images_ui = ui.ImageSaveHelper.save_images(
870-
combined_inputs,
871-
filename_prefix="GLSLShader_input",
872-
folder_type=io.FolderType.temp,
873-
cls=None,
874-
compress_level=1,
875-
)
868+
input_images_ui = []
869+
for img in image_list:
870+
input_images_ui.extend(ui.ImageSaveHelper.save_images(
871+
img,
872+
filename_prefix="GLSLShader_input",
873+
folder_type=io.FolderType.temp,
874+
cls=None,
875+
compress_level=1,
876+
))
876877

877878
output_images_ui = ui.ImageSaveHelper.save_images(
878879
output_batch,

0 commit comments

Comments
 (0)