Skip to content

Commit

Permalink
Merge pull request #89 from crystian/dev
Browse files Browse the repository at this point in the history
AMD fix
  • Loading branch information
crystian authored Jul 30, 2024
2 parents 65d5f37 + b256e67 commit 513cbba
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@author: Crystian
@title: Crystools
@nickname: Crystools
@version: 1.15.0
@version: 1.15.1
@project: "https://github.com/crystian/ComfyUI-Crystools",
@description: Plugins for multiples uses, mainly for debugging, you need them! IG: https://www.instagram.com/crystian.ia
"""
Expand Down
2 changes: 1 addition & 1 deletion core/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "1.15.0"
version = "1.15.1"
17 changes: 12 additions & 5 deletions general/gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ def __init__(self):

self.anygpuLoaded = self.pynvmlLoaded or self.pyamdLoaded

try:
self.torchDevice = comfy.model_management.get_torch_device_name(comfy.model_management.get_torch_device())
except Exception as e:
logger.error('Could not pick default device.' + str(e))

# ZLUDA Check, self.torchDevice has 'ZLUDA' in it.
if 'zluda' in self.torchDevice or 'ZLUDA' in self.torchDevice or 'Zluda' in self.torchDevice:
logger.warn('ZLUDA detected. GPU monitoring will be disabled.')
self.anygpuLoaded = False
self.pyamdLoaded = False
self.pynvmlLoaded = False

if self.anygpuLoaded and self.deviceGetCount() > 0:
self.cudaDevicesFound = self.deviceGetCount()

Expand Down Expand Up @@ -73,11 +85,6 @@ def __init__(self):
else:
logger.warn('No GPU with CUDA detected.')

try:
self.torchDevice = comfy.model_management.get_torch_device_name(comfy.model_management.get_torch_device())
except Exception as e:
logger.error('Could not pick default device.' + str(e))

self.cudaDevice = 'cpu' if self.torchDevice == 'cpu' else 'cuda'
self.cudaAvailable = torch.cuda.is_available()

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "comfyui-crystools"
description = "With this suit, you can see the resources monitor, progress bar & time elapsed, metadata and compare between two images, compare between two JSONs, show any value to console/display, pipes, and more!\nThis provides better nodes to load/save images, previews, etc, and see \"hidden\" data without loading a new workflow."
version = "1.15.0"
version = "1.15.1"
license = "LICENSE"
dependencies = ["deepdiff", "torch", "numpy", "Pillow>=9.5.0", "pynvml", "py-cpuinfo>=9.0.0", "pyrsmi"]

Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ numpy
Pillow>=9.5.0
pynvml
py-cpuinfo>=9.0.0
pyrsmi
piexif
--extra-index-url https://test.pypi.org/simple
pyrsmi==0.0.6
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.15.0
1.15.1

0 comments on commit 513cbba

Please sign in to comment.