-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
__init__.py
77 lines (61 loc) · 2.26 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# only import if running as a custom node
"""
@author: jags111
@title: Jags_VectorMagic
@nickname: Jags_VectorMagic
@description: This extension offers various vector manipulation and generation tools
"""
import sys, os, shutil
import importlib
import traceback
import json
import folder_paths
custom_nodes_path = os.path.join(folder_paths.base_path, "custom_nodes")
ComfyUI_Jags_VectorMagic_path = os.path.join(custom_nodes_path, "ComfyUI_Jags_VectorMagic")
sys.path.append(ComfyUI_Jags_VectorMagic_path)
#shutil.copytree(module_js_directory, application_web_extensions_directory, dirs_exist_ok=True)
# call classes used
from .base import *
from .yolo_seg import *
from .SVG_convert import *
from JagsClipseg import *
# Node Names from the beginning
# Note: Name: Unique to all node classes
# NODE_CLASS_MAPPINGS = { "my unique name" : SimpleCustomNode }
NODE_CLASS_MAPPINGS = {
"xy_Tiling_KSampler": xy_Tiling_KSampler,
"CircularVAEDecode": CircularVAEDecode,
"YoloSEGdetectionNode": YoloSEGdetectionNode,
"YoloSegNode": YoloSegNode,
"color_drop": color_drop,
#"SVG": SVG,
"JagsClipseg": JagsCLIPSeg,
"JagsCombineMasks": JagsCombineMasks,
}
#Main titles
NODE_DISPLAY_NAME_MAPPINGS = {
"xy_Tiling_KSampler": "Jags-XY_tile sampler",
"CircularVAEDecode": "Jags-CircularVAEDecode",
"YoloSEGdetectionNode": 'Jags-YoloSEGdetectionNode',
"YoloSegNode": 'Jags-YoloSegNode',
"color_drop": "Jags-color_drop",
#"SVG": "Jags-SVG",
"JagsClipseg": "Jags-Clipseg",
"JagsCombineMasks": "Jags-CombineMasks",
}
CC_VERSION = 1.0
THIS_DIR=os.path.dirname(os.path.abspath(__file__))
DIR_DEV_JS=os.path.abspath(f'{THIS_DIR}/js')
DIR_PY=os.path.abspath(f'{THIS_DIR}/py')
DIR_WEB_JS=os.path.abspath(f'{THIS_DIR}/../../web/extensions/comfyui_jags_Vectormagic')
if not os.path.exists(DIR_WEB_JS):
os.makedirs(DIR_WEB_JS)
shutil.copytree(DIR_DEV_JS, DIR_WEB_JS, dirs_exist_ok=True)
# web ui feature
WEB_DIRECTORY = "js"
#print confirmation
print('--------------')
print('*ComfyUI_Jags_VectorMagic- nodes_loaded*')
print('--------------')
#__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']
__ALL__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS', 'CC_VERSION']