Open darkpixel opened 1 week ago
hi i have been thinking about integrate git sync for a while. But the problem is the complexity of git merge conflicts, how to deal with git push/pull conflicts... so that's why I'm a bit hesitant to implement it
I totally get that dealing with conflicts is tough. ComfyUI Manager appears to deal with this by simply doing a 'git pull', and if it fails, users must handle it manually.
A potentially simpler way for users to handle it would be to have a 'discard my changes' button that does a git reset --hard && git pull
.
by simply doing a 'git pull', and if it fails, users must handle it manually.
sounds fair. I think for the first version, this can work. I'll put it in our roadmap, hope I can get to it asap.
I've also thought of only allow git push/pull for individual workflow item, instead of push/push for the entire repo. If for individual workflow item, it is much easier to solve the merge conflict problem, we simply overwrite by a new commit when git push
Sorry--yeah, that's sorta what I was talking about. I could publish a repo on github that has a bunch of JSON files in it--or maybe even several folders with JSON files in them.
Have a "Workspace from GitHub" button that accepts a github URL.
Clone the URL into a folder like ComfyUI/workspaces so the path ends up being ComfyUI/workspaces/reponame.
That's how ComfyUI Manager does it--your "Custom Nodes" go into ComfyUI/custom_nodes/reponame.
You can look through each subfolder and do a 'git reset --hard && git pull' to update it with a warning to users that any of their local changes would be lost....or if there are changes, you could just make a copy of the JSON into the existing workflows folder.
ok. this sounds workable. I hope I can get to it soon, you are not the first one wants this feature :)
I think it would be handy to have workflows that can be downloaded from a git repo, sorta like how ComfyUI Workspace Manager allows you to download custom modules.
Workflow developers could easily publish their work and users could find that work in the Workspace menu and get updates.
It could allow users to have a starting point for developing their own work i.e. "copy" the workspace into their personal workspace storage to make their own custom changes--or make changes directly to the version cloned from github and submit patches.