Skip to content

Make view image node image inputs optional #2681

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

Closed
wants to merge 1 commit into from
Closed

Conversation

joeyballentine
Copy link
Member

This is a draft because I'm not sure how to fix this error that results from this change:

image

@RunDevelopment
Copy link
Member

What's the motivation here?

@joeyballentine
Copy link
Member Author

@RunDevelopment
Copy link
Member

I see. Not a fan then.

You essentially made View Image a node with side effects that is allowed to do nothing. This doesn't break anything, but it messes with the way we handle side effects. The problem is that nodes with side effects are assumed to, well, have side effects. But you made View Image have side effects conditionally. This has consequences.
E.g. the warning we show in the UI when a chain has no side effect nodes is effectual now. Having a single View Image node anyway in the chain will now suppress this because there is technically a node that is executed.

I see 3 possible solutions to address this problem:

  1. Add a property that tells the frontend that a node with side effects can always safely be removed if it doesn't have inputs. The frontend already removes disabled and unused nodes, so we just extend this functionality to remove unused View Image nodes as well. (This would also be useful for Copy To Clipboard.)
  2. Same as 1, but no property, just do it for all side-effect nodes. Basically, if a side-effect node has no inputs, remove it.
  3. Blame the user. They could have just disabled or removed the node.

While option 3 is tempting, option 1 and 2 have their uses. What do you think we should go with?

@joeyballentine
Copy link
Member Author

I think I'm personally a fan of option 2. To me, it's an ok assumption to make that this can be applied automatically.

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

Successfully merging this pull request may close these issues.

2 participants