This commit is contained in:
parent
057cea323f
commit
e95b0e0c6c
|
|
@ -1,6 +1,8 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from modules.launch_util import commit_hash, fooocus_tag
|
||||||
|
|
||||||
|
|
||||||
def prepare_environment():
|
def prepare_environment():
|
||||||
torch_index_url = os.environ.get('TORCH_INDEX_URL', "https://download.pytorch.org/whl/cu118")
|
torch_index_url = os.environ.get('TORCH_INDEX_URL', "https://download.pytorch.org/whl/cu118")
|
||||||
|
|
@ -12,7 +14,12 @@ def prepare_environment():
|
||||||
comfy_repo = os.environ.get('COMFY_REPO', "https://github.com/comfyanonymous/ComfyUI.git")
|
comfy_repo = os.environ.get('COMFY_REPO', "https://github.com/comfyanonymous/ComfyUI.git")
|
||||||
comfy_commit_hash = os.environ.get('COMFY_COMMIT_HASH', "5ac96897e9782805cd5e8fe85bd98ad03eae2b6f")
|
comfy_commit_hash = os.environ.get('COMFY_COMMIT_HASH', "5ac96897e9782805cd5e8fe85bd98ad03eae2b6f")
|
||||||
|
|
||||||
|
commit = commit_hash()
|
||||||
|
tag = fooocus_tag
|
||||||
|
|
||||||
print(f"Python {sys.version}")
|
print(f"Python {sys.version}")
|
||||||
|
print(f"Version: {tag}")
|
||||||
|
print(f"Commit hash: {commit}")
|
||||||
|
|
||||||
|
|
||||||
prepare_environment()
|
prepare_environment()
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
import os
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
from functools import lru_cache
|
||||||
|
|
||||||
|
|
||||||
|
git = os.environ.get('GIT', "git")
|
||||||
|
fooocus_tag = '1.0.0'
|
||||||
|
|
||||||
|
|
||||||
|
@lru_cache()
|
||||||
|
def commit_hash():
|
||||||
|
try:
|
||||||
|
return subprocess.check_output([git, "rev-parse", "HEAD"], shell=False, encoding='utf8').strip()
|
||||||
|
except Exception:
|
||||||
|
return "<none>"
|
||||||
|
|
||||||
Loading…
Reference in New Issue