Skip to content

feat(ui): add _all_ image outputs to gallery (including collections) #7957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 27, 2025

Conversation

psychedelicious
Copy link
Collaborator

Summary

Previously, when a node completed, we checked to see if its output was exactly an ImageOutput. If so, we add the image to the gallery. But there are multiple types of nodes that output images via some other output class. For example, an ImageCollectionOutput. When a node outputted one of these other classes, the UI wouldn't update the gallery. You'd have to refresh the page to see the image in gallery.

With the change in this PR, when a node completes, we check each of its output's properties. If any are an ImageField or list[ImageField], they are all added to the gallery. This covers ImageOutput, ImageCollectionOutput, and all other outputs that have an image.

Related Issues / Discussions

@skunkworxdark mentioned on discord: https://discord.com/channels/1020123559063990373/1049495067846524939/1365019122840371262

QA Instructions

  • Existing behaviour should be unchanged (i.e. Canvas outputs should still go to gallery, and single-image-outputting nodes should still go to gallery)
  • Nodes that output a collection of images should also go to gallery

Merge Plan

n/a

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@github-actions github-actions bot added the frontend PRs that change frontend files label Apr 25, 2025
@skunkworxdark
Copy link
Contributor

I tested this against my workflow, which outputs an ImageCollectionOutput, and it works well for me. It also continued to work with a single ImageOutput. However, I have not tried it with other combinations where images are incorporated.

@psychedelicious psychedelicious enabled auto-merge (rebase) April 27, 2025 23:46
@psychedelicious psychedelicious force-pushed the psyche/feat/ui/add-all-image-outputs branch from 3d8e105 to 385ed10 Compare April 27, 2025 23:46
@psychedelicious psychedelicious merged commit 3988128 into main Apr 27, 2025
12 checks passed
@psychedelicious psychedelicious deleted the psyche/feat/ui/add-all-image-outputs branch April 27, 2025 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend PRs that change frontend files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants