Files
melMass-comfy_mtb/__init__.py
T
melMass 811443b921 feat: ✨ add a few nodes
- QRCode: self explanatory
- SmartStep: a very basic node to get percent of steps, to use
  in KSample Advanced.
- ImageDeglaze: taken from this archived repo
  https://github.com/Fannovel16/FN16-ComfyUI-nodes/commit/f5ecf948e11a4912e9ee3925c5ea73c4434b6c89
2023-06-18 16:41:49 +02:00

60 lines
1.7 KiB
Python

import sys
from .utils import here
# Add extern folder to path
extern = (here / "extern", here / "extern" / "SadTalker")
# append all extern folders to path
sys.path.extend([ x.as_posix() for x in extern])
NODE_CLASS_MAPPINGS = {}
try:
from .nodes.deep_bump import DeepBump
NODE_CLASS_MAPPINGS["Deep Bump (mtb)"] = DeepBump
except Exception:
print("DeepBump nodes failed to load.")
from .nodes.latent_processing import LatentLerp
try:
from .nodes.fun import QRNode
NODE_CLASS_MAPPINGS["QR Code (mtb)"] = QRNode
except Exception:
print("QRNode failed to load.")
from .nodes.image_processing import (
ImageCompare,
Denoise,
Blur,
HSVtoRGB,
RGBtoHSV,
ColorCorrect,
)
try:
from .nodes.image_processing import DeglazeImage
except Exception:
print("DeglazeImage failed to load. This is probably an opencv mismatch. This node requires opencv-python-contrib.")
from .nodes.crop import Crop, Uncrop, BoundingBox
from .nodes.graph_utils import IntToNumber, Modulo
from .nodes.conditions import SmartStep
# NODE MAPPING
NODE_CLASS_MAPPINGS = {
"Latent Lerp (mtb) [DEPRECATED]": LatentLerp,
"Deep Bump (mtb)": DeepBump,
"Int to Number (mtb)": IntToNumber,
"Bounding Box (mtb)": BoundingBox,
"Crop (mtb)": Crop,
"Uncrop (mtb)": Uncrop,
"ImageBlur (mtb)": Blur,
"Denoise (mtb)": Denoise,
"ImageCompare (mtb)": ImageCompare,
"RGB to HSV (mtb)": RGBtoHSV,
"HSV to RGB (mtb)": HSVtoRGB,
"Color Correct (mtb)": ColorCorrect,
"Modulo (mtb)": Modulo,
"Deglaze Image (mtb)": DeglazeImage,
"Smart Step (mtb)": SmartStep,
# "Load Geometry (mtb)": LoadGeometry,
# "Geometry Info (mtb)": GeometryInfo,
}