Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Aug 30, 2024
1 parent e91662e commit 935ae15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions comfy/model_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class CPUState(Enum):
total_vram = 0

xpu_available = False
torch_version = ""
try:
torch_version = torch.version.__version__
xpu_available = (int(torch_version[0]) < 2 or (int(torch_version[0]) == 2 and int(torch_version[2]) <= 4)) and torch.xpu.is_available()
Expand Down
5 changes: 2 additions & 3 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
from model_filemanager import download_model, DownloadModelStatus
from typing import Optional
from api_server.routes.internal.internal_routes import InternalRoutes
import torch

class BinaryEventTypes:
PREVIEW_IMAGE = 1
Expand All @@ -52,7 +51,7 @@ def get_comfyui_version():
except Exception:
try:
import subprocess
comfyui_version = subprocess.check_output(["git", "describe", "--tags"], cwd=repo_path)
comfyui_version = subprocess.check_output(["git", "describe", "--tags"], cwd=repo_path).decode('utf-8')
except Exception as e:
logging.warning(f"Failed to get ComfyUI version: {e}")
return comfyui_version.strip()
Expand Down Expand Up @@ -427,7 +426,7 @@ async def system_stats(request):
"os": os.name,
"comfyui_version": get_comfyui_version(),
"python_version": sys.version,
"pytorch_version": torch.version.__version__,
"pytorch_version": comfy.model_management.torch_version,
"embedded_python": os.path.split(os.path.split(sys.executable)[0])[1] == "python_embeded",
"argv": sys.argv
},
Expand Down

0 comments on commit 935ae15

Please sign in to comment.