Files
0xbitches-ComfyUI-LCM/__init__.py
T
0xbitches fbf3da4cc0 minor qol update
- add diffuser package checker
- fixed model loading
- changed output to image
2023-10-23 04:35:02 -07:00

23 lines
771 B
Python

import sys
import pkg_resources
import subprocess
def is_module_installed(module_name):
installed_packages = [d.key for d in pkg_resources.working_set]
return module_name in installed_packages
def install_module(module_name):
subprocess.check_call([sys.executable, "-m", "pip", "install", module_name])
module_name = "diffusers"
if not is_module_installed(module_name):
print(f"### ComfyUI-LCM: {module_name} is not installed. Installing now...")
install_module(module_name)
print(f"### ComfyUI-LCM: {module_name} has been installed.")
else:
print(f"### ComfyUI-LCM: {module_name} is already installed.")
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]