Skip to content

Faster plugins installation & less space taken #1027

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

KaruroChori
Copy link

Closes #891
This change allows ComfyUI-Manager to only clone the latest commit from the relevant branch, so that we do not end up with some extensions taking up GB on disk.
Yes, this is a real issue :(.

KaruroChori and others added 2 commits September 1, 2024 12:02
Added measures to limit the amount of things downloaded from git.
@ltdrdata
Copy link
Member

ltdrdata commented Sep 1, 2024

Due to the current overhaul, this PR will be considered after that.

@drmbt
Copy link

drmbt commented Mar 31, 2025

are we at a place where this could be considered yet?

@ltdrdata
Copy link
Member

ltdrdata commented Apr 5, 2025

Oh, this will be reflected after switching to the pip version later.

@KaruroChori
Copy link
Author

KaruroChori commented Apr 5, 2025

I mean, let's be real. Those four lines changed were quite literally just allowing the extension to limit cloning to the master/main branch, and ignoring most of the git history, only taking the last commit.

At times people do mess up with their repos, like they introduce very big files which should have never been there, and remove them right after without amending a commit. So that big file is part of the history and one is forced to take it unless they limit the depth of cloning.

It is really not rocket science, I don't understand why any rewrite would/should have prevented this feature from shipping for half a year, but if anyone is interested it can be patched in quite easily on your systems.

@ltdrdata
Copy link
Member

There are more side effects to consider than expected.
In particular, the snapshot feature is designed to fetch a specific commit, but if only the latest commit is fetched, it can cause issues—so handling edge cases becomes necessary.

Also, applying a patch that touches various parts of the code in the current version could mess up the branch currently being worked on, where the code structure is being completely overhauled.

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.

[Feature Request] Clone depth
3 participants