Hotfix for onnxruntime
This commit is contained in:
+12
-4
@@ -338,10 +338,18 @@ def is_installed(pkg_name: str, min_version: str = '') -> bool:
|
||||
return False
|
||||
|
||||
def install(pkg_spec: str):
|
||||
subprocess.check_call([sys.executable, '-m', 'pip', 'install', pkg_spec])
|
||||
try:
|
||||
subprocess.check_call([sys.executable, '-m', 'pip', 'install', pkg_spec])
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"Failed to install {pkg_spec}: {e}")
|
||||
raise
|
||||
|
||||
def uninstall(pkg: str):
|
||||
subprocess.check_call([sys.executable, '-m', 'pip', 'uninstall', '-y', pkg])
|
||||
try:
|
||||
subprocess.check_call([sys.executable, '-m', 'pip', 'uninstall', '-y', pkg])
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"Failed to uninstall {pkg}: {e}")
|
||||
raise
|
||||
|
||||
def install_onnxruntime():
|
||||
import torch
|
||||
@@ -349,7 +357,7 @@ def install_onnxruntime():
|
||||
print(f"Found NVIDIA GPU: {gpu}")
|
||||
if gpu:
|
||||
if is_installed('onnxruntime'):
|
||||
#uninstall("onnxruntime")
|
||||
uninstall("onnxruntime")
|
||||
print(f"LP >>> Your python has the 'onnxruntime' library installed, although your computer supports 'onnxruntime-gpu'.")
|
||||
print(f"LP >>> Solution: If other node packages do not use the 'onnxruntime' library, then remove the 'onnxruntime' library for your python.")
|
||||
print(f"LP >>> Close ComfyUI and run the script at .\\ComfyUI\\custom_nodes\\ComfyUI-LevelPixel-Advanced\\scripts\\remove_onnxruntime.bat")
|
||||
@@ -357,7 +365,7 @@ def install_onnxruntime():
|
||||
install("onnxruntime-gpu>=1.22")
|
||||
else:
|
||||
if is_installed('onnxruntime-gpu'):
|
||||
#uninstall("onnxruntime-gpu")
|
||||
uninstall("onnxruntime-gpu")
|
||||
print(f"LP >>> Your python has the 'onnxruntime-gpu' library installed, but you don't have a GPU.")
|
||||
print(f"LP >>> Solution: If other node packages do not use the 'onnxruntime-gpu' library, then remove the 'onnxruntime-gpu' library for your python.")
|
||||
print(f"LP >>> Close ComfyUI and run the script at .\\ComfyUI\\custom_nodes\\ComfyUI-LevelPixel-Advanced\\scripts\\remove_onnxruntime.bat")
|
||||
|
||||
+3
-2
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui-levelpixel-advanced"
|
||||
description = "Advanced nodes of the Level Pixel company (aka levelpixel, LP). Includes convenient advanced nodes for working with LLM и VLM models (LLaVa, Multimodal Generator) with GGUF format. Qwen2.5-VL and Qwen2.5 supported, based on llama-mtmd. Also included is a node for the RAM model. Nodes have the ability to automatically unload models from VRAM. This package also includes Autotagger (WD), Image Remove Background (based on RMBG-2.0, on BiRefNet, on BiRefNet-HR-Matter, on RemBG). Repository: https://github.com/LevelPixel/ComfyUI-LevelPixel-Advanced"
|
||||
version = "1.2.4"
|
||||
version = "1.2.5"
|
||||
license = { file = "LICENSE" }
|
||||
dependencies = [
|
||||
"torch>=2.0.1",
|
||||
@@ -19,7 +19,8 @@ dependencies = [
|
||||
"rembg>=2.0.66",
|
||||
"diskcache>=5.6.1",
|
||||
"jinja2>=2.11.3",
|
||||
"typing-extensions>=4.5.0" ]
|
||||
"typing-extensions>=4.5.0",
|
||||
"onnxruntime-gpu>=1.22" ]
|
||||
|
||||
[project.urls]
|
||||
Repository = "https://github.com/LevelPixel/ComfyUI-LevelPixel-Advanced"
|
||||
|
||||
@@ -15,4 +15,5 @@ matplotlib
|
||||
diskcache>=5.6.1
|
||||
jinja2>=2.11.3
|
||||
typing-extensions>=4.5.0
|
||||
onnxruntime-gpu>=1.22
|
||||
ram @ git+https://github.com/xinyu1205/recognize-anything.git
|
||||
|
||||
Reference in New Issue
Block a user