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

logical flow control / image size output #2671

Closed
Fennecai opened this issue Mar 11, 2024 · 4 comments · Fixed by #2866
Closed

logical flow control / image size output #2671

Fennecai opened this issue Mar 11, 2024 · 4 comments · Fixed by #2866
Labels
enhancement New feature or request

Comments

@Fennecai
Copy link

Motivation
it would be nice to be able to have switch nodes automatically switch for complicated tasks based on logic. the other day i was upscaling a large number of images with no way to know the original resolution of every single one, but some were already decent resolution and didnt need an upscale, just a sharpening. It would be beneficial to have this so i could set up a thing where if the image size is already bigger than a certain amount, it would not upscale it but route it to a sharpening part of the graph instead.

Description
this suggestion is kindof 3 different but related things:

  1. the choice of which output on a switch node should have an input that works based on an int number (1 = A, 2 = B etc)
  2. there should be a math comparison node that works like an IF statement depending on the comparison (if input A == input B then C else D, and perhaps the comparison could be configured by the user to be ==, >= , <=, etc.)
  3. load image node / load images node should have an output of width / height size in pixels

Alternatives
I haven't thought of any alternative suggestions that would be beneficial on a broader scale; however one alternative for my specific use case would be to just detect in upscaling nodes if the resulting image would be a ludicrous size like 8192 pixels wide and skip the upscale in that case.

However, i think having numerical logic / automatic flow control would be more applicable for more uses.

@mamorett
Copy link

+1, I think this would be a super useful feature.

@RunDevelopment RunDevelopment added the enhancement New feature or request label May 17, 2024
@joeyballentine
Copy link
Member

load image node / load images node should have an output of width / height size in pixels

Totally missed this before, but FYI there's the get dimensions node for this purpose

@mamorett
Copy link

hi @joeyballentine , you are right. However does not seem possible to perform logic operation on that information. For example, move ahead with a rescale if the width is less than 1024, or skip otherwise, etc.

@joeyballentine
Copy link
Member

Correct, that is not possible. I was just letting you know you can already get the dimensions of an image is all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants