update
+ Updated the structure; now the web_alekpet_nodes folder is not deleted or recreated, and no files are copied. + Added a folder with example_workflows + Corrected some README files + Cleaned up the __init__.py file + Update version
@@ -1,3 +1,2 @@
|
||||
__pycache__
|
||||
web_alekpet_nodes
|
||||
settings_nodes/
|
||||
@@ -35,4 +35,4 @@ To use, you need to select the required model for your language, here https://hu
|
||||
**Drag image to ComfyUI open workflow:**
|
||||

|
||||
|
||||
Workflow link: [Workflow ai_translate_opus-mt_idenode_workflow.json](https://github.com/AlekPet/ComfyUI_Custom_Nodes_AlekPet/raw/master/IDENode/example_workflows/ai_translate_opus-mt_idenode_workflow.json)
|
||||
Workflow link: [Workflow ai_translate_opus-mt_idenode_workflow.json](https://github.com/AlekPet/ComfyUI_Custom_Nodes_AlekPet/raw/master/example_workflows/ai_translate_opus-mt_idenode_workflow.json)
|
||||
|
||||
@@ -60,11 +60,11 @@ Rights to brushes belong to their owners, [licensing-policy](https://github.com/
|
||||
|
||||
**NOTE**: Not all brushes work correctly (brushlib.js does not support the functions of the latest version of mypaint), use the settings to adjust!
|
||||
|
||||
**NOTE**: All brushes needs converts, using [my converter](https://github.com/AlekPet/brushlib.js))
|
||||
**NOTE**: All brushes needs converts, using [my converter](https://github.com/AlekPet/brushlib.js)
|
||||
|
||||
## Convert information:
|
||||
|
||||
All avaiables convertered brushes written indise in the file **brushes_data.json**
|
||||
All avaiables convertered brushes written indise in the file **web_alekpet_nodes\assets\painternode\json\brushes_data.json** and files brushes to **web_alekpet_nodes\assets\painternode\brushes**
|
||||
|
||||
### Use brushConverter.py:
|
||||
|
||||
@@ -118,11 +118,11 @@ npm run brushes
|
||||
|
||||
# User custom fonts
|
||||
|
||||
> To add custom fonts, they must be written in the css file: `PainterNode\css\painter_node_user_fonts.css`
|
||||
> To add custom fonts, they must be written in the css file: `web_alekpet_nodes\css\painternode\painter_node_user_fonts.css`
|
||||
|
||||
### Two variants:
|
||||
|
||||
**Variant 1**: Path to fonts, fonts puts in the `PainterNode\fonts`, adn add to the code in the css.
|
||||
**Variant 1**: Path to fonts, fonts puts in the `web_alekpet_nodes\fonts\painternode`, adn add to the code in the css.
|
||||
|
||||
```css
|
||||
@font-face {
|
||||
@@ -131,7 +131,7 @@ npm run brushes
|
||||
}
|
||||
```
|
||||
|
||||
**Variant 2**: Add url to font in the `painter_node_user_fonts.css`, example used link [google fonts.](https://fonts.google.com/)
|
||||
**Variant 2**: Add url to font in the `web_alekpet_nodes\css\painternode\painter_node_user_fonts.css`, example used link [google fonts.](https://fonts.google.com/)
|
||||
|
||||
```css
|
||||
@import url("https://fonts.googleapis.com/css2?family=Jacquard+12&display=swap");
|
||||
|
||||
@@ -16,5 +16,5 @@ I rewrite the main.js file as a class for use in ComfyUI, from **fkunn1326** ope
|
||||
## Image use
|
||||
|
||||
Image shows how to use **PoseNode**, image also use my other node **TranslateCLIPTextEncodeNode** to translate russian text to english.
|
||||
**Download** [workflow.json](https://raw.githubusercontent.com/AlekPet/ComfyUI_Custom_Nodes_AlekPet/master/PoseNode/workflow.json)
|
||||
**Download** [workflow.json](https://raw.githubusercontent.com/AlekPet/ComfyUI_Custom_Nodes_AlekPet/master/example_workflows/posenode_workflow.json)
|
||||

|
||||
|
||||
@@ -138,16 +138,6 @@ def getNamesNodesInsidePyFile(nodeElement):
|
||||
return cls_names
|
||||
|
||||
|
||||
def checkFolderIsset():
|
||||
log(f"* Check and make not isset dirs...")
|
||||
for d in extension_dirs:
|
||||
dir_ = os.path.join(extension_folder, d)
|
||||
if not os.path.exists(dir_):
|
||||
log(f"* Dir <{d}> is not found, create...")
|
||||
os.mkdir(dir_)
|
||||
log(f"* Dir <{d}> created!")
|
||||
|
||||
|
||||
def module_install(commands, cwd="."):
|
||||
result = subprocess.Popen(
|
||||
commands,
|
||||
@@ -207,18 +197,6 @@ nodes_list_dict = {}
|
||||
def install_node(nodeElement):
|
||||
global nodes_list_dict
|
||||
log(f"* Node <{nodeElement}> is found, installing...")
|
||||
web_extensions_dir = os.path.join(extension_folder, extension_dirs[0])
|
||||
|
||||
extensions_dirs_copy = ["js", "css", "assets", "lib", "fonts"]
|
||||
for dir_name in extensions_dirs_copy:
|
||||
folder_curr = os.path.join(extension_folder, nodeElement, dir_name)
|
||||
if os.path.exists(folder_curr):
|
||||
folder_curr_dist = os.path.join(
|
||||
web_extensions_dir,
|
||||
dir_name,
|
||||
nodeElement.lower() if dir_name != "js" else web_extensions_dir,
|
||||
)
|
||||
shutil.copytree(folder_curr, folder_curr_dist, dirs_exist_ok=True)
|
||||
|
||||
clsNodes = getNamesNodesInsidePyFile(nodeElement)
|
||||
clsNodesText = "\033[93m" + ", ".join(clsNodes) + "\033[0m" if clsNodes else ""
|
||||
@@ -271,12 +249,6 @@ def _installNodes_internal():
|
||||
oldDirNodes = os.path.join(folder_comfyui_web_extensions, "AlekPet_Nodes")
|
||||
safe_rmtree(oldDirNodes)
|
||||
|
||||
# Clear folder web_alekpet_nodes
|
||||
web_extensions_dir = os.path.join(extension_folder, extension_dirs[0])
|
||||
safe_rmtree(web_extensions_dir)
|
||||
|
||||
|
||||
checkFolderIsset()
|
||||
installed_modules = get_installed_modules()
|
||||
|
||||
nodes = []
|
||||
|
||||
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 68 KiB |
@@ -5,10 +5,7 @@
|
||||
{
|
||||
"id": 8,
|
||||
"type": "VAEDecode",
|
||||
"pos": [
|
||||
1057,
|
||||
42
|
||||
],
|
||||
"pos": [1057, 42],
|
||||
"size": {
|
||||
"0": 210,
|
||||
"1": 46
|
||||
@@ -32,9 +29,7 @@
|
||||
{
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"links": [
|
||||
10
|
||||
],
|
||||
"links": [10],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
@@ -45,10 +40,7 @@
|
||||
{
|
||||
"id": 3,
|
||||
"type": "KSampler",
|
||||
"pos": [
|
||||
1101,
|
||||
242
|
||||
],
|
||||
"pos": [1101, 242],
|
||||
"size": {
|
||||
"0": 315,
|
||||
"1": 262
|
||||
@@ -82,9 +74,7 @@
|
||||
{
|
||||
"name": "LATENT",
|
||||
"type": "LATENT",
|
||||
"links": [
|
||||
7
|
||||
],
|
||||
"links": [7],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
@@ -104,10 +94,7 @@
|
||||
{
|
||||
"id": 14,
|
||||
"type": "PreviewImage",
|
||||
"pos": [
|
||||
1443,
|
||||
123
|
||||
],
|
||||
"pos": [1443, 123],
|
||||
"size": {
|
||||
"0": 550,
|
||||
"1": 937
|
||||
@@ -130,14 +117,8 @@
|
||||
{
|
||||
"id": 15,
|
||||
"type": "PoseNode",
|
||||
"pos": [
|
||||
719,
|
||||
450
|
||||
],
|
||||
"size": [
|
||||
280.3202667236328,
|
||||
447.5941696166992
|
||||
],
|
||||
"pos": [719, 450],
|
||||
"size": [280.3202667236328, 447.5941696166992],
|
||||
"flags": {},
|
||||
"order": 2,
|
||||
"mode": 0,
|
||||
@@ -145,29 +126,19 @@
|
||||
{
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"links": [
|
||||
15
|
||||
],
|
||||
"links": [15],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "PoseNode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"Pose_0 (6).png",
|
||||
"add_pose",
|
||||
"reset_pose",
|
||||
null
|
||||
]
|
||||
"widgets_values": ["Pose_0 (6).png", "add_pose", "reset_pose", null]
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"type": "ControlNetApply",
|
||||
"pos": [
|
||||
703,
|
||||
221
|
||||
],
|
||||
"pos": [703, 221],
|
||||
"size": {
|
||||
"0": 317.4000244140625,
|
||||
"1": 98
|
||||
@@ -197,26 +168,19 @@
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [
|
||||
13
|
||||
],
|
||||
"links": [13],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "ControlNetApply"
|
||||
},
|
||||
"widgets_values": [
|
||||
1
|
||||
]
|
||||
"widgets_values": [1]
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"type": "TranslateCLIPTextEncodeNode",
|
||||
"pos": [
|
||||
222,
|
||||
158
|
||||
],
|
||||
"type": "GoogleTranslateCLIPTextEncodeNode",
|
||||
"pos": [222, 158],
|
||||
"size": {
|
||||
"0": 400,
|
||||
"1": 200
|
||||
@@ -236,14 +200,12 @@
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [
|
||||
16
|
||||
],
|
||||
"links": [16],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "TranslateCLIPTextEncodeNode"
|
||||
"Node name for S&R": "GoogleTranslateCLIPTextEncodeNode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"auto",
|
||||
@@ -254,10 +216,7 @@
|
||||
{
|
||||
"id": 5,
|
||||
"type": "EmptyLatentImage",
|
||||
"pos": [
|
||||
689,
|
||||
15
|
||||
],
|
||||
"pos": [689, 15],
|
||||
"size": {
|
||||
"0": 315,
|
||||
"1": 106
|
||||
@@ -269,28 +228,19 @@
|
||||
{
|
||||
"name": "LATENT",
|
||||
"type": "LATENT",
|
||||
"links": [
|
||||
2
|
||||
],
|
||||
"links": [2],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "EmptyLatentImage"
|
||||
},
|
||||
"widgets_values": [
|
||||
512,
|
||||
512,
|
||||
1
|
||||
]
|
||||
"widgets_values": [512, 512, 1]
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"type": "CheckpointLoaderSimple",
|
||||
"pos": [
|
||||
244,
|
||||
-2
|
||||
],
|
||||
"pos": [244, -2],
|
||||
"size": {
|
||||
"0": 315,
|
||||
"1": 98
|
||||
@@ -302,43 +252,31 @@
|
||||
{
|
||||
"name": "MODEL",
|
||||
"type": "MODEL",
|
||||
"links": [
|
||||
1
|
||||
],
|
||||
"links": [1],
|
||||
"slot_index": 0
|
||||
},
|
||||
{
|
||||
"name": "CLIP",
|
||||
"type": "CLIP",
|
||||
"links": [
|
||||
18,
|
||||
19
|
||||
],
|
||||
"links": [18, 19],
|
||||
"slot_index": 1
|
||||
},
|
||||
{
|
||||
"name": "VAE",
|
||||
"type": "VAE",
|
||||
"links": [
|
||||
8
|
||||
],
|
||||
"links": [8],
|
||||
"slot_index": 2
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "CheckpointLoaderSimple"
|
||||
},
|
||||
"widgets_values": [
|
||||
"anything-v4.0-pruned.ckpt"
|
||||
]
|
||||
"widgets_values": ["anything-v4.0-pruned.ckpt"]
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"type": "ControlNetLoader",
|
||||
"pos": [
|
||||
233,
|
||||
434
|
||||
],
|
||||
"pos": [233, 434],
|
||||
"size": {
|
||||
"0": 315,
|
||||
"1": 58
|
||||
@@ -350,26 +288,19 @@
|
||||
{
|
||||
"name": "CONTROL_NET",
|
||||
"type": "CONTROL_NET",
|
||||
"links": [
|
||||
14
|
||||
],
|
||||
"links": [14],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "ControlNetLoader"
|
||||
},
|
||||
"widgets_values": [
|
||||
"control_sd15_openpose.pth"
|
||||
]
|
||||
"widgets_values": ["control_sd15_openpose.pth"]
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"type": "TranslateCLIPTextEncodeNode",
|
||||
"pos": [
|
||||
239,
|
||||
581
|
||||
],
|
||||
"type": "GoogleTranslateCLIPTextEncodeNode",
|
||||
"pos": [239, 581],
|
||||
"size": {
|
||||
"0": 400,
|
||||
"1": 200
|
||||
@@ -389,14 +320,12 @@
|
||||
{
|
||||
"name": "CONDITIONING",
|
||||
"type": "CONDITIONING",
|
||||
"links": [
|
||||
17
|
||||
],
|
||||
"links": [17],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "TranslateCLIPTextEncodeNode"
|
||||
"Node name for S&R": "GoogleTranslateCLIPTextEncodeNode"
|
||||
},
|
||||
"widgets_values": [
|
||||
"auto",
|
||||
@@ -406,105 +335,21 @@
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
[
|
||||
1,
|
||||
4,
|
||||
0,
|
||||
3,
|
||||
0,
|
||||
"MODEL"
|
||||
],
|
||||
[
|
||||
2,
|
||||
5,
|
||||
0,
|
||||
3,
|
||||
3,
|
||||
"LATENT"
|
||||
],
|
||||
[
|
||||
7,
|
||||
3,
|
||||
0,
|
||||
8,
|
||||
0,
|
||||
"LATENT"
|
||||
],
|
||||
[
|
||||
8,
|
||||
4,
|
||||
2,
|
||||
8,
|
||||
1,
|
||||
"VAE"
|
||||
],
|
||||
[
|
||||
10,
|
||||
8,
|
||||
0,
|
||||
14,
|
||||
0,
|
||||
"IMAGE"
|
||||
],
|
||||
[
|
||||
13,
|
||||
11,
|
||||
0,
|
||||
3,
|
||||
1,
|
||||
"CONDITIONING"
|
||||
],
|
||||
[
|
||||
14,
|
||||
13,
|
||||
0,
|
||||
11,
|
||||
1,
|
||||
"CONTROL_NET"
|
||||
],
|
||||
[
|
||||
15,
|
||||
15,
|
||||
0,
|
||||
11,
|
||||
2,
|
||||
"IMAGE"
|
||||
],
|
||||
[
|
||||
16,
|
||||
17,
|
||||
0,
|
||||
11,
|
||||
0,
|
||||
"CONDITIONING"
|
||||
],
|
||||
[
|
||||
17,
|
||||
16,
|
||||
0,
|
||||
3,
|
||||
2,
|
||||
"CONDITIONING"
|
||||
],
|
||||
[
|
||||
18,
|
||||
4,
|
||||
1,
|
||||
17,
|
||||
0,
|
||||
"CLIP"
|
||||
],
|
||||
[
|
||||
19,
|
||||
4,
|
||||
1,
|
||||
16,
|
||||
0,
|
||||
"CLIP"
|
||||
]
|
||||
[1, 4, 0, 3, 0, "MODEL"],
|
||||
[2, 5, 0, 3, 3, "LATENT"],
|
||||
[7, 3, 0, 8, 0, "LATENT"],
|
||||
[8, 4, 2, 8, 1, "VAE"],
|
||||
[10, 8, 0, 14, 0, "IMAGE"],
|
||||
[13, 11, 0, 3, 1, "CONDITIONING"],
|
||||
[14, 13, 0, 11, 1, "CONTROL_NET"],
|
||||
[15, 15, 0, 11, 2, "IMAGE"],
|
||||
[16, 17, 0, 11, 0, "CONDITIONING"],
|
||||
[17, 16, 0, 3, 2, "CONDITIONING"],
|
||||
[18, 4, 1, 17, 0, "CLIP"],
|
||||
[19, 4, 1, 16, 0, "CLIP"]
|
||||
],
|
||||
"groups": [],
|
||||
"config": {},
|
||||
"extra": {},
|
||||
"version": 0.4
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui_custom_nodes_alekpet"
|
||||
description = "Nodes: PoseNode, PainterNode, TranslateTextNode, TranslateCLIPTextEncodeNode, DeepTranslatorTextNode, DeepTranslatorCLIPTextEncodeNode, ArgosTranslateTextNode, ArgosTranslateCLIPTextEncodeNode, ChatGLM4TranslateCLIPTextEncodeNode, ChatGLM4TranslateTextNode, ChatGLM4InstructNode, ChatGLM4InstructMediaNode, ChatGLMImageGenerateNode, ChatGLMVideoGenerateNode, PreviewTextNode, HexToHueNode, ColorsCorrectNode, IDENode."
|
||||
version = "1.0.93"
|
||||
version = "1.1.0"
|
||||
license = { file = "LICENSE" }
|
||||
|
||||
[project.urls]
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |