-
-
Notifications
You must be signed in to change notification settings - Fork 283
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
Prevent restricted types from being connected until valid type is determined #928
Comments
Could you give an example? Right now, I image a case with 3 nodes A, B, and C. C only accepts images with exactly 3 channels. B outputs an image with the same number of channels as its input image. A produces an image with 1 channel. If you connect B to C, and after that A to B, then chainner will allow the connections, but the chain will now error. Is this what you mean? |
Yes exactly. If you connected A to B first, then you wouldn't be allowed to connect B to C. But in the way you described, you can bypass the restriction and get a runtime error |
That only applies when the output type is determined by the input given (and therefore has a never type). If for example you were doing a restriction on model type and the output is merely determined by the models scale, then this would not apply. |
This may or may not be a good idea, but right now you can connect a node without a type to a node with a restricted type, then do things that determine that node's type to something that would normally not let you connect it.
So basically I just think we shouldn't allow connections unless the type is determined to be a valid type.
This may cause problems for untypable things though, so I don't know if it's actually a good idea to do.
The text was updated successfully, but these errors were encountered: