mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-24 05:10:18 +08:00
Update zluda.py
This commit is contained in:
parent
2ce9177547
commit
0bf4f88dea
@ -16,10 +16,18 @@ os.environ['DISABLE_ADDMM_CUDA_LT'] = '1'
|
|||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
|
# Ensure pkg_resources is installed
|
||||||
|
try:
|
||||||
|
import pkg_resources
|
||||||
|
except ImportError:
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'setuptools', '--quiet'])
|
||||||
|
import pkg_resources
|
||||||
|
|
||||||
# Check and install comfyui-frontend-package if not installed or if the version is lower than required
|
# Check and install comfyui-frontend-package if not installed or if the version is lower than required
|
||||||
required_version = "1.11.8"
|
required_version = "1.11.8"
|
||||||
try:
|
try:
|
||||||
import pkg_resources
|
|
||||||
import comfyui_frontend_package
|
import comfyui_frontend_package
|
||||||
installed_version = pkg_resources.get_distribution("comfyui-frontend-package").version
|
installed_version = pkg_resources.get_distribution("comfyui-frontend-package").version
|
||||||
if pkg_resources.parse_version(installed_version) < pkg_resources.parse_version(required_version):
|
if pkg_resources.parse_version(installed_version) < pkg_resources.parse_version(required_version):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user