Skip to content
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

Migrate custom nodes #474

Merged
merged 7 commits into from
Dec 23, 2024
Merged

Migrate custom nodes #474

merged 7 commits into from
Dec 23, 2024

Conversation

pythongosssss
Copy link
Member

@pythongosssss pythongosssss commented Dec 12, 2024

Adds custom node migration using manager snapshots

┆Issue is synchronized with this Notion page by Unito

Copy link

socket-security bot commented Dec 12, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@types/[email protected] None 0 10.4 kB types
npm/[email protected] filesystem 0 54.4 kB raszi

🚮 Removed packages: npm/[email protected], npm/[email protected]

View full report↗︎

Copy link
Member

@huchenlei huchenlei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't us add anther custom_nodes path in the yaml file that links folder and reinstall their dependencies in the new python environment? Currently this restoration of snapshots seems a bit award as it requires the python env to be ready first.

@pythongosssss
Copy link
Member Author

I don't think that is a very good method as:

  1. at some point I want to remove my old manual installation and just have the desktop, where I would then need to manually reinstall them all
  2. if I update custom nodes in one place, that will install the dependencies in one env, I then swap to the other installation and the custom nodes no longer work as I didn't update the nodes here, in this so new deps weren't installed

I think having the same source for custom nodes between two different environments, with different comfy versions, packages, etc will cause more trouble than it is worth

@huchenlei
Copy link
Member

I don't think that is a very good method as:

  1. at some point I want to remove my old manual installation and just have the desktop, where I would then need to manually reinstall them all
  2. if I update custom nodes in one place, that will install the dependencies in one env, I then swap to the other installation and the custom nodes no longer work as I didn't update the nodes here, in this so new deps weren't installed

I think having the same source for custom nodes between two different environments, with different comfy versions, packages, etc will cause more trouble than it is worth

How about we directly copy the migration source's custom_nodes folder? This would help preserving data some custom nodes saved in their own folder.

src/main-process/comfyDesktopApp.ts Outdated Show resolved Hide resolved
@robinjhuang
Copy link
Member

If we copy over the custom_nodes directory, we could use the reinstall command by passing in a list of custom nodes. @ltdrdata do you have opinion on what would be the best mechanism to "migrate" over custom nodes from another install?

@robinjhuang
Copy link
Member

@pythongosssss FYI I synced with @ltdrdata and he mentioned he is planning to improve snapshot to also capture python package information. So I think we are good to go with the current approach.

@robinjhuang robinjhuang self-requested a review December 19, 2024 18:43
@pythongosssss pythongosssss requested a review from a team as a code owner December 19, 2024 19:54
Copy link
Member

@huchenlei huchenlei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you split the global toast change to a separate PR? I feel like having 2 levels of toast now can be confusing. For the custom node migration error reporting, we can fall back to use a electron system level message alert for now, and land the migration part first.

@huchenlei huchenlei merged commit e3d6fa2 into main Dec 23, 2024
7 checks passed
@huchenlei huchenlei deleted the migrate-custom-nodes branch December 23, 2024 14:39
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.

3 participants