Skip to content

Suggested connections #2582

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

Merged
merged 17 commits into from
Feb 29, 2024
Merged

Suggested connections #2582

merged 17 commits into from
Feb 29, 2024

Conversation

joeyballentine
Copy link
Member

This adds a simple "suggested connections" feature, which will display recommended nodes to be connected to in the node search panel when connecting from another node. This is granular to the input/output level, so different inputs and outputs can have different recommended nodes to connect to per node.

I figure this feature (if used correctly) will help newcomers who don't necessarily know what they should connect to. In the future, these same suggestions could be used to highlight the handles of suggested nodes in a special way to encourage connection as well, but for now it's just in the node search menu.

image

Currently I only added a few suggestions to and from Upscale Image. We'll probably want to think about what suggestions would be useful to add where.

@RunDevelopment
Copy link
Member

RunDevelopment commented Feb 17, 2024

I like the idea of suggestions a lot. As we get more and more nodes, we will basically need to make a search engine kind of thing in the future anyway. So these suggestions seems a like a good step towards that.

The only thing I don't like is that suggestions based on the specific inputs/outputs of specific nodes. This just doesn't scale. Imagine if we went all in with adding suggestions. We'd have to maintain multiple suggestions for each node.

I'd make suggestions based on data type + direction (input vs output). E.g. Load Image is a reasonable suggestion for pretty much all nodes that take an image, and Upscale Image is a good suggestion for pretty much all nodes that output a PyTorch model.

Edit: That said, we register suggested nodes for a data type based on inputs/outputs. E.g. the ImageOutput of Load Image could have a .suggest() function make this input as something to be suggested.


Future talk: To further improve suggestions, we need user data. Search engines give good results, because they use metrics (e.g. how many sites you visited from a search, how long you stayed, whether you changed the search query) to score their search results, and then use those score to adjust the rank of results.

With enough data, we could provide suggestions not just based on data type, or node, or node output/input, but even based on node + input data + connected nodes. That's the power of data.

That said, I'm not suggesting (hehe) that we should spy on our users. We basically just need a large collection of chains to use as data to get rankings. So we should probably encourage users to share more chains and make it easier to import shared chains. I imagine users would probably share a lot more chains/sub-chains if there was an easy way to copy'n'paste them directly from discord or elsewhere. We could then use that as a data source.

@joeyballentine joeyballentine merged commit 103df53 into main Feb 29, 2024
@joeyballentine joeyballentine deleted the suggested_connections branch February 29, 2024 13:15
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