-
Notifications
You must be signed in to change notification settings - Fork 167
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
Allow dragging model library outputs onto existing nodes #1004
Conversation
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.
Can you add a playwright test to verify this feature works?
You can use the new util functions to get node ref for node position now and avoid hardcoded node position calculation. ComfyUI_frontend/browser_tests/ComfyPage.ts Lines 878 to 897 in 2531ec1
|
Followup-work: when dragging a model, highlight all nodes that can be dropped onto. |
2a8c8b7
to
5a14c88
Compare
Well. Let's add tests later when we refactor top level drag&drop in app.ts. |
for #1000
This also changes modelToNodeStore to be backed by a list, which allows multiple node type registrations - that way many different nodes can be registered as compatible with a given model class.
(Future todo: automatic registration from object_info maybe? We can easily identify which inputs have lists that exact match a given expected model type list, and arguably that can be abused to define compatibility. Or if not, maybe a field in the custom node in python side?)
Having the list that allows multiple entries also means we can in the future display a list of what node types are valid and let the user choose / set defaults / etc.
I've registered a second core loader node for checkpoint and lora, and validated that dragging onto either works. Naturally this also providers an easy test reference for other future usages of the multiple node options list.
Also added
quickRegister
to reduce the copypasta