-
-
Notifications
You must be signed in to change notification settings - Fork 322
Create "Resolutions" Node #2610
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
Conversation
This node provides chaiNNer with a selection of common, and at times industry specific, resolution presets to use as "Number" sources for further use in Chains to help drive other parameters and nodes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this idea for a node! It's simple and gets rid of magic constants in our users' chains.
I kind of hate how this node gets type information due to our execution of starting nodes, but it works, so why change it :)
backend/src/packages/chaiNNer_standard/utility/value/formats.py
Outdated
Show resolved
Hide resolved
backend/src/packages/chaiNNer_standard/utility/value/formats.py
Outdated
Show resolved
Hide resolved
backend/src/packages/chaiNNer_standard/utility/value/formats.py
Outdated
Show resolved
Hide resolved
backend/src/packages/chaiNNer_standard/utility/value/formats.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Michael Schmidt <msrd0000@gmail.com>
Co-authored-by: Michael Schmidt <msrd0000@gmail.com>
out with the old....
This node comes with a bunch of presets to help start the user set up their respective chains.
Linting
backend/src/packages/chaiNNer_standard/utility/value/resolutions.py
Outdated
Show resolved
Hide resolved
Adds in assert as requested and adds in support for a custom/user defined resolution, to help keep all of the "magic" numbers pertaining to widht/height in one node.
Sync up all types to int
backend/src/packages/chaiNNer_standard/utility/value/resolutions.py
Outdated
Show resolved
Hide resolved
backend/src/packages/chaiNNer_standard/utility/value/resolutions.py
Outdated
Show resolved
Hide resolved
backend/src/packages/chaiNNer_standard/utility/value/resolutions.py
Outdated
Show resolved
Hide resolved
Remember when I said that? Yeah, we need to change this now... Since you added custom resolutions, the Resolutions node now has 2 number inputs which prevent it from being a starting node. So the node no longer shows the exact resolutions on its outputs. There are 2 ways around this:
Which option you choose should depend on whether you want the "Width" and "Height" input to be connectable. If this isn't necessary, then go with option 1. If you think they should be connectable, then go with option 2 and I'll help you to get the output types right. |
…ns.py Co-authored-by: Joey Ballentine <34788790+joeyballentine@users.noreply.github.com>
…ns.py Co-authored-by: Joey Ballentine <34788790+joeyballentine@users.noreply.github.com>
…ns.py Co-authored-by: Joey Ballentine <34788790+joeyballentine@users.noreply.github.com>
Option 1 it is! |
Adds has_handle=False to remove the inputs into the Width/Height as this is a starter node.
This node provides chaiNNer with a selection of common, and at times industry specific, resolution presets to use as "Number" sources for further use in Chains to help drive other parameters and nodes.