Browse Source

fix: update-fix.py

pull/33/head
Dr.Lt.Data 1 year ago
parent
commit
e828281869
  1. 2
      README.md
  2. 9
      scripts/update-fix.py

2
README.md

@ -114,7 +114,7 @@ NODE_CLASS_MAPPINGS.update({
# Troubleshooting # 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. * 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`. 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. * 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.

9
scripts/update-fix.py

@ -1,9 +1,12 @@
import git import git
repo_path = "." commit_hash = "a361cc1"
repo = git.Repo(repo_path)
repo = git.Repo('.')
if repo.is_dirty(): if repo.is_dirty():
repo.git.stash() 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")

Loading…
Cancel
Save