diff --git a/README.md b/README.md index c112a1d..d3d38a5 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ NODE_CLASS_MAPPINGS.update({ # Troubleshooting -* If updating ComfyUI-Manager itself fails, please go to the **ComfyUI-Manager** directory and execute the command `git pull --rebase`. +* If updating ComfyUI-Manager itself fails, please go to the **ComfyUI-Manager** directory and execute the command `git update-ref refs/remotes/origin/main a361cc1 && git fetch --all && git pull`. * Alternatively, download the update-fix.py script from [update-fix.py](https://github.com/ltdrdata/ComfyUI-Manager/raw/main/scripts/update-fix.py) and place it in the ComfyUI-Manager directory. Then, run it using your Python command. For the portable version, use `..\..\..\python_embedded\python.exe update-fix.py`. * If Controlnet is set to skip_v1 true, nodes like `CannyEdgePreprocessor` will appear as extensions of missing nodes, but simply installing them is not enough, and direct modification of the user's config.yaml is required. diff --git a/scripts/update-fix.py b/scripts/update-fix.py index e2a6946..d2ac100 100644 --- a/scripts/update-fix.py +++ b/scripts/update-fix.py @@ -1,9 +1,12 @@ import git -repo_path = "." -repo = git.Repo(repo_path) +commit_hash = "a361cc1" + +repo = git.Repo('.') if repo.is_dirty(): repo.git.stash() - -repo.git.pull(rebase=True) + +repo.git.update_ref("refs/remotes/origin/main", commit_hash) +repo.remotes.origin.fetch() +repo.git.pull("origin", "main")