Skip to content
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

fix(ui): disable width and height output on image batch output #7361

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

psychedelicious
Copy link
Collaborator

Summary

There's a technical challenge with outputting these values directly. ImageField does not store them, so the batch's ImageField collection does not have width and height for each image.

In order to set up the batch and pass along width and height for each image, we'd need to make a network request for each image when the user clicks Invoke. It would often be cached, but this will eventually create a scaling issue and poor user experience.

As a very simple workaround, users can output the batch image output into an Image Primitive node to access the width and height.

This change is implemented by adding some simple special handling when parsing the output fields for the image_batch node.

I'll keep this situation in mind when extending the batching system to other field types.

Related Issues / Discussions

https://discord.com/channels/1020123559063990373/1149506274971631688/1308789783560196157

QA Instructions

You should no longer see width and height as output fields for the Image Batch node.

Merge Plan

n/a

Checklist

  • The PR has a short but descriptive title, suitable for a changelog

There's a technical challenge with outputting these values directly. `ImageField` does not store them, so the batch's `ImageField` collection does not have width and height for each image.

In order to set up the batch and pass along width and height for each image, we'd need to make a network request for each image when the user clicks Invoke. It would often be cached, but this will eventually create a scaling issue and poor user experience.

As a very simple workaround, users can output the batch image output into an `Image Primitive` node to access the width and height.

This change is implemented by adding some simple special handling when parsing the output fields for the `image_batch` node.

I'll keep this situation in mind when extending the batching system to other field types.
@github-actions github-actions bot added the frontend PRs that change frontend files label Nov 20, 2024
@maryhipp maryhipp merged commit ef8eded into main Nov 20, 2024
14 checks passed
@maryhipp maryhipp deleted the psyche/fix/ui/disable-w-h-batch-output branch November 20, 2024 16:16
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.

2 participants