comfyui version switch

This commit is contained in:
Dr.Lt.Data
2024-08-21 01:33:55 +09:00
parent f74d8cb470
commit a1f7f7069f
4 changed files with 203 additions and 1 deletions

View File

@@ -2692,3 +2692,23 @@ async def check_need_to_migrate():
print(", ".join(legacy_custom_nodes))
print("---------------------------------------------------------------------------\n")
need_to_migrate = True
def get_comfyui_versions():
repo = git.Repo(comfy_path)
versions = [x.name for x in repo.tags if x.name.startswith('v')]
versions.reverse()
# nearest tag
tag = repo.git.describe('--tags')
if tag not in versions:
versions = [tag] + versions
return versions, tag
def switch_comfyui(tag):
repo = git.Repo(comfy_path)
repo.git.checkout(tag)
print(f"[ComfyUI-Manager] ComfyUI version is switched to '{tag}'")