45th commited on
Commit
33e7455
·
verified ·
1 Parent(s): 40e163c

Delete custom_nodes/z-power-nodes-old

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. custom_nodes/z-power-nodes-old/.github/FUNDING.yml +0 -15
  2. custom_nodes/z-power-nodes-old/.github/workflows/publish.yml +0 -27
  3. custom_nodes/z-power-nodes-old/.gitignore +0 -43
  4. custom_nodes/z-power-nodes-old/LICENSE +0 -21
  5. custom_nodes/z-power-nodes-old/README.md +0 -148
  6. custom_nodes/z-power-nodes-old/__init__.py +0 -190
  7. custom_nodes/z-power-nodes-old/__pycache__/__init__.cpython-313.pyc +0 -0
  8. custom_nodes/z-power-nodes-old/banner_readme.jpg +0 -3
  9. custom_nodes/z-power-nodes-old/docs/calibration_examples/illustration.jpg +0 -3
  10. custom_nodes/z-power-nodes-old/docs/calibration_examples/illustration.json +0 -658
  11. custom_nodes/z-power-nodes-old/docs/calibration_examples/photo.jpg +0 -0
  12. custom_nodes/z-power-nodes-old/docs/calibration_examples/photo.json +0 -658
  13. custom_nodes/z-power-nodes-old/docs/calibration_examples/stamp.jpg +0 -0
  14. custom_nodes/z-power-nodes-old/docs/calibration_examples/stamp.json +0 -658
  15. custom_nodes/z-power-nodes-old/docs/empty_zimage_latent_image.jpg +0 -0
  16. custom_nodes/z-power-nodes-old/docs/empty_zimage_latent_image.md +0 -40
  17. custom_nodes/z-power-nodes-old/docs/my_top_10_styles.jpg +0 -0
  18. custom_nodes/z-power-nodes-old/docs/my_top_10_styles.md +0 -32
  19. custom_nodes/z-power-nodes-old/docs/save_image.jpg +0 -0
  20. custom_nodes/z-power-nodes-old/docs/save_image.md +0 -21
  21. custom_nodes/z-power-nodes-old/docs/style_prompt_encoder.jpg +0 -0
  22. custom_nodes/z-power-nodes-old/docs/style_prompt_encoder.md +0 -57
  23. custom_nodes/z-power-nodes-old/docs/style_string_injector.jpg +0 -0
  24. custom_nodes/z-power-nodes-old/docs/style_string_injector.md +0 -27
  25. custom_nodes/z-power-nodes-old/docs/vae_encode_for_soft_inpainting.jpg +0 -0
  26. custom_nodes/z-power-nodes-old/docs/vae_encode_for_soft_inpainting.md +0 -33
  27. custom_nodes/z-power-nodes-old/docs/zsampler_turbo.jpg +0 -0
  28. custom_nodes/z-power-nodes-old/docs/zsampler_turbo.md +0 -83
  29. custom_nodes/z-power-nodes-old/eslint.config.mjs +0 -31
  30. custom_nodes/z-power-nodes-old/icon.jpg +0 -0
  31. custom_nodes/z-power-nodes-old/image-civitai2.jpg +0 -3
  32. custom_nodes/z-power-nodes-old/js/common.js +0 -232
  33. custom_nodes/z-power-nodes-old/js/common_dialog.js +0 -182
  34. custom_nodes/z-power-nodes-old/js/common_server.js +0 -125
  35. custom_nodes/z-power-nodes-old/js/common_timer.js +0 -66
  36. custom_nodes/z-power-nodes-old/js/custom_widgets.js +0 -103
  37. custom_nodes/z-power-nodes-old/js/low_priority_timer.js +0 -50
  38. custom_nodes/z-power-nodes-old/js/my_top_styles.js +0 -399
  39. custom_nodes/z-power-nodes-old/js/my_top_styles_editor.js +0 -122
  40. custom_nodes/z-power-nodes-old/js/style_category_selector.js +0 -156
  41. custom_nodes/z-power-nodes-old/js/style_gallery.css +0 -178
  42. custom_nodes/z-power-nodes-old/js/style_gallery.js +0 -799
  43. custom_nodes/z-power-nodes-old/jsconfig.json +0 -19
  44. custom_nodes/z-power-nodes-old/nodes/__pycache__/empty_zimage_latent_image.cpython-313.pyc +0 -0
  45. custom_nodes/z-power-nodes-old/nodes/__pycache__/my_top_10_styles.cpython-313.pyc +0 -0
  46. custom_nodes/z-power-nodes-old/nodes/__pycache__/my_top_10_styles_editor.cpython-313.pyc +0 -0
  47. custom_nodes/z-power-nodes-old/nodes/__pycache__/save_image.cpython-313.pyc +0 -0
  48. custom_nodes/z-power-nodes-old/nodes/__pycache__/server.cpython-313.pyc +0 -0
  49. custom_nodes/z-power-nodes-old/nodes/__pycache__/style_prompt_encoder_2.cpython-313.pyc +0 -0
  50. custom_nodes/z-power-nodes-old/nodes/__pycache__/style_string_injector_2.cpython-313.pyc +0 -0
custom_nodes/z-power-nodes-old/.github/FUNDING.yml DELETED
@@ -1,15 +0,0 @@
1
- # These are supported funding model platforms
2
-
3
- # github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
- # patreon: # Replace with a single Patreon username
5
- # open_collective: # Replace with a single Open Collective username
6
- ko_fi: martinrizzo
7
- # tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
- # community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
- # liberapay: # Replace with a single Liberapay username
10
- # issuehunt: # Replace with a single IssueHunt username
11
- # lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12
- # polar: # Replace with a single Polar username
13
- # buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
14
- # thanks_dev: # Replace with a single thanks.dev username
15
- # custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/.github/workflows/publish.yml DELETED
@@ -1,27 +0,0 @@
1
- name: Publish Nodes to Comfy registry
2
- on:
3
- workflow_dispatch:
4
- push:
5
- branches:
6
- - main
7
- - master
8
- paths:
9
- - "pyproject.toml"
10
-
11
- permissions:
12
- issues: write
13
-
14
- jobs:
15
- publish-node:
16
- name: Publish Custom Node to registry
17
- runs-on: ubuntu-latest
18
- if: ${{ github.repository_owner == 'martin-rizzo' }}
19
- steps:
20
- - name: Check out code
21
- uses: actions/checkout@v4
22
- with:
23
- submodules: true
24
- - name: Publish Custom Node
25
- uses: Comfy-Org/publish-node-action@v1
26
- with:
27
- personal_access_token: ${{ secrets.COMFY_REGISTRY_ACCESS_KEY }}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/.gitignore DELETED
@@ -1,43 +0,0 @@
1
-
2
- # OS system files
3
- #
4
- .DS_Store
5
- .profile
6
- Thumbs.db
7
-
8
- # Editors' backup and temporary files
9
- #
10
- *.bak
11
- *.tmp
12
- *.kate-swp
13
-
14
- # IDEs and editors
15
- #
16
- Xcodeproj/
17
- .xcuserdata/
18
- .vscode/
19
- *.sublime-project
20
- *.sublime-workspace
21
-
22
- # Python
23
- #
24
- __pycache__/
25
- venv/
26
-
27
- # Node.js
28
- #
29
- node_modules/
30
-
31
- # Style Galery thumbnail generator
32
- #
33
- /styles/src
34
- /styles/samples_wf/*.png
35
-
36
- # Images generated by the bulkgen script
37
- /scripts/*.png
38
-
39
- # User-specific files and folders
40
- #
41
- *~.*
42
- *~/
43
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024-2025 Martin Rizzo
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/README.md DELETED
@@ -1,148 +0,0 @@
1
- <div align="center">
2
-
3
- # Z Power Nodes OLD <br><sub><sup><i>Pushing the best image generation model to its limits!</i></sup></sub>
4
- [![Last](https://img.shields.io/badge/CivitAI%3A-Z--Image%3APower%3ANodes-EEE?labelColor=1971C2&logo=c%2B%2B&logoColor=white)](https://civitai.com/models/2322533/z-image-power-nodes)
5
- [![Platform](https://img.shields.io/badge/platform%3A-ComfyUI-007BFF)](#)
6
- [![License](https://img.shields.io/github/license/yourname/z-power-nodes-old?label=license%3A&color=28A745)](#)
7
- [![Version](https://img.shields.io/github/v/tag/yourname/z-power-nodes-old?label=version%3A&color=D07250)](#)
8
- [![Last](https://img.shields.io/github/last-commit/yourname/z-power-nodes-old?label=last%20commit%3A)](#)
9
- <img src="banner_readme.jpg" width="90%"></img>
10
-
11
- </div>
12
-
13
- **Z Power Nodes OLD** is a collection of nodes designed specifically for the [Z-Image / Z-Image Turbo model](https://github.com/Tongyi-MAI/Z-Image). They are based on some ideas and discoveries I made while developing the [Amazing Z-Image Workflow](https://github.com/martin-rizzo/AmazingZImageWorkflow).
14
-
15
- ❤️ If you find these nodes useful or they’ve helped you in your projects, please consider supporting my work.
16
- Your support allows me to continue researching and creating new developments within the open source community.
17
- There are several ways to do so:
18
- - **Give the repository a star:** if we reach 500 stars, big things could happen!
19
- - **Ko-fi:** [https://ko-fi.com/martinrizzo](https://ko-fi.com/martinrizzo)
20
-
21
- *Every contribution, no matter how small, is greatly appreciated! Thank you.*
22
-
23
-
24
- ## Table of Contents
25
- 1. [Nodes](#nodes)
26
- 2. [Examples](#examples)
27
- 3. [Installation](#installation)
28
- 4. [Recommended Checkpoints](#recommended-checkpoints)
29
- 5. [License](#license)
30
-
31
- ## Nodes
32
-
33
- * __[⚡Z-Sampler Turbo](docs/zsampler_turbo.md)__
34
- <sub>A specialized sampler designed to Z-Image Turbo that achieves sufficient quality to eliminate the need for further post-processing.</sub>
35
- * __[⚡Style Prompt Encoder](docs/style_prompt_encoder.md)__
36
- <sub>Applies a selected visual styles to your prompt and encodes both of them using a text-encoder model (clip).
37
- * __[⚡Style String Injector](docs/style_string_injector.md)__
38
- <sub>Seamlessly integrates a chosen style into your prompt text. It accepts a string as input and modifies it based on the selected style.</sub>
39
- * __[⚡My Top-10 Styles](docs/my_top_10_styles.md)__
40
- <sub>Allows you to create a list of favorite styles for quick selection of your most used ones.</sub>
41
- * __[⚡VAE Encode (for Soft Inpainting)](docs/vae_encode_for_soft_inpainting.md)__
42
- <sub>Encodes images into a latent representation, embedding the mask that indicates where inpainting will be applied.</sub>
43
- * __[⚡Save Image](docs/save_image.md)__
44
- <sub>Saves generated images with the option to embed CivitAI-compatible metadata, making it easy to share generation parameters through that platform.</sub>
45
- * __[⚡Empty Z-Image Latent Image](docs/empty_zimage_latent_image.md)__
46
- <sub>Creates an empty latent image of the appropriate size for Z-Image, selecting aspect ratio, scale, and orientation.</sub>
47
-
48
-
49
- ## Examples
50
-
51
- [__/workflows__](/workflows)
52
- This folder contains reference workflows demonstrating the use of the Power Nodes across various tasks.
53
- These are simple yet powerful examples that serve as an excellent resource for understanding how to utilize
54
- each node.
55
-
56
- [__/styles/samples_wf__](/styles/samples_wf)
57
- This folder includes all the workflows used to generate the thumbnail images in the styles gallery.
58
-
59
- [__Z-Image Power Nodes on CivitAI__](https://civitai.com/models/2322533)
60
- This page contains hundreds of images created using the Z-Image model and the Power Nodes.
61
- Images posted by me always include the prompt and complete workflow (*), which you can use as a
62
- starting point for your own generation. Many users share their amazing creations in this community.
63
-
64
- <img alt="How to extract CivitAI workflow into ComfyUI" src="image-civitai2.jpg" width="60%"></img>
65
- <sub>(*) On CivitAI, each image includes a sidebar panel with metadata. To easily extract the workflow,
66
- click the "COMFY: N Nodes" button in the Other Metadata section and paste it (CTRL+V) directly into ComfyUI.</sub>
67
-
68
-
69
- ## Installation
70
- _Ensure you have the latest version of [ComfyUi](https://github.com/comfyanonymous/ComfyUI)._
71
-
72
- ### Installation via ComfyUI Manager (Recommended)
73
-
74
- The easiest way to install the nodes is through [ComfyUI-Manager](https://github.com/Comfy-Org/ComfyUI-Manager):
75
-
76
- 1. Open ComfyUI and click on the "Manager" button to launch the "ComfyUI Manager Menu".
77
- 2. Within the ComfyUI Manager, locate and click on the "Custom Nodes Manager" button.
78
- 3. In the search bar, type "Z Power Nodes OLD".
79
- 4. Select the option from the search results and click the "Install" button.
80
- 5. Restart ComfyUI to ensure the changes take effect.
81
-
82
- ### Manual Installation
83
-
84
- <details>
85
- <summary>🛠️ Manual installation instructions. (expand for details)</summary>
86
- .
87
-
88
- 1. Open your preferred terminal application.
89
- 2. Navigate to your ComfyUI directory:
90
- ```bash
91
- cd <your_comfyui_directory>
92
- ```
93
- 3. Move into the **custom_nodes** folder and clone the repository:
94
- ```bash
95
- cd custom_nodes
96
- git clone https://github.com/yourname/z-power-nodes-old.git
97
- ```
98
- </details>
99
-
100
- ### Windows Portable Installation
101
-
102
- <details>
103
- <summary>🛠️ Windows portable installation instructions. (expand for details)</summary>
104
- .
105
-
106
- 1. Go to where you unpacked **ComfyUI_windows_portable**,
107
- you'll find your `run_nvidia_gpu.bat` file here, confirming the correct location.
108
- 3. Press **CTRL + SHIFT + RightClick** in an empty space and select "Open PowerShell window here".
109
- 4. Clone the repository into your custom nodes folder using:
110
- ```
111
- git clone https://github.com/yourname/z-power-nodes-old .\ComfyUI\custom_nodes\ComfyUI-ZImagePowerNodes
112
- ```
113
- </details>
114
-
115
-
116
- ## Recommended Checkpoints
117
-
118
- ### GGUF Format
119
-
120
- <sub>GGUF checkpoints tend to run slightly slower in ComfyUI. However, if you are building a complex workflow that involves other models or using heavy LLMs with ollama, GGUF files can help prevent system freezes and OOM errors during generation, especially when VRAM is limited. For simple image generation workflows, a safetensors file (though heavier) might be preferable. When working with GGUF in Z-Image, from my experience, using the Q5_K_S quantization typically offers the best balance between file size and prompt response. </sub>
121
-
122
- Note: ComfyUI does not natively support GGUF format, so you need to install the [ComfyUI-GGUF](https://github.com/city96/ComfyUI-GGUF) nodes.
123
-
124
- - __[z_image_turbo-Q5_K_S.gguf](https://huggingface.co/jayn7/Z-Image-Turbo-GGUF/blob/main/z_image_turbo-Q5_K_S.gguf)__ <sub>[5.19 GB]</sub>\
125
- Local Directory: __`ComfyUI/models/diffusion_models/`__
126
- - __[Qwen3-4B.i1-Q5_K_S.gguf](https://huggingface.co/mradermacher/Qwen3-4B-i1-GGUF/blob/main/Qwen3-4B.i1-Q5_K_S.gguf)__ <sub>[2.82 GB]</sub>\
127
- Local Directory: __`ComfyUI/models/text_encoders/`__
128
- - __[ae.safetensors](https://huggingface.co/Comfy-Org/z_image_turbo/blob/main/split_files/vae/ae.safetensors)__ <sub>[335 MB]</sub>\
129
- Local Directory: __`ComfyUI/models/vae/`__
130
-
131
- ### Safetensors Format
132
-
133
- <sub>Safetensors files are generally larger, but ComfyUI includes several built-in optimizations to speed up generation even with limited VRAM. It's always a good idea to test the original safetensors checkpoints on your system to see how they perform. However, using safetensors in fp8 format is strongly discouraged as it can significantly reduce quality. If you have an RTX 50 series GPU based on Blackwell architecture, NVFP4 quantized safetensors could be a better choice.</sub>
134
-
135
- - __[z_image_turbo_bf16.safetensors](https://huggingface.co/Comfy-Org/z_image_turbo/blob/main/split_files/diffusion_models/z_image_turbo_bf16.safetensors)__ <sub>(12.3 GB)</sub>\
136
- Local Directory: __`ComfyUI/models/diffusion_models/`__
137
- - __[qwen_3_4b.safetensors](https://huggingface.co/Comfy-Org/z_image_turbo/blob/main/split_files/text_encoders/qwen_3_4b.safetensors)__ <sub>(8.04 GB)</sub>\
138
- Local Directory: __`ComfyUI/models/text_encoders/`__
139
- - __[ae.safetensors](https://huggingface.co/Comfy-Org/z_image_turbo/blob/main/split_files/vae/ae.safetensors)__ <sub>(335 MB)</sub>\
140
- Local Directory: __`ComfyUI/models/vae/`__
141
-
142
-
143
- ## License
144
-
145
- Copyright (c) 2026 Martin Rizzo
146
- This project is licensed under the MIT license.
147
- See the ["LICENSE"](LICENSE) file for details.
148
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/__init__.py DELETED
@@ -1,190 +0,0 @@
1
- """
2
- File : __init__.py
3
- Purpose : Register the "Z Power Nodes OLD".
4
- Author : Martin Rizzo | <martinrizzo@gmail.com>
5
- Date : Jan 16, 2026
6
- Repo : https://github.com/yourname/z-power-nodes-old
7
- License : MIT
8
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9
- ZPowerNodesOLD
10
- ComfyUI nodes designed specifically for the "Z-Image" model.
11
-
12
- Copyright (c) 2026 Martin Rizzo
13
-
14
- Permission is hereby granted, free of charge, to any person obtaining
15
- a copy of this software and associated documentation files (the
16
- "Software"), to deal in the Software without restriction, including
17
- without limitation the rights to use, copy, modify, merge, publish,
18
- distribute, sublicense, and/or sell copies of the Software, and to
19
- permit persons to whom the Software is furnished to do so, subject to
20
- the following conditions:
21
-
22
- The above copyright notice and this permission notice shall be
23
- included in all copies or substantial portions of the Software.
24
-
25
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30
- TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
31
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
33
- """
34
- import os
35
- from comfy_api.latest import ComfyExtension, io
36
- from .nodes.server import *
37
- from .nodes.lib.helpers import get_project_version
38
- from .styles.predefined_styles import number_of_predefined_styles
39
- __PROJECT_EMOJI = "⚡" #< emoji that identifies the project
40
- __PROJECT_MENU = "Z Power Nodes OLD" #< name of the menu where all the nodes will be
41
- __PROJECT_ID = "//ZPowerNodesOLD" #< used to identify the project in the ComfyUI node registry.
42
-
43
-
44
- #================================= LOGGER ==================================#
45
-
46
- # initialize the project logger
47
- from comfy.cli_args import args
48
- from .nodes.lib.system import setup_logger
49
- if os.getenv('ZIMAGE_NODES_DEBUG'):
50
- setup_logger(log_level="DEBUG", emoji=__PROJECT_EMOJI, name="ZI_POWER", use_stdout=args.log_stdout)
51
- else:
52
- setup_logger(log_level=args.verbose, emoji=__PROJECT_EMOJI, name="ZI_POWER", use_stdout=args.log_stdout)
53
-
54
- # import the newly initialized project logger
55
- from .nodes.lib.system import logger
56
-
57
-
58
- #============================ HELPER FUNCTIONS =============================#
59
-
60
- def _register_node(node_class : type,
61
- node_class_list : list[type],
62
- node_subcategory: str,
63
- deprecated : bool | None = None
64
- ):
65
- """
66
- Registers a node in the given `node_class_list` with appropriate title based on its category and status.
67
-
68
- After registering all the nodes, the `node_class_list` can be sent to comfy
69
- in the function `get_node_list(self)` of a ComfyExtension.
70
-
71
- Args:
72
- node_class : The class of the node to be registered.
73
- node_class_list : List where the node will be appended after registration.
74
- node_subcategory : The subcategory for the node (used for menu grouping).
75
- deprecated (optional): Indicates if the node is deprecated. If not provided,
76
- it's automatically determined based on the subcategory.
77
- """
78
-
79
- # if `deprecated`` is not provided, it will be automatically
80
- # determined based on the subcategory where it's being registered
81
- if deprecated == None:
82
- deprecated = "deprecated" in node_subcategory.lower()
83
-
84
- # add a '/' to the beginning of node_subcategory if it doesn't already start with one
85
- if node_subcategory and not node_subcategory.startswith("/"):
86
- node_subcategory = "/" + node_subcategory
87
-
88
- class_name = node_class.__name__
89
- title = node_class.xTITLE
90
- category = f"{__PROJECT_EMOJI}{__PROJECT_MENU}{node_subcategory}"
91
- comfy_node_id = f"{class_name} {__PROJECT_ID}"
92
-
93
- if deprecated:
94
- title = f"❌ OLD | {title} [Deprecated]"
95
- else:
96
- title = f"{__PROJECT_EMOJI}| OLD | {title}"
97
-
98
- node_class.xTITLE = title
99
- node_class.xCATEGORY = category
100
- node_class.xCOMFY_NODE_ID = comfy_node_id
101
- node_class.xDEPRECATED = deprecated
102
- node_class_list.append( node_class )
103
-
104
-
105
- #======================= COMFY EXTENSION (V3 schema) =======================#
106
-
107
- class ZPowerNodesOLDExtension(ComfyExtension):
108
-
109
- # must be declared as async
110
- async def get_node_list(self) -> list[type[io.ComfyNode]]:
111
- _PROJECT_MENU= "ZiNodes"
112
- nodes = []
113
-
114
-
115
- #-- ROOT --------------------------------
116
- subcategory = ""
117
-
118
- from .nodes.empty_zimage_latent_image import EmptyZImageLatentImage
119
- _register_node( EmptyZImageLatentImage, nodes, subcategory )
120
-
121
- from .nodes.style_prompt_encoder_2 import StylePromptEncoder2
122
- _register_node( StylePromptEncoder2, nodes, subcategory )
123
-
124
- from .nodes.style_string_injector_2 import StyleStringInjector2
125
- _register_node( StyleStringInjector2, nodes, subcategory )
126
-
127
- from .nodes.zsampler_turbo_1 import ZSamplerTurbo
128
- _register_node( ZSamplerTurbo, nodes, subcategory )
129
-
130
- from .nodes.zsampler_turbo_1_advanced import ZSamplerTurboAdvanced
131
- _register_node( ZSamplerTurboAdvanced, nodes, subcategory )
132
-
133
- from .nodes.zsampler_turbo_2 import ZSamplerTurbo2
134
- _register_node( ZSamplerTurbo2, nodes, subcategory )
135
-
136
- from .nodes.zsampler_turbo_2_advanced import ZSamplerTurbo2Advanced
137
- _register_node( ZSamplerTurbo2Advanced, nodes, subcategory )
138
-
139
- from .nodes.zsampler_turbo_2_laboratory import ZSamplerTurbo2Laboratory
140
- _register_node( ZSamplerTurbo2Laboratory, nodes, subcategory )
141
-
142
- from .nodes.my_top_10_styles import MyTop10Styles
143
- _register_node( MyTop10Styles, nodes, subcategory )
144
-
145
- from .nodes.my_top_10_styles_editor import MyTop10StylesEditor
146
- _register_node( MyTop10StylesEditor, nodes, subcategory )
147
-
148
- from .nodes.vae_encode_soft_inpainting import VAEEncodeSoftInpainting
149
- _register_node( VAEEncodeSoftInpainting, nodes, subcategory )
150
-
151
- from .nodes.save_image import SaveImage
152
- _register_node( SaveImage, nodes, subcategory )
153
-
154
-
155
- #--[ __deprecated ]----------------------
156
- subcategory = "__deprecated"
157
-
158
- # this is where nodes that were deprecated and
159
- # maintained only for compatibility go
160
-
161
- from .nodes.deprecated_nodes.photo_style_prompt_encoder import PhotoStylePromptEncoder
162
- _register_node( PhotoStylePromptEncoder, nodes, subcategory )
163
-
164
- from .nodes.deprecated_nodes.illustration_style_prompt_encoder import IllustrationStylePromptEncoder
165
- _register_node( IllustrationStylePromptEncoder, nodes, subcategory )
166
-
167
- from .nodes.deprecated_nodes.style_prompt_encoder import StylePromptEncoder
168
- _register_node( StylePromptEncoder, nodes, subcategory )
169
-
170
- from .nodes.deprecated_nodes.style_string_injector import StyleStringInjector
171
- _register_node( StyleStringInjector, nodes, subcategory )
172
-
173
- # report version and the number of nodes added by this extension
174
- version = get_project_version()
175
- num_of_deprecated = sum(node_class.xDEPRECATED for node_class in nodes)
176
- num_of_nodes = len(nodes) - num_of_deprecated
177
- and_deprecated = f" and {num_of_deprecated} deprecated ones" if num_of_deprecated>0 else ""
178
-
179
- logger.info(f"Version: {version}")
180
- logger.info(f"This package includes {num_of_nodes} nodes{and_deprecated}.")
181
- logger.info(f"It also features {number_of_predefined_styles()} predefined styles.")
182
- return nodes
183
-
184
-
185
- async def comfy_entrypoint() -> ZPowerNodesOLDExtension:
186
- return ZPowerNodesOLDExtension()
187
-
188
-
189
- WEB_DIRECTORY = "./js"
190
- __all__ = ["WEB_DIRECTORY"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/__pycache__/__init__.cpython-313.pyc DELETED
Binary file (7.87 kB)
 
custom_nodes/z-power-nodes-old/banner_readme.jpg DELETED

Git LFS Details

  • SHA256: 845c3171d30611aa163a80b11f90d572a76ae8380ccc0f1ff0cf583fb3b3c803
  • Pointer size: 131 Bytes
  • Size of remote file: 177 kB
custom_nodes/z-power-nodes-old/docs/calibration_examples/illustration.jpg DELETED

Git LFS Details

  • SHA256: 40e191a14b782d4377815e8e04e8ec7e9e1feb612eccc129d93bbf1c621cc513
  • Pointer size: 131 Bytes
  • Size of remote file: 112 kB
custom_nodes/z-power-nodes-old/docs/calibration_examples/illustration.json DELETED
@@ -1,658 +0,0 @@
1
- {
2
- "id": "f14c6566-993e-4413-bd11-9c7f2ca07fd1",
3
- "revision": 0,
4
- "last_node_id": 61,
5
- "last_link_id": 81,
6
- "nodes": [
7
- {
8
- "id": 8,
9
- "type": "VAEDecode",
10
- "pos": [
11
- 1426.5001954197278,
12
- 155.66666029751312
13
- ],
14
- "size": [
15
- 187.5,
16
- 46
17
- ],
18
- "flags": {},
19
- "order": 12,
20
- "mode": 0,
21
- "inputs": [
22
- {
23
- "name": "samples",
24
- "type": "LATENT",
25
- "link": 75
26
- },
27
- {
28
- "name": "vae",
29
- "type": "VAE",
30
- "link": 25
31
- }
32
- ],
33
- "outputs": [
34
- {
35
- "name": "IMAGE",
36
- "type": "IMAGE",
37
- "slot_index": 0,
38
- "links": [
39
- 47
40
- ]
41
- }
42
- ],
43
- "properties": {
44
- "Node name for S&R": "VAEDecode",
45
- "cnr_id": "comfy-core",
46
- "ver": "0.7.0"
47
- },
48
- "widgets_values": []
49
- },
50
- {
51
- "id": 31,
52
- "type": "SaveImage //ZPowerNodesOLD",
53
- "pos": [
54
- 1629.0000113262572,
55
- 159.27775418691726
56
- ],
57
- "size": [
58
- 540,
59
- 870.390625
60
- ],
61
- "flags": {},
62
- "order": 13,
63
- "mode": 0,
64
- "inputs": [
65
- {
66
- "name": "images",
67
- "type": "IMAGE",
68
- "link": 47
69
- }
70
- ],
71
- "outputs": [],
72
- "properties": {
73
- "Node name for S&R": "SaveImage //ZPowerNodesOLD"
74
- },
75
- "widgets_values": [
76
- "ZImage/%date:yyyy_MM_dd%/ZI",
77
- true
78
- ]
79
- },
80
- {
81
- "id": 39,
82
- "type": "Reroute",
83
- "pos": [
84
- 110,
85
- 160
86
- ],
87
- "size": [
88
- 75,
89
- 26
90
- ],
91
- "flags": {},
92
- "order": 5,
93
- "mode": 0,
94
- "inputs": [
95
- {
96
- "name": "",
97
- "type": "*",
98
- "link": 79
99
- }
100
- ],
101
- "outputs": [
102
- {
103
- "name": "",
104
- "type": "MODEL",
105
- "links": [
106
- 73
107
- ]
108
- }
109
- ],
110
- "properties": {
111
- "showOutputText": false,
112
- "horizontal": false
113
- }
114
- },
115
- {
116
- "id": 20,
117
- "type": "Reroute",
118
- "pos": [
119
- 1180,
120
- 800
121
- ],
122
- "size": [
123
- 75,
124
- 26
125
- ],
126
- "flags": {},
127
- "order": 11,
128
- "mode": 0,
129
- "inputs": [
130
- {
131
- "name": "",
132
- "type": "*",
133
- "link": 24
134
- }
135
- ],
136
- "outputs": [
137
- {
138
- "name": "",
139
- "type": "VAE",
140
- "links": [
141
- 25
142
- ]
143
- }
144
- ],
145
- "properties": {
146
- "showOutputText": false,
147
- "horizontal": false
148
- }
149
- },
150
- {
151
- "id": 19,
152
- "type": "Reroute",
153
- "pos": [
154
- 230,
155
- 800
156
- ],
157
- "size": [
158
- 75,
159
- 26
160
- ],
161
- "flags": {},
162
- "order": 9,
163
- "mode": 0,
164
- "inputs": [
165
- {
166
- "name": "",
167
- "type": "*",
168
- "link": 59
169
- }
170
- ],
171
- "outputs": [
172
- {
173
- "name": "",
174
- "type": "VAE",
175
- "links": [
176
- 24
177
- ]
178
- }
179
- ],
180
- "properties": {
181
- "showOutputText": false,
182
- "horizontal": false
183
- }
184
- },
185
- {
186
- "id": 32,
187
- "type": "EmptyZImageLatentImage //ZPowerNodesOLD",
188
- "pos": [
189
- 736.5000260003749,
190
- 25.666678410876642
191
- ],
192
- "size": [
193
- 316.92708333333337,
194
- 130
195
- ],
196
- "flags": {},
197
- "order": 0,
198
- "mode": 0,
199
- "inputs": [],
200
- "outputs": [
201
- {
202
- "name": "LATENT",
203
- "type": "LATENT",
204
- "links": [
205
- 72
206
- ]
207
- }
208
- ],
209
- "properties": {
210
- "Node name for S&R": "EmptyZImageLatentImage //ZPowerNodesOLD"
211
- },
212
- "widgets_values": [
213
- false,
214
- "3:2 (photo)",
215
- "medium (recommended)",
216
- 1
217
- ]
218
- },
219
- {
220
- "id": 59,
221
- "type": "UnetLoaderGGUF",
222
- "pos": [
223
- -310,
224
- 160
225
- ],
226
- "size": [
227
- 380,
228
- 90
229
- ],
230
- "flags": {},
231
- "order": 1,
232
- "mode": 0,
233
- "inputs": [],
234
- "outputs": [
235
- {
236
- "name": "MODEL",
237
- "type": "MODEL",
238
- "links": [
239
- 79
240
- ]
241
- }
242
- ],
243
- "properties": {
244
- "Node name for S&R": "UnetLoaderGGUF",
245
- "cnr_id": "comfyui-gguf",
246
- "aux_id": "city96/ComfyUI-GGUF",
247
- "ver": "1.1.8"
248
- },
249
- "widgets_values": [
250
- "z_image_turbo-Q5_K_S.gguf"
251
- ],
252
- "color": "#322",
253
- "bgcolor": "#533",
254
- "shape": 1
255
- },
256
- {
257
- "id": 60,
258
- "type": "CLIPLoaderGGUF",
259
- "pos": [
260
- -310,
261
- 300
262
- ],
263
- "size": [
264
- 380,
265
- 100
266
- ],
267
- "flags": {},
268
- "order": 2,
269
- "mode": 0,
270
- "inputs": [],
271
- "outputs": [
272
- {
273
- "name": "CLIP",
274
- "type": "CLIP",
275
- "links": [
276
- 80
277
- ]
278
- }
279
- ],
280
- "properties": {
281
- "Node name for S&R": "CLIPLoaderGGUF",
282
- "cnr_id": "comfyui-gguf",
283
- "aux_id": "city96/ComfyUI-GGUF",
284
- "ver": "1.1.8"
285
- },
286
- "widgets_values": [
287
- "Qwen3-4B.i1-Q5_K_S.gguf",
288
- "lumina2"
289
- ],
290
- "color": "#322",
291
- "bgcolor": "#533",
292
- "shape": 1
293
- },
294
- {
295
- "id": 61,
296
- "type": "VAELoader",
297
- "pos": [
298
- -310,
299
- 450
300
- ],
301
- "size": [
302
- 380,
303
- 90
304
- ],
305
- "flags": {},
306
- "order": 3,
307
- "mode": 0,
308
- "inputs": [],
309
- "outputs": [
310
- {
311
- "name": "VAE",
312
- "type": "VAE",
313
- "links": [
314
- 81
315
- ]
316
- }
317
- ],
318
- "properties": {
319
- "Node name for S&R": "VAELoader",
320
- "cnr_id": "comfy-core",
321
- "ver": "0.3.75"
322
- },
323
- "widgets_values": [
324
- "ae.safetensors"
325
- ],
326
- "color": "#322",
327
- "bgcolor": "#533",
328
- "shape": 1
329
- },
330
- {
331
- "id": 38,
332
- "type": "Reroute",
333
- "pos": [
334
- 110,
335
- 300
336
- ],
337
- "size": [
338
- 75,
339
- 26
340
- ],
341
- "flags": {},
342
- "order": 6,
343
- "mode": 0,
344
- "inputs": [
345
- {
346
- "name": "",
347
- "type": "*",
348
- "link": 80
349
- }
350
- ],
351
- "outputs": [
352
- {
353
- "name": "",
354
- "type": "CLIP",
355
- "links": [
356
- 62
357
- ]
358
- }
359
- ],
360
- "properties": {
361
- "showOutputText": false,
362
- "horizontal": false
363
- }
364
- },
365
- {
366
- "id": 40,
367
- "type": "Reroute",
368
- "pos": [
369
- 110,
370
- 450
371
- ],
372
- "size": [
373
- 75,
374
- 26
375
- ],
376
- "flags": {},
377
- "order": 7,
378
- "mode": 0,
379
- "inputs": [
380
- {
381
- "name": "",
382
- "type": "*",
383
- "link": 81
384
- }
385
- ],
386
- "outputs": [
387
- {
388
- "name": "",
389
- "type": "VAE",
390
- "links": [
391
- 59
392
- ]
393
- }
394
- ],
395
- "properties": {
396
- "showOutputText": false,
397
- "horizontal": false
398
- }
399
- },
400
- {
401
- "id": 55,
402
- "type": "Note",
403
- "pos": [
404
- -1200,
405
- 120
406
- ],
407
- "size": [
408
- 870,
409
- 550
410
- ],
411
- "flags": {},
412
- "order": 4,
413
- "mode": 0,
414
- "inputs": [],
415
- "outputs": [],
416
- "title": "REQUIREMENTS",
417
- "properties": {},
418
- "widgets_values": [
419
- "Z-Image Power Nodes\n\n## Workflow Prerequisites ##\n\nThis workflow requires the following custom nodes, which can be obtained via ComfyUI-Manager:\n\n * Z-Image Power Nodes: https://github.com/yourname/z-power-nodes-old\n * ComfyUI-GGUF : https://github.com/city96/ComfyUI-GGUF\n\n Additionally, ensure you have the following 3 models downloaded and placed in their respective\n directories within your ComfyUI installation:\n\n z_image_turbo-Q5_K_S.gguf\n * Download: https://huggingface.co/jayn7/Z-Image-Turbo-GGUF/blob/main/z_image_turbo-Q5_K_S.gguf\n * Local Directory: `ComfyUI/models/diffusion_models/`\n\n Qwen3-4B.i1-Q5_K_S.gguf\n * Download: https://huggingface.co/mradermacher/Qwen3-4B-i1-GGUF/blob/main/Qwen3-4B.i1-Q5_K_S.gguf\n * Local Directory: `ComfyUI/models/text_encoders/`\n\n ae.safetensors\n * Download: https://huggingface.co/Comfy-Org/z_image_turbo/blob/main/split_files/vae/ae.safetensors\n * Local Directory: `Comfyui/models/vae/`\n\n## More Info ##\n\n- https://github.com/yourname/z-power-nodes-old\n- https://civitai.com/models/2322533/z-image-power-nodes\n\nCreated by Martin Rizzo\n GitHub : https://github.com/martin-rizzo\n CivitAI: https://civitai.com/user/Photographer\n Reddit : https://www.reddit.com/user/FotografoVirtual\n"
420
- ],
421
- "color": "#432",
422
- "bgcolor": "#653"
423
- },
424
- {
425
- "id": 43,
426
- "type": "StylePromptEncoder2 //ZPowerNodesOLD",
427
- "pos": [
428
- 396.5000216648407,
429
- 215.66666596705838
430
- ],
431
- "size": [
432
- 670,
433
- 570
434
- ],
435
- "flags": {},
436
- "order": 8,
437
- "mode": 0,
438
- "inputs": [
439
- {
440
- "name": "clip",
441
- "type": "CLIP",
442
- "link": 62
443
- },
444
- {
445
- "name": "customization",
446
- "shape": 7,
447
- "type": "STRING",
448
- "link": null
449
- }
450
- ],
451
- "outputs": [
452
- {
453
- "name": "CONDITIONING",
454
- "type": "CONDITIONING",
455
- "links": [
456
- 74
457
- ]
458
- },
459
- {
460
- "name": "STRING",
461
- "type": "STRING",
462
- "links": null
463
- }
464
- ],
465
- "properties": {
466
- "Node name for S&R": "StylePromptEncoder2 //ZPowerNodesOLD"
467
- },
468
- "widgets_values": [
469
- "\"Neon Rampage Illustration\"",
470
- null,
471
- null,
472
- "The woman stands against a deep red wall on the left side of the image, casting a pronounced shadow on the wall. She leans against the wall with her arms crossed, maintaining a rigid, upright posture. She is dressed in a black sailor‑style school uniform with crisp white lines, featuring a black belt wrapped snugly around her waist, fastened with a metallic buckle, though it appears slightly loose, allowing a small portion of the uniform’s fabric to peek beneath. Her skirt is a very short, structured miniskirt extending just above her knees, with a subtle slit on the left side revealing a portion of her leg. The skirt has a defined, slightly flared hem with a crisp, clean finish. Her short, straight black hair is neatly styled with straight bangs framing her face, and the rest of her hair is combed back evenly. The hilt of a katana protrudes from behind his shoulder on the left side of his head, held by a wide leather sash that crosses diagonally from her shoulder to encircle her waist. Behind her, to the right of the red wall, there is an open space revealing a single swing set with two wooden swings suspended by chains from a metal frame, positioned on a flat, grassy area. Above this, a stormy sky is visible, filled with dark, heavy clouds and hints of rain or lightning."
473
- ],
474
- "color": "#232",
475
- "bgcolor": "#353",
476
- "shape": 1
477
- },
478
- {
479
- "id": 54,
480
- "type": "ZSamplerTurbo //ZPowerNodesOLD",
481
- "pos": [
482
- 1080,
483
- 160
484
- ],
485
- "size": [
486
- 330,
487
- 630
488
- ],
489
- "flags": {},
490
- "order": 10,
491
- "mode": 0,
492
- "inputs": [
493
- {
494
- "name": "model",
495
- "type": "MODEL",
496
- "link": 73
497
- },
498
- {
499
- "name": "positive",
500
- "type": "CONDITIONING",
501
- "link": 74
502
- },
503
- {
504
- "name": "latent_input",
505
- "type": "LATENT",
506
- "link": 72
507
- }
508
- ],
509
- "outputs": [
510
- {
511
- "name": "latent_output",
512
- "type": "LATENT",
513
- "links": [
514
- 75
515
- ]
516
- }
517
- ],
518
- "properties": {
519
- "Node name for S&R": "ZSamplerTurbo //ZPowerNodesOLD"
520
- },
521
- "widgets_values": [
522
- 1,
523
- "fixed",
524
- 9,
525
- 1,
526
- null,
527
- "100%",
528
- false
529
- ]
530
- }
531
- ],
532
- "links": [
533
- [
534
- 24,
535
- 19,
536
- 0,
537
- 20,
538
- 0,
539
- "VAE"
540
- ],
541
- [
542
- 25,
543
- 20,
544
- 0,
545
- 8,
546
- 1,
547
- "VAE"
548
- ],
549
- [
550
- 47,
551
- 8,
552
- 0,
553
- 31,
554
- 0,
555
- "IMAGE"
556
- ],
557
- [
558
- 59,
559
- 40,
560
- 0,
561
- 19,
562
- 0,
563
- "VAE"
564
- ],
565
- [
566
- 62,
567
- 38,
568
- 0,
569
- 43,
570
- 0,
571
- "CLIP"
572
- ],
573
- [
574
- 72,
575
- 32,
576
- 0,
577
- 54,
578
- 2,
579
- "LATENT"
580
- ],
581
- [
582
- 73,
583
- 39,
584
- 0,
585
- 54,
586
- 0,
587
- "MODEL"
588
- ],
589
- [
590
- 74,
591
- 43,
592
- 0,
593
- 54,
594
- 1,
595
- "CONDITIONING"
596
- ],
597
- [
598
- 75,
599
- 54,
600
- 0,
601
- 8,
602
- 0,
603
- "LATENT"
604
- ],
605
- [
606
- 79,
607
- 59,
608
- 0,
609
- 39,
610
- 0,
611
- "MODEL"
612
- ],
613
- [
614
- 80,
615
- 60,
616
- 0,
617
- 38,
618
- 0,
619
- "CLIP"
620
- ],
621
- [
622
- 81,
623
- 61,
624
- 0,
625
- 40,
626
- 0,
627
- "VAE"
628
- ]
629
- ],
630
- "groups": [
631
- {
632
- "id": 3,
633
- "title": "GGUF MODELS",
634
- "bounding": [
635
- -320,
636
- 90,
637
- 400,
638
- 580
639
- ],
640
- "color": "#b58b2a",
641
- "font_size": 24,
642
- "flags": {}
643
- }
644
- ],
645
- "config": {},
646
- "extra": {
647
- "ds": {
648
- "scale": 0.7513148009015777,
649
- "offset": [
650
- -238.30517454307707,
651
- 151.11873470512978
652
- ]
653
- },
654
- "frontendVersion": "1.37.11",
655
- "workflowRendererVersion": "LG"
656
- },
657
- "version": 0.4
658
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/docs/calibration_examples/photo.jpg DELETED
Binary file (60.7 kB)
 
custom_nodes/z-power-nodes-old/docs/calibration_examples/photo.json DELETED
@@ -1,658 +0,0 @@
1
- {
2
- "id": "f14c6566-993e-4413-bd11-9c7f2ca07fd1",
3
- "revision": 0,
4
- "last_node_id": 61,
5
- "last_link_id": 81,
6
- "nodes": [
7
- {
8
- "id": 8,
9
- "type": "VAEDecode",
10
- "pos": [
11
- 1426.5001954197278,
12
- 155.66666029751312
13
- ],
14
- "size": [
15
- 187.5,
16
- 46
17
- ],
18
- "flags": {},
19
- "order": 12,
20
- "mode": 0,
21
- "inputs": [
22
- {
23
- "name": "samples",
24
- "type": "LATENT",
25
- "link": 75
26
- },
27
- {
28
- "name": "vae",
29
- "type": "VAE",
30
- "link": 25
31
- }
32
- ],
33
- "outputs": [
34
- {
35
- "name": "IMAGE",
36
- "type": "IMAGE",
37
- "slot_index": 0,
38
- "links": [
39
- 47
40
- ]
41
- }
42
- ],
43
- "properties": {
44
- "Node name for S&R": "VAEDecode",
45
- "cnr_id": "comfy-core",
46
- "ver": "0.7.0"
47
- },
48
- "widgets_values": []
49
- },
50
- {
51
- "id": 31,
52
- "type": "SaveImage //ZPowerNodesOLD",
53
- "pos": [
54
- 1629.0000113262572,
55
- 159.27775418691726
56
- ],
57
- "size": [
58
- 540,
59
- 870.390625
60
- ],
61
- "flags": {},
62
- "order": 13,
63
- "mode": 0,
64
- "inputs": [
65
- {
66
- "name": "images",
67
- "type": "IMAGE",
68
- "link": 47
69
- }
70
- ],
71
- "outputs": [],
72
- "properties": {
73
- "Node name for S&R": "SaveImage //ZPowerNodesOLD"
74
- },
75
- "widgets_values": [
76
- "ZImage/%date:yyyy_MM_dd%/ZI",
77
- true
78
- ]
79
- },
80
- {
81
- "id": 39,
82
- "type": "Reroute",
83
- "pos": [
84
- 110,
85
- 160
86
- ],
87
- "size": [
88
- 75,
89
- 26
90
- ],
91
- "flags": {},
92
- "order": 5,
93
- "mode": 0,
94
- "inputs": [
95
- {
96
- "name": "",
97
- "type": "*",
98
- "link": 79
99
- }
100
- ],
101
- "outputs": [
102
- {
103
- "name": "",
104
- "type": "MODEL",
105
- "links": [
106
- 73
107
- ]
108
- }
109
- ],
110
- "properties": {
111
- "showOutputText": false,
112
- "horizontal": false
113
- }
114
- },
115
- {
116
- "id": 20,
117
- "type": "Reroute",
118
- "pos": [
119
- 1180,
120
- 800
121
- ],
122
- "size": [
123
- 75,
124
- 26
125
- ],
126
- "flags": {},
127
- "order": 11,
128
- "mode": 0,
129
- "inputs": [
130
- {
131
- "name": "",
132
- "type": "*",
133
- "link": 24
134
- }
135
- ],
136
- "outputs": [
137
- {
138
- "name": "",
139
- "type": "VAE",
140
- "links": [
141
- 25
142
- ]
143
- }
144
- ],
145
- "properties": {
146
- "showOutputText": false,
147
- "horizontal": false
148
- }
149
- },
150
- {
151
- "id": 19,
152
- "type": "Reroute",
153
- "pos": [
154
- 230,
155
- 800
156
- ],
157
- "size": [
158
- 75,
159
- 26
160
- ],
161
- "flags": {},
162
- "order": 9,
163
- "mode": 0,
164
- "inputs": [
165
- {
166
- "name": "",
167
- "type": "*",
168
- "link": 59
169
- }
170
- ],
171
- "outputs": [
172
- {
173
- "name": "",
174
- "type": "VAE",
175
- "links": [
176
- 24
177
- ]
178
- }
179
- ],
180
- "properties": {
181
- "showOutputText": false,
182
- "horizontal": false
183
- }
184
- },
185
- {
186
- "id": 32,
187
- "type": "EmptyZImageLatentImage //ZPowerNodesOLD",
188
- "pos": [
189
- 736.5000260003749,
190
- 25.666678410876642
191
- ],
192
- "size": [
193
- 316.92708333333337,
194
- 130
195
- ],
196
- "flags": {},
197
- "order": 0,
198
- "mode": 0,
199
- "inputs": [],
200
- "outputs": [
201
- {
202
- "name": "LATENT",
203
- "type": "LATENT",
204
- "links": [
205
- 72
206
- ]
207
- }
208
- ],
209
- "properties": {
210
- "Node name for S&R": "EmptyZImageLatentImage //ZPowerNodesOLD"
211
- },
212
- "widgets_values": [
213
- false,
214
- "3:2 (photo)",
215
- "medium (recommended)",
216
- 1
217
- ]
218
- },
219
- {
220
- "id": 59,
221
- "type": "UnetLoaderGGUF",
222
- "pos": [
223
- -310,
224
- 160
225
- ],
226
- "size": [
227
- 380,
228
- 90
229
- ],
230
- "flags": {},
231
- "order": 1,
232
- "mode": 0,
233
- "inputs": [],
234
- "outputs": [
235
- {
236
- "name": "MODEL",
237
- "type": "MODEL",
238
- "links": [
239
- 79
240
- ]
241
- }
242
- ],
243
- "properties": {
244
- "Node name for S&R": "UnetLoaderGGUF",
245
- "cnr_id": "comfyui-gguf",
246
- "aux_id": "city96/ComfyUI-GGUF",
247
- "ver": "1.1.8"
248
- },
249
- "widgets_values": [
250
- "z_image_turbo-Q5_K_S.gguf"
251
- ],
252
- "color": "#322",
253
- "bgcolor": "#533",
254
- "shape": 1
255
- },
256
- {
257
- "id": 60,
258
- "type": "CLIPLoaderGGUF",
259
- "pos": [
260
- -310,
261
- 300
262
- ],
263
- "size": [
264
- 380,
265
- 100
266
- ],
267
- "flags": {},
268
- "order": 2,
269
- "mode": 0,
270
- "inputs": [],
271
- "outputs": [
272
- {
273
- "name": "CLIP",
274
- "type": "CLIP",
275
- "links": [
276
- 80
277
- ]
278
- }
279
- ],
280
- "properties": {
281
- "Node name for S&R": "CLIPLoaderGGUF",
282
- "cnr_id": "comfyui-gguf",
283
- "aux_id": "city96/ComfyUI-GGUF",
284
- "ver": "1.1.8"
285
- },
286
- "widgets_values": [
287
- "Qwen3-4B.i1-Q5_K_S.gguf",
288
- "lumina2"
289
- ],
290
- "color": "#322",
291
- "bgcolor": "#533",
292
- "shape": 1
293
- },
294
- {
295
- "id": 61,
296
- "type": "VAELoader",
297
- "pos": [
298
- -310,
299
- 450
300
- ],
301
- "size": [
302
- 380,
303
- 90
304
- ],
305
- "flags": {},
306
- "order": 3,
307
- "mode": 0,
308
- "inputs": [],
309
- "outputs": [
310
- {
311
- "name": "VAE",
312
- "type": "VAE",
313
- "links": [
314
- 81
315
- ]
316
- }
317
- ],
318
- "properties": {
319
- "Node name for S&R": "VAELoader",
320
- "cnr_id": "comfy-core",
321
- "ver": "0.3.75"
322
- },
323
- "widgets_values": [
324
- "ae.safetensors"
325
- ],
326
- "color": "#322",
327
- "bgcolor": "#533",
328
- "shape": 1
329
- },
330
- {
331
- "id": 38,
332
- "type": "Reroute",
333
- "pos": [
334
- 110,
335
- 300
336
- ],
337
- "size": [
338
- 75,
339
- 26
340
- ],
341
- "flags": {},
342
- "order": 6,
343
- "mode": 0,
344
- "inputs": [
345
- {
346
- "name": "",
347
- "type": "*",
348
- "link": 80
349
- }
350
- ],
351
- "outputs": [
352
- {
353
- "name": "",
354
- "type": "CLIP",
355
- "links": [
356
- 62
357
- ]
358
- }
359
- ],
360
- "properties": {
361
- "showOutputText": false,
362
- "horizontal": false
363
- }
364
- },
365
- {
366
- "id": 40,
367
- "type": "Reroute",
368
- "pos": [
369
- 110,
370
- 450
371
- ],
372
- "size": [
373
- 75,
374
- 26
375
- ],
376
- "flags": {},
377
- "order": 7,
378
- "mode": 0,
379
- "inputs": [
380
- {
381
- "name": "",
382
- "type": "*",
383
- "link": 81
384
- }
385
- ],
386
- "outputs": [
387
- {
388
- "name": "",
389
- "type": "VAE",
390
- "links": [
391
- 59
392
- ]
393
- }
394
- ],
395
- "properties": {
396
- "showOutputText": false,
397
- "horizontal": false
398
- }
399
- },
400
- {
401
- "id": 55,
402
- "type": "Note",
403
- "pos": [
404
- -1200,
405
- 120
406
- ],
407
- "size": [
408
- 870,
409
- 550
410
- ],
411
- "flags": {},
412
- "order": 4,
413
- "mode": 0,
414
- "inputs": [],
415
- "outputs": [],
416
- "title": "REQUIREMENTS",
417
- "properties": {},
418
- "widgets_values": [
419
- "Z-Image Power Nodes\n\n## Workflow Prerequisites ##\n\nThis workflow requires the following custom nodes, which can be obtained via ComfyUI-Manager:\n\n * Z-Image Power Nodes: https://github.com/yourname/z-power-nodes-old\n * ComfyUI-GGUF : https://github.com/city96/ComfyUI-GGUF\n\n Additionally, ensure you have the following 3 models downloaded and placed in their respective\n directories within your ComfyUI installation:\n\n z_image_turbo-Q5_K_S.gguf\n * Download: https://huggingface.co/jayn7/Z-Image-Turbo-GGUF/blob/main/z_image_turbo-Q5_K_S.gguf\n * Local Directory: `ComfyUI/models/diffusion_models/`\n\n Qwen3-4B.i1-Q5_K_S.gguf\n * Download: https://huggingface.co/mradermacher/Qwen3-4B-i1-GGUF/blob/main/Qwen3-4B.i1-Q5_K_S.gguf\n * Local Directory: `ComfyUI/models/text_encoders/`\n\n ae.safetensors\n * Download: https://huggingface.co/Comfy-Org/z_image_turbo/blob/main/split_files/vae/ae.safetensors\n * Local Directory: `Comfyui/models/vae/`\n\n## More Info ##\n\n- https://github.com/yourname/z-power-nodes-old\n- https://civitai.com/models/2322533/z-image-power-nodes\n\nCreated by Martin Rizzo\n GitHub : https://github.com/martin-rizzo\n CivitAI: https://civitai.com/user/Photographer\n Reddit : https://www.reddit.com/user/FotografoVirtual\n"
420
- ],
421
- "color": "#432",
422
- "bgcolor": "#653"
423
- },
424
- {
425
- "id": 43,
426
- "type": "StylePromptEncoder2 //ZPowerNodesOLD",
427
- "pos": [
428
- 396.5000216648407,
429
- 215.66666596705838
430
- ],
431
- "size": [
432
- 670,
433
- 570
434
- ],
435
- "flags": {},
436
- "order": 8,
437
- "mode": 0,
438
- "inputs": [
439
- {
440
- "name": "clip",
441
- "type": "CLIP",
442
- "link": 62
443
- },
444
- {
445
- "name": "customization",
446
- "shape": 7,
447
- "type": "STRING",
448
- "link": null
449
- }
450
- ],
451
- "outputs": [
452
- {
453
- "name": "CONDITIONING",
454
- "type": "CONDITIONING",
455
- "links": [
456
- 74
457
- ]
458
- },
459
- {
460
- "name": "STRING",
461
- "type": "STRING",
462
- "links": null
463
- }
464
- ],
465
- "properties": {
466
- "Node name for S&R": "StylePromptEncoder2 //ZPowerNodesOLD"
467
- },
468
- "widgets_values": [
469
- "\"Noir Photo\"",
470
- null,
471
- null,
472
- "The woman stands against a deep red wall on the left side of the image, casting a pronounced shadow on the wall. She leans against the wall with her arms crossed, maintaining a rigid, upright posture. She is dressed in a black sailor‑style school uniform with crisp white lines, featuring a black belt wrapped snugly around her waist, fastened with a metallic buckle, though it appears slightly loose, allowing a small portion of the uniform’s fabric to peek beneath. Her skirt is a very short, structured miniskirt extending just above her knees, with a subtle slit on the left side revealing a portion of her leg. The skirt has a defined, slightly flared hem with a crisp, clean finish. Her short, straight black hair is neatly styled with straight bangs framing her face, and the rest of her hair is combed back evenly. The hilt of a katana protrudes from behind his shoulder on the left side of his head, held by a wide leather sash that crosses diagonally from her shoulder to encircle her waist. Behind her, to the right of the red wall, there is an open space revealing a single swing set with two wooden swings suspended by chains from a metal frame, positioned on a flat, grassy area. Above this, a stormy sky is visible, filled with dark, heavy clouds and hints of rain or lightning."
473
- ],
474
- "color": "#232",
475
- "bgcolor": "#353",
476
- "shape": 1
477
- },
478
- {
479
- "id": 54,
480
- "type": "ZSamplerTurbo //ZPowerNodesOLD",
481
- "pos": [
482
- 1080,
483
- 160
484
- ],
485
- "size": [
486
- 330,
487
- 630
488
- ],
489
- "flags": {},
490
- "order": 10,
491
- "mode": 0,
492
- "inputs": [
493
- {
494
- "name": "model",
495
- "type": "MODEL",
496
- "link": 73
497
- },
498
- {
499
- "name": "positive",
500
- "type": "CONDITIONING",
501
- "link": 74
502
- },
503
- {
504
- "name": "latent_input",
505
- "type": "LATENT",
506
- "link": 72
507
- }
508
- ],
509
- "outputs": [
510
- {
511
- "name": "latent_output",
512
- "type": "LATENT",
513
- "links": [
514
- 75
515
- ]
516
- }
517
- ],
518
- "properties": {
519
- "Node name for S&R": "ZSamplerTurbo //ZPowerNodesOLD"
520
- },
521
- "widgets_values": [
522
- 2,
523
- "fixed",
524
- 9,
525
- 1,
526
- null,
527
- "100%",
528
- false
529
- ]
530
- }
531
- ],
532
- "links": [
533
- [
534
- 24,
535
- 19,
536
- 0,
537
- 20,
538
- 0,
539
- "VAE"
540
- ],
541
- [
542
- 25,
543
- 20,
544
- 0,
545
- 8,
546
- 1,
547
- "VAE"
548
- ],
549
- [
550
- 47,
551
- 8,
552
- 0,
553
- 31,
554
- 0,
555
- "IMAGE"
556
- ],
557
- [
558
- 59,
559
- 40,
560
- 0,
561
- 19,
562
- 0,
563
- "VAE"
564
- ],
565
- [
566
- 62,
567
- 38,
568
- 0,
569
- 43,
570
- 0,
571
- "CLIP"
572
- ],
573
- [
574
- 72,
575
- 32,
576
- 0,
577
- 54,
578
- 2,
579
- "LATENT"
580
- ],
581
- [
582
- 73,
583
- 39,
584
- 0,
585
- 54,
586
- 0,
587
- "MODEL"
588
- ],
589
- [
590
- 74,
591
- 43,
592
- 0,
593
- 54,
594
- 1,
595
- "CONDITIONING"
596
- ],
597
- [
598
- 75,
599
- 54,
600
- 0,
601
- 8,
602
- 0,
603
- "LATENT"
604
- ],
605
- [
606
- 79,
607
- 59,
608
- 0,
609
- 39,
610
- 0,
611
- "MODEL"
612
- ],
613
- [
614
- 80,
615
- 60,
616
- 0,
617
- 38,
618
- 0,
619
- "CLIP"
620
- ],
621
- [
622
- 81,
623
- 61,
624
- 0,
625
- 40,
626
- 0,
627
- "VAE"
628
- ]
629
- ],
630
- "groups": [
631
- {
632
- "id": 3,
633
- "title": "GGUF MODELS",
634
- "bounding": [
635
- -320,
636
- 90,
637
- 400,
638
- 580
639
- ],
640
- "color": "#b58b2a",
641
- "font_size": 24,
642
- "flags": {}
643
- }
644
- ],
645
- "config": {},
646
- "extra": {
647
- "ds": {
648
- "scale": 0.7513148009015777,
649
- "offset": [
650
- -238.30517454307707,
651
- 151.11873470512978
652
- ]
653
- },
654
- "frontendVersion": "1.37.11",
655
- "workflowRendererVersion": "LG"
656
- },
657
- "version": 0.4
658
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/docs/calibration_examples/stamp.jpg DELETED
Binary file (98.2 kB)
 
custom_nodes/z-power-nodes-old/docs/calibration_examples/stamp.json DELETED
@@ -1,658 +0,0 @@
1
- {
2
- "id": "f14c6566-993e-4413-bd11-9c7f2ca07fd1",
3
- "revision": 0,
4
- "last_node_id": 61,
5
- "last_link_id": 81,
6
- "nodes": [
7
- {
8
- "id": 8,
9
- "type": "VAEDecode",
10
- "pos": [
11
- 1426.5001954197278,
12
- 155.66666029751312
13
- ],
14
- "size": [
15
- 187.5,
16
- 46
17
- ],
18
- "flags": {},
19
- "order": 12,
20
- "mode": 0,
21
- "inputs": [
22
- {
23
- "name": "samples",
24
- "type": "LATENT",
25
- "link": 75
26
- },
27
- {
28
- "name": "vae",
29
- "type": "VAE",
30
- "link": 25
31
- }
32
- ],
33
- "outputs": [
34
- {
35
- "name": "IMAGE",
36
- "type": "IMAGE",
37
- "slot_index": 0,
38
- "links": [
39
- 47
40
- ]
41
- }
42
- ],
43
- "properties": {
44
- "Node name for S&R": "VAEDecode",
45
- "cnr_id": "comfy-core",
46
- "ver": "0.7.0"
47
- },
48
- "widgets_values": []
49
- },
50
- {
51
- "id": 31,
52
- "type": "SaveImage //ZPowerNodesOLD",
53
- "pos": [
54
- 1629.0000113262572,
55
- 159.27775418691726
56
- ],
57
- "size": [
58
- 540,
59
- 870.390625
60
- ],
61
- "flags": {},
62
- "order": 13,
63
- "mode": 0,
64
- "inputs": [
65
- {
66
- "name": "images",
67
- "type": "IMAGE",
68
- "link": 47
69
- }
70
- ],
71
- "outputs": [],
72
- "properties": {
73
- "Node name for S&R": "SaveImage //ZPowerNodesOLD"
74
- },
75
- "widgets_values": [
76
- "ZImage/%date:yyyy_MM_dd%/ZI",
77
- true
78
- ]
79
- },
80
- {
81
- "id": 39,
82
- "type": "Reroute",
83
- "pos": [
84
- 110,
85
- 160
86
- ],
87
- "size": [
88
- 75,
89
- 26
90
- ],
91
- "flags": {},
92
- "order": 5,
93
- "mode": 0,
94
- "inputs": [
95
- {
96
- "name": "",
97
- "type": "*",
98
- "link": 79
99
- }
100
- ],
101
- "outputs": [
102
- {
103
- "name": "",
104
- "type": "MODEL",
105
- "links": [
106
- 73
107
- ]
108
- }
109
- ],
110
- "properties": {
111
- "showOutputText": false,
112
- "horizontal": false
113
- }
114
- },
115
- {
116
- "id": 20,
117
- "type": "Reroute",
118
- "pos": [
119
- 1180,
120
- 800
121
- ],
122
- "size": [
123
- 75,
124
- 26
125
- ],
126
- "flags": {},
127
- "order": 11,
128
- "mode": 0,
129
- "inputs": [
130
- {
131
- "name": "",
132
- "type": "*",
133
- "link": 24
134
- }
135
- ],
136
- "outputs": [
137
- {
138
- "name": "",
139
- "type": "VAE",
140
- "links": [
141
- 25
142
- ]
143
- }
144
- ],
145
- "properties": {
146
- "showOutputText": false,
147
- "horizontal": false
148
- }
149
- },
150
- {
151
- "id": 19,
152
- "type": "Reroute",
153
- "pos": [
154
- 230,
155
- 800
156
- ],
157
- "size": [
158
- 75,
159
- 26
160
- ],
161
- "flags": {},
162
- "order": 9,
163
- "mode": 0,
164
- "inputs": [
165
- {
166
- "name": "",
167
- "type": "*",
168
- "link": 59
169
- }
170
- ],
171
- "outputs": [
172
- {
173
- "name": "",
174
- "type": "VAE",
175
- "links": [
176
- 24
177
- ]
178
- }
179
- ],
180
- "properties": {
181
- "showOutputText": false,
182
- "horizontal": false
183
- }
184
- },
185
- {
186
- "id": 32,
187
- "type": "EmptyZImageLatentImage //ZPowerNodesOLD",
188
- "pos": [
189
- 736.5000260003749,
190
- 25.666678410876642
191
- ],
192
- "size": [
193
- 316.92708333333337,
194
- 130
195
- ],
196
- "flags": {},
197
- "order": 0,
198
- "mode": 0,
199
- "inputs": [],
200
- "outputs": [
201
- {
202
- "name": "LATENT",
203
- "type": "LATENT",
204
- "links": [
205
- 72
206
- ]
207
- }
208
- ],
209
- "properties": {
210
- "Node name for S&R": "EmptyZImageLatentImage //ZPowerNodesOLD"
211
- },
212
- "widgets_values": [
213
- false,
214
- "3:2 (photo)",
215
- "medium (recommended)",
216
- 1
217
- ]
218
- },
219
- {
220
- "id": 59,
221
- "type": "UnetLoaderGGUF",
222
- "pos": [
223
- -310,
224
- 160
225
- ],
226
- "size": [
227
- 380,
228
- 90
229
- ],
230
- "flags": {},
231
- "order": 1,
232
- "mode": 0,
233
- "inputs": [],
234
- "outputs": [
235
- {
236
- "name": "MODEL",
237
- "type": "MODEL",
238
- "links": [
239
- 79
240
- ]
241
- }
242
- ],
243
- "properties": {
244
- "Node name for S&R": "UnetLoaderGGUF",
245
- "cnr_id": "comfyui-gguf",
246
- "aux_id": "city96/ComfyUI-GGUF",
247
- "ver": "1.1.8"
248
- },
249
- "widgets_values": [
250
- "z_image_turbo-Q5_K_S.gguf"
251
- ],
252
- "color": "#322",
253
- "bgcolor": "#533",
254
- "shape": 1
255
- },
256
- {
257
- "id": 60,
258
- "type": "CLIPLoaderGGUF",
259
- "pos": [
260
- -310,
261
- 300
262
- ],
263
- "size": [
264
- 380,
265
- 100
266
- ],
267
- "flags": {},
268
- "order": 2,
269
- "mode": 0,
270
- "inputs": [],
271
- "outputs": [
272
- {
273
- "name": "CLIP",
274
- "type": "CLIP",
275
- "links": [
276
- 80
277
- ]
278
- }
279
- ],
280
- "properties": {
281
- "Node name for S&R": "CLIPLoaderGGUF",
282
- "cnr_id": "comfyui-gguf",
283
- "aux_id": "city96/ComfyUI-GGUF",
284
- "ver": "1.1.8"
285
- },
286
- "widgets_values": [
287
- "Qwen3-4B.i1-Q5_K_S.gguf",
288
- "lumina2"
289
- ],
290
- "color": "#322",
291
- "bgcolor": "#533",
292
- "shape": 1
293
- },
294
- {
295
- "id": 61,
296
- "type": "VAELoader",
297
- "pos": [
298
- -310,
299
- 450
300
- ],
301
- "size": [
302
- 380,
303
- 90
304
- ],
305
- "flags": {},
306
- "order": 3,
307
- "mode": 0,
308
- "inputs": [],
309
- "outputs": [
310
- {
311
- "name": "VAE",
312
- "type": "VAE",
313
- "links": [
314
- 81
315
- ]
316
- }
317
- ],
318
- "properties": {
319
- "Node name for S&R": "VAELoader",
320
- "cnr_id": "comfy-core",
321
- "ver": "0.3.75"
322
- },
323
- "widgets_values": [
324
- "ae.safetensors"
325
- ],
326
- "color": "#322",
327
- "bgcolor": "#533",
328
- "shape": 1
329
- },
330
- {
331
- "id": 38,
332
- "type": "Reroute",
333
- "pos": [
334
- 110,
335
- 300
336
- ],
337
- "size": [
338
- 75,
339
- 26
340
- ],
341
- "flags": {},
342
- "order": 6,
343
- "mode": 0,
344
- "inputs": [
345
- {
346
- "name": "",
347
- "type": "*",
348
- "link": 80
349
- }
350
- ],
351
- "outputs": [
352
- {
353
- "name": "",
354
- "type": "CLIP",
355
- "links": [
356
- 62
357
- ]
358
- }
359
- ],
360
- "properties": {
361
- "showOutputText": false,
362
- "horizontal": false
363
- }
364
- },
365
- {
366
- "id": 40,
367
- "type": "Reroute",
368
- "pos": [
369
- 110,
370
- 450
371
- ],
372
- "size": [
373
- 75,
374
- 26
375
- ],
376
- "flags": {},
377
- "order": 7,
378
- "mode": 0,
379
- "inputs": [
380
- {
381
- "name": "",
382
- "type": "*",
383
- "link": 81
384
- }
385
- ],
386
- "outputs": [
387
- {
388
- "name": "",
389
- "type": "VAE",
390
- "links": [
391
- 59
392
- ]
393
- }
394
- ],
395
- "properties": {
396
- "showOutputText": false,
397
- "horizontal": false
398
- }
399
- },
400
- {
401
- "id": 55,
402
- "type": "Note",
403
- "pos": [
404
- -1200,
405
- 120
406
- ],
407
- "size": [
408
- 870,
409
- 550
410
- ],
411
- "flags": {},
412
- "order": 4,
413
- "mode": 0,
414
- "inputs": [],
415
- "outputs": [],
416
- "title": "REQUIREMENTS",
417
- "properties": {},
418
- "widgets_values": [
419
- "Z-Image Power Nodes\n\n## Workflow Prerequisites ##\n\nThis workflow requires the following custom nodes, which can be obtained via ComfyUI-Manager:\n\n * Z-Image Power Nodes: https://github.com/yourname/z-power-nodes-old\n * ComfyUI-GGUF : https://github.com/city96/ComfyUI-GGUF\n\n Additionally, ensure you have the following 3 models downloaded and placed in their respective\n directories within your ComfyUI installation:\n\n z_image_turbo-Q5_K_S.gguf\n * Download: https://huggingface.co/jayn7/Z-Image-Turbo-GGUF/blob/main/z_image_turbo-Q5_K_S.gguf\n * Local Directory: `ComfyUI/models/diffusion_models/`\n\n Qwen3-4B.i1-Q5_K_S.gguf\n * Download: https://huggingface.co/mradermacher/Qwen3-4B-i1-GGUF/blob/main/Qwen3-4B.i1-Q5_K_S.gguf\n * Local Directory: `ComfyUI/models/text_encoders/`\n\n ae.safetensors\n * Download: https://huggingface.co/Comfy-Org/z_image_turbo/blob/main/split_files/vae/ae.safetensors\n * Local Directory: `Comfyui/models/vae/`\n\n## More Info ##\n\n- https://github.com/yourname/z-power-nodes-old\n- https://civitai.com/models/2322533/z-image-power-nodes\n\nCreated by Martin Rizzo\n GitHub : https://github.com/martin-rizzo\n CivitAI: https://civitai.com/user/Photographer\n Reddit : https://www.reddit.com/user/FotografoVirtual\n"
420
- ],
421
- "color": "#432",
422
- "bgcolor": "#653"
423
- },
424
- {
425
- "id": 43,
426
- "type": "StylePromptEncoder2 //ZPowerNodesOLD",
427
- "pos": [
428
- 396.5000216648407,
429
- 215.66666596705838
430
- ],
431
- "size": [
432
- 670,
433
- 570
434
- ],
435
- "flags": {},
436
- "order": 8,
437
- "mode": 0,
438
- "inputs": [
439
- {
440
- "name": "clip",
441
- "type": "CLIP",
442
- "link": 62
443
- },
444
- {
445
- "name": "customization",
446
- "shape": 7,
447
- "type": "STRING",
448
- "link": null
449
- }
450
- ],
451
- "outputs": [
452
- {
453
- "name": "CONDITIONING",
454
- "type": "CONDITIONING",
455
- "links": [
456
- 74
457
- ]
458
- },
459
- {
460
- "name": "STRING",
461
- "type": "STRING",
462
- "links": null
463
- }
464
- ],
465
- "properties": {
466
- "Node name for S&R": "StylePromptEncoder2 //ZPowerNodesOLD"
467
- },
468
- "widgets_values": [
469
- "\"Stamp\"",
470
- null,
471
- null,
472
- "The woman stands against a deep red wall on the left side of the image, casting a pronounced shadow on the wall. She leans against the wall with her arms crossed, maintaining a rigid, upright posture. She is dressed in a black sailor‑style school uniform with crisp white lines, featuring a black belt wrapped snugly around her waist, fastened with a metallic buckle, though it appears slightly loose, allowing a small portion of the uniform’s fabric to peek beneath. Her skirt is a very short, structured miniskirt extending just above her knees, with a subtle slit on the left side revealing a portion of her leg. The skirt has a defined, slightly flared hem with a crisp, clean finish. Her short, straight black hair is neatly styled with straight bangs framing her face, and the rest of her hair is combed back evenly. The hilt of a katana protrudes from behind his shoulder on the left side of his head, held by a wide leather sash that crosses diagonally from her shoulder to encircle her waist. Behind her, to the right of the red wall, there is an open space revealing a single swing set with two wooden swings suspended by chains from a metal frame, positioned on a flat, grassy area. Above this, a stormy sky is visible, filled with dark, heavy clouds and hints of rain or lightning."
473
- ],
474
- "color": "#232",
475
- "bgcolor": "#353",
476
- "shape": 1
477
- },
478
- {
479
- "id": 54,
480
- "type": "ZSamplerTurbo //ZPowerNodesOLD",
481
- "pos": [
482
- 1080,
483
- 160
484
- ],
485
- "size": [
486
- 330,
487
- 630
488
- ],
489
- "flags": {},
490
- "order": 10,
491
- "mode": 0,
492
- "inputs": [
493
- {
494
- "name": "model",
495
- "type": "MODEL",
496
- "link": 73
497
- },
498
- {
499
- "name": "positive",
500
- "type": "CONDITIONING",
501
- "link": 74
502
- },
503
- {
504
- "name": "latent_input",
505
- "type": "LATENT",
506
- "link": 72
507
- }
508
- ],
509
- "outputs": [
510
- {
511
- "name": "latent_output",
512
- "type": "LATENT",
513
- "links": [
514
- 75
515
- ]
516
- }
517
- ],
518
- "properties": {
519
- "Node name for S&R": "ZSamplerTurbo //ZPowerNodesOLD"
520
- },
521
- "widgets_values": [
522
- 1,
523
- "fixed",
524
- 9,
525
- 1,
526
- null,
527
- "off",
528
- false
529
- ]
530
- }
531
- ],
532
- "links": [
533
- [
534
- 24,
535
- 19,
536
- 0,
537
- 20,
538
- 0,
539
- "VAE"
540
- ],
541
- [
542
- 25,
543
- 20,
544
- 0,
545
- 8,
546
- 1,
547
- "VAE"
548
- ],
549
- [
550
- 47,
551
- 8,
552
- 0,
553
- 31,
554
- 0,
555
- "IMAGE"
556
- ],
557
- [
558
- 59,
559
- 40,
560
- 0,
561
- 19,
562
- 0,
563
- "VAE"
564
- ],
565
- [
566
- 62,
567
- 38,
568
- 0,
569
- 43,
570
- 0,
571
- "CLIP"
572
- ],
573
- [
574
- 72,
575
- 32,
576
- 0,
577
- 54,
578
- 2,
579
- "LATENT"
580
- ],
581
- [
582
- 73,
583
- 39,
584
- 0,
585
- 54,
586
- 0,
587
- "MODEL"
588
- ],
589
- [
590
- 74,
591
- 43,
592
- 0,
593
- 54,
594
- 1,
595
- "CONDITIONING"
596
- ],
597
- [
598
- 75,
599
- 54,
600
- 0,
601
- 8,
602
- 0,
603
- "LATENT"
604
- ],
605
- [
606
- 79,
607
- 59,
608
- 0,
609
- 39,
610
- 0,
611
- "MODEL"
612
- ],
613
- [
614
- 80,
615
- 60,
616
- 0,
617
- 38,
618
- 0,
619
- "CLIP"
620
- ],
621
- [
622
- 81,
623
- 61,
624
- 0,
625
- 40,
626
- 0,
627
- "VAE"
628
- ]
629
- ],
630
- "groups": [
631
- {
632
- "id": 3,
633
- "title": "GGUF MODELS",
634
- "bounding": [
635
- -320,
636
- 90,
637
- 400,
638
- 580
639
- ],
640
- "color": "#b58b2a",
641
- "font_size": 24,
642
- "flags": {}
643
- }
644
- ],
645
- "config": {},
646
- "extra": {
647
- "ds": {
648
- "scale": 0.7513148009015777,
649
- "offset": [
650
- -238.30517454307707,
651
- 151.11873470512978
652
- ]
653
- },
654
- "frontendVersion": "1.37.11",
655
- "workflowRendererVersion": "LG"
656
- },
657
- "version": 0.4
658
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/docs/empty_zimage_latent_image.jpg DELETED
Binary file (23.7 kB)
 
custom_nodes/z-power-nodes-old/docs/empty_zimage_latent_image.md DELETED
@@ -1,40 +0,0 @@
1
- # Empty Z-Image Latent Image
2
- ![Node](/docs/empty_zimage_latent_image.jpg)
3
-
4
- This node generates an empty latent image specifically formatted for use in Z-Image workflows. It allows users to define key parameters such as orientation, aspect ratio, scale, and batch size, providing a customizable starting point for image generation.
5
-
6
- ## Inputs
7
-
8
- ### landscape
9
- * __true__: Sets the orientation to landscape (horizontal).
10
- * __false__: Sets the orientation to portrait (vertical).
11
-
12
- ### ratio
13
- Determines the desired aspect ratio of the image:
14
- * __1:1 (square)__: Social media posts and profile pictures
15
- * __4:3 (retro tv)__: Legacy television and older computer monitors
16
- * __3:2 (photo)__: DSLR cameras and standard 35mm film
17
- * __16:10 (monitor)__: Common in MacBooks and productivity laptops
18
- * __16:9 (widescreen)__: Current universal standard for video and TV
19
- * __2:1 (univisium)__: Modern streaming series and smartphone screens
20
- * __21:9 (ultrawide)__: Wide cinema format and ultrawide monitors
21
- * __12:5 (anamorphic)__: Standard theatrical widescreen cinema release
22
- * __70:27 (cinerama)__: Extreme panoramic cinema format
23
- * __32:9 (super wide)__: Dual-monitor width for ultra-wide displays
24
-
25
- <sub>**Note:** As the aspect ratio becomes more extreme, there is a higher likelihood of visual inconsistencies in the generated image.</sub>
26
-
27
- ### size
28
- Controls the scale of the latent image:
29
- * __small__: Lower resolution, ideal for quick previews or low-resource operations.
30
- * __medium (recommended)__: Higher visual consistency compared to other sizes.
31
- * __large__: Highest detail level, though may occasionally exhibit slightly reduced coherence.
32
-
33
- ### batch_size
34
- The number of identical empty latent images to generate simultaneously. This option is useful for parallel processing tasks or creating multiple image variations at once.
35
-
36
- ## Outputs
37
-
38
- ### latent
39
- The generated empty latent image ready to be used as the initial canvas in your Z-Image diffusion processes.
40
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/docs/my_top_10_styles.jpg DELETED
Binary file (59.7 kB)
 
custom_nodes/z-power-nodes-old/docs/my_top_10_styles.md DELETED
@@ -1,32 +0,0 @@
1
- # My Top-10 Styles & Editor
2
- <img src="/docs/my_top_10_styles.jpg" width="66%"></img>
3
-
4
- The "My Top-10 Styles" and "My Top-10 Styles (Editor)" nodes work together to create a list of favorite styles, allowing for quick selection from this list. If you frequently use a couple of specific styles, these nodes enable you to set up a workflow where those styles are just one click away.
5
-
6
- The editor node is straightforward: it lets you specify which style occupies each of the 10 available positions in the list. It must always be connected to the primary "My Top-10 Styles" node via the "top_styles" input.
7
-
8
-
9
- ## Inputs
10
-
11
- ### input
12
- Optional input that enables concatenation with other "My Top-10 Styles" nodes, expanding the style list beyond 10 entries.
13
-
14
- ### top_styles
15
- The list of selected 10 styles, which should always be connected to a "My Top-10 Styles (Editor)" node.
16
-
17
- ### \<style selection switches\>
18
- Ten toggle switches labeled from 1 to 10. These allow you to easily choose which of the predefined styles is active, corresponding directly to their position in the list configured via the editor node.
19
-
20
- ### control_after_generate
21
- Provides the option for the selected style to change after each generation. This way, you can automatically generate the same prompt with different styles.
22
-
23
- ### output_to
24
- Specifies under which custom style slot the selected style will be found. For example, if set to "custom_1" and the current selection is "selfie", then the "Custom 1" style slot will behave exactly like "Selfie".
25
- Typically this parameter should be set to "custom_1" across all nodes in a chain. The node responsible for encoding prompts, such as "Style & Prompt Encoder", should also have "Custom 1" selected as the active style. However, advanced configurations can use up to four different slots ("custom_1" to "custom_4").
26
-
27
-
28
- ## Outputs
29
-
30
- ### output
31
- Main output port, usually connected to nodes like "Style & Prompt Encoder" or "Style String Injector".
32
- This port also allows concatenation with other "My Top-10 Styles" nodes in a chain to increase the number of available styles.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/docs/save_image.jpg DELETED
Binary file (58.2 kB)
 
custom_nodes/z-power-nodes-old/docs/save_image.md DELETED
@@ -1,21 +0,0 @@
1
- # Save Image
2
- ![Node](/docs/save_image.jpg)
3
-
4
- This node works similarly to the native ComfyUI "Save Image" but includes an option to save metadata compatible with CivitAI. It streamlines the process of sharing your generation parameters on the CivitAI platform by structuring the image metadata in a format that CivitAI readily recognizes.
5
-
6
- ### CivitAI Metadata Export Process
7
- The process automatically identifies key generation parameters such as prompt, seed, CFG scale, sampler name, and other relevant details. These parameters are then embedded within the image's metadata, making them accessible to CivitAI. The automatic detection mechanism works best with standard ComfyUI workflows or nodes associated with this project. For more complex workflows or third-party nodes that may not be automatically recognized, you can manually tag nodes with ">>C".
8
-
9
- ### Manual Parameter Extraction with ">>C"
10
- You can append ">>C" to the title of any node you wish to explicitly include in the metadata export. By tagging a node with ">>C", you instruct the process to specifically examine that particular node for common generation parameters (e.g., prompt, seed, sampler name, etc.). Any identifiable parameters found within these tagged nodes will be extracted and included in the CivitAI-compatible metadata, ensuring comprehensive parameter capture even from unrecognized sources.
11
-
12
- ## Inputs
13
-
14
- ### images
15
- The generated images you wish to save.
16
-
17
- ### filename_prefix
18
- Prefix to add before the automatic image number. This field can even define directories or various variables like `%date:{FORMAT}%`, practically everything allowed by the native ComfyUI node. [More information about save file formatting.](https://blenderneko.github.io/ComfyUI-docs/Interface/SaveFileFormatting)
19
-
20
- ### civitai_compatible_metadata
21
- Activating this option slightly modifies the image metadata so CivitAI can automatically read the prompt text and other generation parameters. Deactivating it saves the image as stored by the native ComfyUI node without modifications.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/docs/style_prompt_encoder.jpg DELETED
Binary file (17.6 kB)
 
custom_nodes/z-power-nodes-old/docs/style_prompt_encoder.md DELETED
@@ -1,57 +0,0 @@
1
- # Style & Prompt Encoder
2
- ![text](/docs/style_prompt_encoder.jpg)
3
-
4
- Encodes the result of fusing a prompt with a visual style, generating embeddings that guide the diffusion process. This node is similar to ComfyUI's native "CLIP Text Encode (Prompt)", but it includes the option to select a visual style for the generated image.
5
-
6
-
7
- ## Inputs
8
-
9
- ### clip
10
- The text encoder model used to encode the prompt and style.
11
-
12
- ### customization
13
- Optional input that can remain disconnected, allows redefining the internal settings of predefined styles.
14
- You can connect either a multi-line string containing the custom configurations or a "My Top-10 Styles" node.
15
- If a multi-line string node is connected, its text should follow this format: each style definition starts with ">>>" followed by the name, then includes lines describing the style template. The template must include "{$@}" where the user's prompt will be inserted.
16
-
17
- Example:
18
- ```
19
- >>>Phone Photo
20
- YOUR CONTEXT:
21
- Your photographs has android phone cam-quality.
22
- Your photographs exhibit surprising compositions, sharp complex backgrounds,
23
- natural lighting, and candid moments that feel immediate and authentic.
24
- Your photographs are actual gritty candid photographic background.
25
- YOUR PHOTO:
26
- {$@}
27
-
28
-
29
- >>>Casual Photo
30
- YOUR CONTEXT:
31
- You are an amateur documentary photographer taking low quality photos.
32
- Your photographs exhibit sharp backgrounds, unpolished realism with natural lighting,
33
- and candid friendship-level moments that feel immediate and authentic.
34
- YOUR PHOTO:
35
- {$@}
36
- ```
37
-
38
- ### style
39
- Displays the currently active style, or "none" if no style will be applied.
40
-
41
- ### \<Select Style button\>
42
- Opens the style gallery to browse and choose from available styles easily.
43
- This includes search functionality, filtering options, and a sample image
44
- showing what each style would look like.
45
-
46
- ### text
47
- This is where you input your prompt. For better style application, avoid including messages in the prompt that might interfere with the selected style.
48
-
49
-
50
- ## Outputs
51
-
52
- ### conditioning
53
- The encoded prompt embeddings with applied style, used to guide the model during generation.
54
-
55
- ### string
56
- The prompt text after applying the selected style. Typically not used, but can be employed for advanced purposes.
57
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/docs/style_string_injector.jpg DELETED
Binary file (11.5 kB)
 
custom_nodes/z-power-nodes-old/docs/style_string_injector.md DELETED
@@ -1,27 +0,0 @@
1
- # Style String Injector
2
- ![text](/docs/style_string_injector.jpg)
3
-
4
- Injects a selected style into your prompt. This node takes an input string containing
5
- the raw prompt (composition, characters, etc.) and modifies it by adding the chosen style.
6
-
7
-
8
- ## Inputs
9
-
10
- ### string
11
- Through this connection, provide the plain text of your prompt, including composition
12
- details or character descriptions, without specifying any particular style.
13
-
14
- ### style
15
- Displays the currently active style, or "none" if no style will be applied.
16
-
17
- ### \<Select Style button\>
18
- Opens the style gallery to browse and choose from available styles easily.
19
- This includes search functionality, filtering options, and a sample image
20
- showing what each style would look like.
21
-
22
-
23
- ## Outputs
24
-
25
- ### string
26
- A string with the text of your original prompt with the selected style seamlessly
27
- integrated into it.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/docs/vae_encode_for_soft_inpainting.jpg DELETED
Binary file (10.6 kB)
 
custom_nodes/z-power-nodes-old/docs/vae_encode_for_soft_inpainting.md DELETED
@@ -1,33 +0,0 @@
1
- # VAE Encode (for Soft Inpainting)
2
- ![text](/docs/vae_encode_for_soft_inpainting.jpg)
3
-
4
- This node is designed to encode images into a latent representation suitable for inpainting tasks. It includes additional preprocessing steps to adjust the input image and mask, ensuring optimal encoding by the VAE model.
5
-
6
- ## Inputs
7
-
8
- ### pixels
9
- The input image to be encoded.
10
-
11
- ### vae
12
- The VAE model used to encode the image into its latent representation.
13
-
14
- ### mask
15
- A mask indicating the regions of the input image that will be inpainted.
16
-
17
- ### output_size
18
- Determines the size of the final image on which the inpainting process will be applied.
19
- Available options:
20
- * `safe_as_input`: Uses the same dimensions as the supplied image.
21
- * `large`: Scales up to an equivalent area of 1600x1600 pixels.
22
- * `medium`: (recommended): Scales up to an equivalent area of 1300x1300 pixels.
23
- * `small`: Resizes to fit within an area equivalent to 1024x1024 pixels.
24
-
25
-
26
- ### mask_blur_pixels
27
- The number of pixels used for blurring the edges of the mask, creating a softer transition between masked and unmasked areas. Larger values result in smoother edges with increased masked regions.
28
-
29
- ## Outputs
30
-
31
- ### latent
32
- The latent representation of the input image, with the mask embedded to indicate the inpainting regions.
33
- This output is essential for subsequent inpainting tasks.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/docs/zsampler_turbo.jpg DELETED
Binary file (19.5 kB)
 
custom_nodes/z-power-nodes-old/docs/zsampler_turbo.md DELETED
@@ -1,83 +0,0 @@
1
- # Z-Sampler Turbo
2
-
3
- ![z-sampler turbo node](/docs/zsampler_turbo.jpg)
4
-
5
- The distinctive feature of this sampler is that it divides the number of steps into three stages: composition, details, and refinement. The sigmas are calculated to keep the image stable from 4 to 9 steps. Naturally, with fewer steps, the final quality decreases, but the resulting images remain quite similar.
6
-
7
- Between 7 and 9 steps, the image achieves sufficient quality and detail, making further refining or post-processing unnecessary.
8
-
9
- This sampler also enhances prompt adherence, improves overall image coherence, and eliminates the need for a "ModelSamplingAuraFlow" node with its 'shift' parameter adjustment.
10
-
11
-
12
- ## Inputs
13
-
14
- ### model
15
- Any checkpoint from the "Z-Image Turbo" model. This sampler hasn't been extensively tested with LoRAs applied, nor has it been determined which types of LoRA training might benefit from this three-stage sampling process.
16
-
17
- ### positive
18
- The positive conditioning input, typically the prompt embedding. There is no negative conditioning because this sampler always operates at CFG 1.0. In the future, it may be worth testing a similar sampling approach with a slightly higher CFG value, but I wanted to avoid adding another variable during testing.
19
-
20
- ### latent_input
21
- The initial latent image to be denoised, typically an 'Empty Latent' for text-to-image or an encoded image for img2img processing.
22
-
23
- ### seed
24
- The random number generator seed, ensuring reproducibility with the same value.
25
-
26
- ### steps
27
- Number of sampling iterations, ranging from 4 to 9.
28
-
29
- ### denoise
30
- Amount of denoising applied:
31
- - For standard text-to-image processes, keep at 1.0.
32
- - For inpainting tasks, values between 0.75 and 0.90 often work well, though smaller values may also be used.
33
- - For minor adjustments across the entire image without losing composition, small values like 0.20 or 0.10 can be effective.
34
-
35
- ### initial_noise_calibration
36
- Adjusts the initial noise level to align with model expectations.
37
- Typically enhances image contrast and saturation, with higher percentages increasing these effects more strongly.
38
- A value of "100%" is usually optimal, but lower percentages like "50%" or even complete disablement might be necessary if less contrast or saturation is desired.
39
- (More information on this parameter below).
40
-
41
- ### lowres_bias
42
- A hack to accelerate initial noise calibration by calculating it on a 256x256 image instead of the actual size. Generally, keep this disabled as it may reduce final image quality.
43
-
44
-
45
- ## Outputs
46
-
47
- ### latent_output
48
- The resulting denoised latent image, ready for VAE decoding or further processing in another sampler node.
49
-
50
-
51
- ## Initial Noise Calibration (INC)
52
-
53
- For various reasons, the sampler starts at a point where the model expects the noise to contain a small bias. In earlier versions of the sampler, this bias was not taken into account. However, now the sampler performs an estimation of this bias during the denoising process initialization. This 'calibration' is done by taking one step of pure noise denoising and then measuring the resulting latent image's bias.
54
-
55
- In addition to adjusting for this bias, a slight over-amplification of the input noise is also performed. All of these adjustments are encapsulated within the "Initial Noise Calibration" (INC), which ranges from "off" (0%) to 100%, representing the percentage of this calibration applied.
56
-
57
- The end result is that when activating the calibration, the generated image has more contrast and saturation. It can even produce nearly pure black (or pure white) images. However, the optimal INC percentage depends on the type of image and personal preference. Below are some guidelines based on my own personal preferences.
58
-
59
- ### Illustrations
60
-
61
- For illustrations that are pure line art without realistic elements, a calibration level of 100% often works well, resulting in vivid colors with smooth gradients or solid hues (without 'textures'), as demonstrated in the example.
62
-
63
- If the illustration includes texture or softer color edges (e.g., weathered or vintage-looking drawings, or semi-realistic illustrations with textures), a lower value might be preferable to preserve those characteristics.
64
-
65
- **[Workflow](https://raw.githubusercontent.com/yourname/z-power-nodes-old/refs/heads/master/docs/calibration_examples/illustration.json)**
66
- ![illustration example](/docs/calibration_examples/illustration.jpg)
67
-
68
- ### Photographs
69
-
70
- For photographs, a higher INC percentage (e.g., 100%) can make them appear slightly more artificial, while disabling it may result in less vibrant colors or washed-out images that don't reach pure black or white. This is very subjective, but as a starting point, try 50% and adjust according to your desired outcome.
71
-
72
- For photos requiring an overall very dark or light tone, activating the calibration with a high percentage is usually necessary, as without it such images tend towards an average gray tone. (This example uses the "Noir Photo" style, which might better suit the darker illumination of the left image).
73
-
74
- **[Workflow](https://raw.githubusercontent.com/yourname/z-power-nodes-old/refs/heads/master/docs/calibration_examples/photo.json)**
75
- ![photo example](/docs/calibration_examples/photo.jpg)
76
-
77
- ### Other Styles
78
-
79
- The need for calibration varies greatly depending on the image style and prompt. Images requiring fine texture details rather than intense colors or high contrast may perform better with INC disabled, as demonstrated in this "Stamp" style example.
80
-
81
- **[Workflow](https://raw.githubusercontent.com/yourname/z-power-nodes-old/refs/heads/master/docs/calibration_examples/stamp.json)**
82
- ![stamp example](/docs/calibration_examples/stamp.jpg)
83
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/eslint.config.mjs DELETED
@@ -1,31 +0,0 @@
1
- /* File : eslint.config.mjs */
2
- /* Purpose: Configuration for the VSCode ESLint extension and code linting */
3
-
4
- import js from "@eslint/js";
5
- import compat from "eslint-plugin-compat";
6
- import globals from "globals";
7
-
8
- export default [
9
- js.configs.recommended,
10
- {
11
- plugins: {
12
- compat: compat, /* Browser compatibility checking plugin */
13
- },
14
- languageOptions: {
15
- ecmaVersion: 2020, /* Set syntax level to ECMAScript 2020 */
16
- sourceType : "module", /* Enable modern import/export module logic */
17
- globals: {
18
- ...globals.browser,
19
- },
20
- },
21
- rules: {
22
- "no-unused-vars": ["warn", {
23
- "argsIgnorePattern": "^_", /* Ignore arguments starting with underscore*/
24
- "varsIgnorePattern": "^_" /* Ignore variables starting with underscore*/
25
- }],
26
- "semi": ["error", "always"], /* Require semicolons at the end */
27
- "no-console" : "off", /* Set to off/error for console.log usage */
28
- "compat/compat": "error", /* Enforce browser compatibility checks */
29
- },
30
- },
31
- ];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/icon.jpg DELETED
Binary file (69 kB)
 
custom_nodes/z-power-nodes-old/image-civitai2.jpg DELETED

Git LFS Details

  • SHA256: e77456e3edc5afdf6f509dad4dde90e55881553f9e2e9162d9f6e29074775975
  • Pointer size: 131 Bytes
  • Size of remote file: 120 kB
custom_nodes/z-power-nodes-old/js/common.js DELETED
@@ -1,232 +0,0 @@
1
- /**
2
- * File : common.js
3
- * Purpose : Common script file with helper functions.
4
- * Author : Martin Rizzo | <martinrizzo@gmail.com>
5
- * Date : Jan 31, 2026
6
- * Repo : https://github.com/yourname/z-power-nodes-old
7
- * License : MIT
8
- *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9
- * ComfyUI-ZImagePowerNodes
10
- * ComfyUI nodes designed specifically for the "Z-Image" model.
11
- *_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
12
- */
13
- import { app } from "../../../scripts/app.js";
14
- export {
15
- loadCSS,
16
- isNodeFromMyProject,
17
- getOutputNodes,
18
- getInputOriginID,
19
- getInputNode,
20
- renameWidget,
21
- forceRenameWidget
22
- };
23
-
24
- /**
25
- * This constant represents the project ID used to identify nodes in the ComfyUI node registry.
26
- * IMPORTANT: It must match the value defined in `__init__.py` !!.
27
- * @type {string}
28
- */
29
- const __PROJECT_ID = "//ZPowerNodesOLD";
30
-
31
-
32
- function loadCSS(fileName) {
33
- const fullPath = import.meta.resolve(`./${fileName}`);
34
- const link = document.createElement("link");
35
- link.rel = "stylesheet";
36
- link.href = fullPath;
37
- document.head.appendChild(link);
38
- }
39
-
40
-
41
- /**
42
- * Checks if a given node belongs to the current project.
43
- *
44
- * @param {Object} node - The node object to check.
45
- * @returns {boolean} True if the node belongs to the current project, false otherwise.
46
- */
47
- function isNodeFromMyProject(node) {
48
- return (node?.comfyClass ?? "").includes(__PROJECT_ID);
49
- }
50
-
51
-
52
- /**
53
- * Get all nodes connected to a given node's outputs.
54
- *
55
- * @param {Object} node - The input node from which to retrieve outputs.
56
- * @param {string} [outputName] - Optional. The name of the output connection to search.
57
- * If not provided, nodes connected to any output will be returned.
58
- * @returns {Array} An array of nodes connected to the specified output
59
- */
60
- function getOutputNodes(node, outputName) {
61
- let outputNodes = [];
62
-
63
- // get the graph safely
64
- const graph = (node?.graph || app.graph);
65
- if( !graph ) { return outputNodes; }
66
-
67
- const outputs = node?.outputs || [];
68
- for( let i=0 ; i<outputs.length ; ++i ) {
69
- const output = outputs[i];
70
-
71
- // if outputName is provided, compare it with the current name
72
- if( outputName && outputName !== output?.name ) { continue; }
73
-
74
- const links = output?.links || [];
75
- for( let j=0 ; j<links.length ; ++j )
76
- {
77
- const link = graph.links[ links[j] || "" ];
78
- const outputNode = graph.getNodeById( link?.target_id || "" );
79
- if( outputNode ) {
80
- outputNodes.push( outputNode );
81
- }
82
- }
83
- }
84
- return outputNodes;
85
- }
86
-
87
-
88
- /**
89
- * Get the ID of the node connected to a given node's input.
90
- *
91
- * @param {Object} node - The node whose input will be analyzed.
92
- * @param {string} [inputName] - Optional. The name of the input connection to search.
93
- * If not provided, it searches only the first input connection.
94
- * @returns {(string|null)} The ID of the node connected as input or `null` if nothing is connected.
95
- */
96
- function getInputOriginID(node, inputName) {
97
-
98
- // get the graph safely
99
- const graph = (node?.graph || app.graph);
100
- if( !graph ) { return null; }
101
-
102
- const inputs = node?.inputs || [];
103
- for( let i=0 ; i<inputs.length ; ++i ) {
104
- const input = inputs[i];
105
-
106
- // if outputName is provided, compare it with the current name
107
- if( inputName && inputName !== input?.name ) { continue; }
108
-
109
- return graph.links[ input?.link || 0 ]?.origin_id;
110
- }
111
- return null;
112
- }
113
-
114
-
115
- /**
116
- * Get the node that is connected to a given node's input.
117
- *
118
- * @param {Object} node - The node whose input will be analyzed.
119
- * @param {string} [inputName] - Optional. The name of the input connection to search.
120
- * If not provided, it searches only the first input connection.
121
- * @returns {(Object|null)} The node that is connected as input or `null` if nothing is connected.
122
- */
123
- function getInputNode(node, inputName) {
124
- const graph = (node?.graph || app.graph);
125
- const originID = getInputOriginID(node, inputName);
126
- return originID != null ? graph.getNodeById(originID) : null;
127
- }
128
-
129
-
130
- /**
131
- * Checks if a given widget is a proxy widget.
132
- *
133
- * This code is not fully tested but the concept comes from the ComfyUI Frontend:
134
- * - https://github.com/Comfy-Org/ComfyUI_frontend/blob/v1.39.4/src/core/graph/subgraph/proxyWidget.ts#L51
135
- *
136
- * @param {IBaseWidget} widget - The widget object to check.
137
- * @returns {boolean} Returns true if the widget has an overlay that is a proxy widget, otherwise false.
138
- */
139
- function isProxyWidget(widget) {
140
- return !!(widget?._overlay?.isProxyWidget);
141
- }
142
-
143
-
144
- /**
145
- * Renames a widget and its corresponding input.
146
- *
147
- * Handles both regular widgets and proxy widgets in subgraphs.
148
- * This code is not fully tested but it comes from the ComfyUI Frontend:
149
- * - https://github.com/Comfy-Org/ComfyUI_frontend/blob/v1.39.4/src/utils/widgetUtil.ts#L16
150
- *
151
- * @param {IBaseWidget} widget - The widget to rename
152
- * @param {LGraphNode} node - The node containing the widget
153
- * @param {string} newLabel - The new label for the widget (empty string or undefined to clear)
154
- * @param {SubgraphNode[]} [parents] - Optional array of parent SubgraphNodes (for proxy widgets)
155
- * @returns {boolean} true if the rename was successful, false otherwise
156
- */
157
- function renameWidget(widget, node, newLabel, parents)
158
- {
159
- // for proxy widgets in subgraphs, we need to rename the original interior widget
160
- if (isProxyWidget(widget) && parents?.length) {
161
- const subgraph = parents[0].subgraph;
162
- if (!subgraph) {
163
- console.error('Could not find subgraph for proxy widget');
164
- return false;
165
- }
166
- const interiorNode = subgraph.getNodeById(widget._overlay.nodeId);
167
-
168
- if (!interiorNode) {
169
- console.error('Could not find interior node for proxy widget');
170
- return false;
171
- }
172
-
173
- const originalWidget = interiorNode.widgets?.find(
174
- (w) => w.name === widget._overlay.widgetName
175
- );
176
-
177
- if (!originalWidget) {
178
- console.error('Could not find original widget for proxy widget');
179
- return false;
180
- }
181
-
182
- // rename the original widget
183
- originalWidget.label = newLabel || undefined;
184
-
185
- // also rename the corresponding input on the interior node
186
- const interiorInput = interiorNode.inputs?.find(
187
- (inp) => inp.widget?.name === widget._overlay.widgetName
188
- );
189
- if (interiorInput) {
190
- interiorInput.label = newLabel || undefined;
191
- }
192
- }
193
-
194
- // always rename the widget on the current node (either regular widget or proxy widget)
195
- const input = node.inputs?.find((inp) => inp.widget?.name === widget.name);
196
-
197
- // intentionally mutate the widget object here as it's a reference
198
- // to the actual widget in the graph
199
- widget.label = newLabel || undefined;
200
- if (input) { input.label = newLabel || undefined; }
201
- return true;
202
- }
203
-
204
-
205
- /**
206
- * Updates the label of a given widget and forces a redraw.
207
- *
208
- * This is an attempt to make `renameWidget` work with Nodes 2.0 of ComfyUI.
209
- *
210
- * @param {Object} widget - The widget whose label is to be updated.
211
- * @param {Object} node - The node associated with the widget.
212
- * @param {string} newLabel - The new label for the widget.
213
- */
214
- function forceRenameWidget(widget, node, newLabel, parents) {
215
- renameWidget(widget, node, newLabel, parents);
216
-
217
- // force LiteGraph to mark the node as needing a redraw
218
- node.setDirtyCanvas(true, true);
219
-
220
- // if the Vue component is listening for changes in the 'options' object,
221
- // update a fictitious property to trigger Vue's observer.
222
- if (widget.options) {
223
- widget.options._force_update = Date.now();
224
- }
225
-
226
- // Nodes 2.0 could require the node to "blink" to redraw the DOM of Vue (??)
227
- const originalSize = [...node.size];
228
- node.size[0] += 0.001;
229
- node.setSize(node.size);
230
- node.size[0] = originalSize[0];
231
- node.setSize(originalSize);
232
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/js/common_dialog.js DELETED
@@ -1,182 +0,0 @@
1
- /**
2
- * File : common_dialog.js
3
- * Purpose : Common script for custom dialogs.
4
- * Author : Martin Rizzo | <martinrizzo@gmail.com>
5
- * Date : Feb 8, 2026
6
- * Repo : https://github.com/yourname/z-power-nodes-old
7
- * License : MIT
8
- *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9
- * ComfyUI-ZImagePowerNodes
10
- * ComfyUI nodes designed specifically for the "Z-Image" model.
11
- *_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
12
- */
13
- import { $el as html } from "../../../scripts/ui.js"; //< deprrecated ?
14
- export {
15
- makeCustomDialog,
16
- setupCardHoverListeners
17
- };
18
-
19
-
20
- /**
21
- * Normalizes content into an array of DOM nodes.
22
- *
23
- * This function processes input content and ensures it's returned as an array
24
- * of Node elements, regardless of its original type (string, single node, NodeList,
25
- * or Array). If the input is not one of these types, it returns an empty array
26
- * to prevent errors in subsequent operations.
27
- *
28
- * @param {string|Node|NodeList|Array<Node>} content - The content that needs to be normalized.
29
- * @returns {Array<Node>}
30
- * An array of DOM nodes representing the input content.
31
- * If the content is invalid or cannot be converted to nodes, it returns an empty array.
32
- */
33
- function normalizeDOMnodes(content)
34
- {
35
- // handle strings (convert html to array of nodes)
36
- if( typeof content === 'string' ) {
37
- const template = document.createElement('template');
38
- template.innerHTML = content.trim();
39
- return Array.from(template.content.childNodes);
40
- }
41
- // handle single nodes (convert to array for consistency)
42
- if( content instanceof Node ) {
43
- return [content];
44
- }
45
- // handle NodeLists or arrays of nodes
46
- if( content instanceof NodeList || Array.isArray(content) ) {
47
- return Array.from(content);
48
- }
49
- // return empty array by default to avoid errors
50
- return [];
51
- }
52
-
53
- /**
54
- * Creates and returns a custom dialog HTML element for ComfyUI.
55
- *
56
- * This implementation utilizes deprecated ComfyUI functions since there is
57
- * currently no documented method to create custom dialogs. Some ideas and
58
- * concepts for this implementation were inspired by ComfYUI-Manager project.
59
- *
60
- * @param {string} dialogId - The ID for the dialog element.
61
- * @param {string} titleId - The ID for the title element within the dialog.
62
- * @param {string} title - The title to be displayed in the dialog header.
63
- * @param {string} iconClass - The CSS class for the icon that will appear next to the title.
64
- * @param {string|HTMLElement[]} content - The content of the dialog, which can be a string or an array of HTML elements.
65
- * @param {Function} onClose - A callback function to be executed when the dialog is closed.
66
- * @returns {HTMLElement}
67
- * Returns the main container element for the dialog mask.
68
- */
69
- function makeCustomDialog(dialogId, titleId, title, iconClass, content, onClose) {
70
-
71
- const dialogOutsideArea = html("div.p-dialog-mask.p-overlay-mask.p-overlay-mask-enter", {
72
- parent: document.body,
73
- style : {
74
- position : "fixed",
75
- height : "100%",
76
- width : "100%",
77
- left : "0px",
78
- top : "0px",
79
- display : "flex",
80
- justifyContent: "center",
81
- alignItems : "center",
82
- pointerEvents : "auto",
83
- zIndex : "1000"
84
- },
85
- onclick: (e) => {
86
- // execute `onClose` only if click outside of the dialog
87
- if( e.target === dialogOutsideArea ) { onClose(); }
88
- }
89
- });
90
- const headerActions = html("div.p-dialog-header-actions");
91
- const _closeButton = html("button.p-button.p-component.p-button-icon-only.p-button-secondary.p-button-rounded.p-button-text.p-dialog-close-button", {
92
- parent : headerActions,
93
- type : "button",
94
- ariaLabel : "Close",
95
- onclick : onClose, //< execute `onClose` when close button is clicked
96
- innerHTML : '<i class="pi pi-times"></i>'
97
- });
98
- const dialogHeader = html("div.p-dialog-header",
99
- [
100
- html("div", [
101
- html("div", { id: "frame-title-container" }, [
102
- html("h2.px-4", [
103
- html(iconClass, {
104
- style: { "font-size": "1.25rem", "margin-right": ".5rem" }
105
- }),
106
- html("span", { id: titleId, textContent: title })
107
- ])
108
- ])
109
- ]),
110
- headerActions
111
- ]);
112
- const contentFrame = html("div.p-dialog-content", {}, normalizeDOMnodes(content));
113
- const dialogFrame = html("div.p-dialog.p-component.global-dialog", {
114
- id : dialogId,
115
- parent: dialogOutsideArea,
116
- style : {
117
- 'display' : 'flex',
118
- 'flex-direction': 'column',
119
- 'pointer-events': 'auto',
120
- 'margin' : '0px',
121
- },
122
- role : 'dialog',
123
- ariaModal: 'true',
124
- },
125
- [ dialogHeader, contentFrame ]
126
- );
127
- const _hiddenAccessible = html("span.p-hidden-accessible.p-hidden-focusable", {
128
- parent : dialogFrame,
129
- tabindex : "0",
130
- role : "presentation",
131
- ariaHidden: "true",
132
- "data-p-hidden-accessible": "true",
133
- "data-p-hidden-focusable" : "true",
134
- "data-pc-section" : "firstfocusableelement"
135
- });
136
- return dialogOutsideArea;
137
- }
138
-
139
-
140
- /**
141
- * Sets up hover and click event listeners for cards within a container.
142
- *
143
- * This function is particularly useful for managing gallery images or item
144
- * listings where interactive behavior such as highlighting on hover and
145
- * triggering actions on click are required.
146
- *
147
- * @param {HTMLElement} containerEl - The container element where the cards reside.
148
- * @param {string} cardSelector - A CSS selector used to identify card elements.
149
- * @param {(card: HTMLElement) => void} onCardEnter - Callback function when hovering over a card.
150
- * @param {(card: HTMLElement) => void} onCardLeave - Callback function when moving the mouse away from a card.
151
- * @param {(card: HTMLElement) => void} onCardClick - Callback function when clicking on a card.
152
- * @param {(container: HTMLElement) => void} [onContainerLeave] - Optional callback function when moving the mouse away from the container.
153
- */
154
- function setupCardHoverListeners(containerEl, cardSelector, onCardEnter, onCardLeave, onCardClick, onContainerLeave) {
155
-
156
- const hasPointer = true; //!!window.PointerEvent;
157
- const events = {
158
- over : hasPointer ? 'pointerover' : 'mouseover',
159
- out : hasPointer ? 'pointerout' : 'mouseout',
160
- leave: hasPointer ? 'pointerleave' : 'mouseleave'
161
- };
162
-
163
- containerEl.addEventListener(events.over, (e) => {
164
- const card = e.target.closest(cardSelector);
165
- if( card && !card.contains(e.relatedTarget) ) { onCardEnter?.(card, e); }
166
- });
167
-
168
- containerEl.addEventListener(events.out, (e) => {
169
- const card = e.target.closest(cardSelector);
170
- if( card && !card.contains(e.relatedTarget) ) { onCardLeave?.(card, e); }
171
- });
172
-
173
- containerEl.addEventListener('click', (e) => {
174
- const card = e.target.closest(cardSelector);
175
- if( card ) { onCardClick?.(card, e); }
176
- });
177
-
178
- containerEl.addEventListener(events.leave, (e) => {
179
- onContainerLeave?.(containerEl, e);
180
- });
181
- }
182
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/js/common_server.js DELETED
@@ -1,125 +0,0 @@
1
- /**
2
- * File : common_server.js
3
- * Purpose : Common functions for fetching data from the backend.
4
- * Author : Martin Rizzo | <martinrizzo@gmail.com>
5
- * Date : Feb 9, 2026
6
- * Repo : https://github.com/yourname/z-power-nodes-old
7
- * License : MIT
8
- *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9
- * ComfyUI-ZImagePowerNodes
10
- * ComfyUI nodes designed specifically for the "Z-Image" model.
11
- *_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
12
- */
13
- import { api } from "../../../scripts/api.js";
14
- export {
15
- fetchLastVersionStyles,
16
- fetchStyleNamesByCategory09 //< (old) deprecated
17
- };
18
-
19
-
20
- let _lastVersionStyles = null;
21
-
22
- /**
23
- * Fetches a list of all available styles in the last backend version.
24
- *
25
- * This function retrieves the latest style information by making an API call
26
- * to "/zi_power/styles/last_version". If the data has already been fetched
27
- * before, it returns the cached result.
28
- *
29
- * @param {function(Array<Object>)} onResponse
30
- * A callback function that receives an array of style objects.
31
- * Each style object contains:
32
- * - id : Unique identifier for the style (the index in the list)
33
- * - name : The name of the style (string)
34
- * - lowerName : The name of the style, converted to lowercase (string)
35
- * - category : The category of the style (string)
36
- * - description: Description of the style (string)
37
- * - tags : Array of tags associated with the style (Array<string>)
38
- * - thumbnail : URL for the style's thumbnail image (string)
39
- *
40
- * @example
41
- * fetchLastVersionStyles((styles) => {
42
- * styles.forEach(style => console.log(style.name));
43
- * });
44
- */
45
- async function fetchLastVersionStyles(onResponse) {
46
- if( typeof onResponse !== "function" )
47
- { console.error("The provided argument is not a valid function."); return; }
48
-
49
- // if it has already been queried before, returns the stored result
50
- if( _lastVersionStyles ) { onResponse( _lastVersionStyles ); return; }
51
-
52
- try {
53
- const response = await api.fetchApi("/zi_power/styles/last_version");
54
- const styles = await response.json();
55
- if( typeof styles !== "object" )
56
- { console.error("The fetching of last version style failed."); return; }
57
-
58
- // prefix used when requesting thumbnails
59
- const thumbnailRequestPrefix = "/zi_power/styles/samples?file=";
60
-
61
- _lastVersionStyles = styles.map((style, index) => {
62
- return {
63
- id : index,
64
- name : style[0],
65
- lowerName : style[0].toLowerCase(),
66
- category : style[1],
67
- description: style[2],
68
- tags : style[3].split(","),
69
- thumbnail : thumbnailRequestPrefix + style[4]
70
- };
71
- });
72
- onResponse( _lastVersionStyles );
73
- } catch (error) {
74
- console.error("Failed to fetch styles:", error);
75
- }
76
- }
77
-
78
-
79
-
80
- let _namesByCategory09 = null;
81
-
82
- /**
83
- * Fetches an object containing style names grouped by their categories.
84
- * @deprecated It's deprecated and maintained for compatibility with old code.
85
- *
86
- * @param {function(Object)} onResponse
87
- * A callback function that receives an object where each key is a
88
- * category name and the value is an array of style names.
89
- * NOTE: style names will be quoted in double quotation marks.
90
- *
91
- * @example
92
- * fetchStyleNamesByCategory09((namesByCategory) => {
93
- * for(const category in namesByCategory){
94
- * console.log(`Styles in ${category}:`);
95
- * namesByCategory[category].forEach(name => console.log(name));
96
- * }
97
- * });
98
- */
99
- async function fetchStyleNamesByCategory09( onResponse) {
100
- if( typeof onResponse !== "function" )
101
- { console.error("The provided argument is not a valid function."); return; }
102
-
103
- // if it has already been queried before, returns the stored result
104
- if( _namesByCategory09 ) { onResponse( _namesByCategory09 ); return; }
105
-
106
- try {
107
- const response = await api.fetchApi("/zi_power/styles/by_version?version=0.9");
108
- const styles = await response.json();
109
- if( typeof styles !== "object" )
110
- { console.error("The fetching of last version style failed."); return; }
111
-
112
- let namesByCategory09 = {};
113
- for( let i=0 ; i<styles.length ; ++i ) {
114
- const name = `"${styles[i][0]}"`; //< quoted name
115
- const category = styles[i][1];
116
- if( !namesByCategory09[category] ) { namesByCategory09[category] = []; }
117
- namesByCategory09[category].push(name);
118
- }
119
- _namesByCategory09 = namesByCategory09;
120
-
121
- onResponse( _namesByCategory09 );
122
- } catch (error) {
123
- console.error("Failed to fetch styles:", error);
124
- }
125
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/js/common_timer.js DELETED
@@ -1,66 +0,0 @@
1
- /**
2
- * File : common/timer.js
3
- * Purpose : Helper functions to execute periodic low-priority tasks.
4
- * Author : Martin Rizzo | <martinrizzo@gmail.com>
5
- * Date : Feb 1, 2026
6
- * Repo : https://github.com/yourname/z-power-nodes-old
7
- * License : MIT
8
- *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9
- * ComfyUI-ZImagePowerNodes
10
- * ComfyUI nodes designed specifically for the "Z-Image" model.
11
- *_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
12
- */
13
- export { executeLowPriorityTasks, scheduleIntervalCalls };
14
-
15
-
16
- let nodes = new Set();
17
-
18
-
19
- /**
20
- * Registers a controller to receive periodic interval calls.
21
- *
22
- * This function sets up automatic, repeated calls to the specified controller's
23
- * `onInterval` method. It attempts to use the node associated with the given
24
- * controller, unless a specific node is provided as an argument.
25
- *
26
- * Key features:
27
- * - Automatically detects the controller's node if no explicit node is supplied.
28
- * - Ensures that interval calls stop when the associated node is removed from ComfyUI.
29
- *
30
- * @param {Object} controller - The controller object, which must have an `onInterval` method.
31
- * @param {Object} [node] - An optional node to associate with the interval calls.
32
- * If not provided, the controller's own node will be used.
33
- */
34
- function scheduleIntervalCalls(controller, node) {
35
- if( !node ) { node = controller?.node; }
36
- if( !node ) {
37
- console.error("No node or controller found to call the onInterval method.");
38
- }
39
-
40
- // add the node to the set to call the `onInterval()` method
41
- nodes.add(node);
42
-
43
- // intercept the `onRemoved` method to remove the node from the set
44
- const originalOnRemoved = node.onRemoved;
45
- node.onRemoved = function() {
46
- nodes.delete(this);
47
- return originalOnRemoved?.apply(this, arguments);
48
- };
49
- }
50
-
51
-
52
- /**
53
- * Executes low-priority tasks for all registered nodes.
54
- *
55
- * This function is designed to be called periodically, such as every 5 seconds.
56
- * It handles lower priority background operations across all registered nodes.
57
- *
58
- * Note: The "low priority timer extension" will be responsible for
59
- * calling this function.
60
- */
61
- function executeLowPriorityTasks() {
62
- // iterate over all registered nodes and call `onInterval()` from the controller
63
- for( const node of nodes ) {
64
- node.zzController?.onInterval?.();
65
- }
66
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/js/custom_widgets.js DELETED
@@ -1,103 +0,0 @@
1
- /**
2
- * File : custom_widgets.js
3
- * Purpose : Custom widgets used in this project.
4
- * Author : Martin Rizzo | <martinrizzo@gmail.com>
5
- * Date : Feb 3, 2026
6
- * Repo : https://github.com/yourname/z-power-nodes-old
7
- * License : MIT
8
- *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9
- * ComfyUI-ZImagePowerNodes
10
- * ComfyUI nodes designed specifically for the "Z-Image" model.
11
- *_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
12
-
13
- The ComfyUI native WEBCAM widget code can be found here:
14
- - https://github.com/Comfy-Org/ComfyUI_frontend/blob/v1.39.5/src/extensions/core/webcamCapture.ts
15
-
16
- */
17
- import { app } from "../../../scripts/app.js";
18
- const ENABLED = true;
19
-
20
-
21
- /**
22
- * Creates a divider widget to visually separate UI elements.
23
- * @param {LGraphNode} node - The node where the widget is added.
24
- * @param {string} inputName - The name of the input associated with this widget.
25
- * @returns {{widget: object}} An object containing the created widget.
26
- */
27
- function createDividerWidget( node, inputName ) {
28
-
29
- const w = node.addCustomWidget({
30
- type : "ui_spacer",
31
- name : inputName,
32
- serialize : false,
33
-
34
- draw: function(ctx, node, widget_width, y, widget_height) {
35
- ctx.save();
36
- ctx.strokeStyle = "#555";
37
- ctx.beginPath();
38
- ctx.moveTo(10, y + widget_height / 2);
39
- ctx.lineTo(widget_width - 10, y + widget_height / 2);
40
- ctx.stroke();
41
- ctx.restore();
42
- },
43
-
44
- // computeSize: function(widgetWidth) {
45
- // }
46
-
47
- });
48
- w.serialize = true;
49
- w.serializeValue = () => null;
50
- return { widget: w };
51
- }
52
-
53
-
54
- /**
55
- * Creates a spacer widget, which can be used for spacing UI elements.
56
- * @param {LGraphNode} node - The node where the widget is added.
57
- * @param {string} inputName - The name of the input associated with this widget.
58
- * @returns {{widget: object}} An object containing the created widget.
59
- */
60
- function createSpacerWidget( node, inputName ) {
61
-
62
- const w = node.addCustomWidget({
63
- type : "ui_spacer",
64
- name : inputName,
65
- serialize : false,
66
-
67
- draw: function(_ctx, _node, _widget_width, _y, _widget_height) {
68
- },
69
-
70
- // computeSize: function(widgetWidth) {
71
- // }
72
-
73
- });
74
- w.serialize = true;
75
- w.serializeValue = () => null;
76
- return { widget: w };
77
-
78
- }
79
-
80
-
81
- //#=========================================================================#
82
- //#////////////////////////// REGISTER EXTENSION ///////////////////////////#
83
- //#=========================================================================#
84
-
85
- app.registerExtension({
86
- name: "ZPowerNodesOLD.CustomNodes",
87
-
88
- /** Called when the extension is loaded. */
89
- init() {
90
- if (!ENABLED) return;
91
- console.log(`[${this.name}]: Extension loaded.`);
92
- },
93
-
94
- /** Called to register custom widgets. */
95
- getCustomWidgets() {
96
- if (!ENABLED) return {};
97
- return {
98
- "ZIPN_DIVIDER": createDividerWidget,
99
- "ZIPN_SPACER" : createSpacerWidget,
100
- };
101
- },
102
-
103
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/js/low_priority_timer.js DELETED
@@ -1,50 +0,0 @@
1
- /**
2
- * File : low_priority_timer.js
3
- * Purpose : A timer for low priority tasks.
4
- * Author : Martin Rizzo | <martinrizzo@gmail.com>
5
- * Date : Feb 1, 2026
6
- * Repo : https://github.com/yourname/z-power-nodes-old
7
- * License : MIT
8
- *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9
- * ComfyUI-ZImagePowerNodes
10
- * ComfyUI nodes designed specifically for the "Z-Image" model.
11
- *_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
12
- */
13
- import { app } from "../../../scripts/app.js";
14
- import { executeLowPriorityTasks } from "./common_timer.js";
15
- const ENABLED = true;
16
-
17
-
18
- //#=========================================================================#
19
- //#////////////////////////// REGISTER EXTENSION ///////////////////////////#
20
- //#=========================================================================#
21
-
22
- app.registerExtension({
23
- name: "ZPowerNodesOLD.LowPriorityTimer",
24
-
25
- /** Called when the extension is loaded. */
26
- init() {
27
- if (!ENABLED) return;
28
- console.log(`[${this.name}]: Extension loaded.`);
29
- },
30
-
31
-
32
- async setup() {
33
- const restartTimer = () => {
34
- setTimeout(() => {
35
- // eslint-disable-next-line
36
- (window.requestIdleCallback || window.setTimeout)(() => {
37
-
38
- // execute the low priority tasks and restart the timer
39
- executeLowPriorityTasks();
40
- restartTimer();
41
-
42
- }, { timeout: 10000 });
43
- }, 1000);
44
- };
45
-
46
- // start the timer
47
- restartTimer();
48
- },
49
-
50
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/js/my_top_styles.js DELETED
@@ -1,399 +0,0 @@
1
- /**
2
- * File : my_top_styles.js
3
- * Purpose : Frontend implementation of "My Top-<N> Styles" node functionality.
4
- * Author : Martin Rizzo | <martinrizzo@gmail.com>
5
- * Date : Jan 31, 2026
6
- * Repo : https://github.com/yourname/z-power-nodes-old
7
- * License : MIT
8
- *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9
- * ComfyUI-ZImagePowerNodes
10
- * ComfyUI nodes designed specifically for the "Z-Image" model.
11
- *_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
12
- */
13
- import { app } from "../../../scripts/app.js";
14
- import { forceRenameWidget, getInputNode, getInputOriginID, getOutputNodes } from "./common.js";
15
- import { scheduleIntervalCalls } from "./common_timer.js";
16
- const ENABLED = true;
17
- const DATA_INPUT = 'input'; // name of the input socket
18
- const DATA_OUTPUT = 'output'; // name of the output socket
19
- //const TOP_STYLES_INPUT = 'top_styles'; // name of the input socket that connects to the "Top-Styles" provider.
20
-
21
- //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
22
- // Here I leave a safe way to get the node and widgets of the controller,
23
- // it's been used for debugging but doesn't offer any advantage.
24
- // const node = self.node?.graph?.getNodeById?.(self.node.id);
25
- // const allStyleWidgets = node.widgets.filter(w => w.name.startsWith("style_"));
26
- //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
27
-
28
-
29
- //#======================= My Top Styles Controller ========================#
30
- /**
31
- * Controller for any node that selects from a list of top styles. (e.g., "My Top-10 Styles")
32
- * @typedef {Object} MyTopStylesCtrl
33
- * @property {Object} node - The node this controller is attached to.
34
- * @property {Array<Object>} allStyleWidgets - A list of all widgets whose name starts with "style_".
35
- * @property {boolean} eventEnabled - Whether or not the controller generate 'onBooleanSwitchChanged' event.
36
- * (used to prevent infinite recursion when updating the list)
37
- * @property {number|null} topStylesOriginID - The ID of the node connected to the 'top_styles" input.
38
- * @property {number|null} inputOriginID - The ID of the node connected to the 'input' input.
39
- */
40
-
41
-
42
- /**
43
- * Initializes the `MyTopStylesCtrl` controller.
44
- *
45
- * @param {MyTopStylesCtrl} self - The instance of the controller being initialized.
46
- * @param {Object} node - The node to control.
47
- */
48
- function init(self_, node) {
49
- const self = self_;
50
-
51
- // find all required widgets
52
- const allStyleWidgets = node.widgets.filter(w => w.name.startsWith("style_"));
53
- const channelWidgets = node.widgets.filter(w => w.name === "output_to");
54
- const controlWidgets = node.widgets.filter(w => w.name === "control_after_generate");
55
- const channelWidget = channelWidgets.length > 0 ? channelWidgets[0] : null;
56
- const controlWidget = controlWidgets.length > 0 ? controlWidgets[0] : null;
57
- if( !allStyleWidgets || allStyleWidgets.length == 0 || !channelWidget || !controlWidget ) {
58
- console.error("Missing required widgets!");
59
- return;
60
- }
61
-
62
- // iterate through all "style_" widgets
63
- for( let i=0 ; i<allStyleWidgets.length ; ++i ) {
64
- const widget = allStyleWidgets[i];
65
-
66
- // replacing the `callback` function in all widgets,
67
- // using the safest way to call original function
68
- const oldCallback = widget.callback;
69
- widget.callback = function(value, mode) {
70
- const eventEnabled = self.eventEnabled && mode !== "no-event";
71
- if( eventEnabled ) {
72
- self.eventEnabled = false;
73
- onBooleanSwitchChanged(self, widget, value);
74
- self.eventEnabled = true;
75
- }
76
- if( typeof oldCallback === 'function' ) { oldCallback.apply(this, arguments); }
77
- };
78
- }
79
-
80
- if( controlWidget ) {
81
- const oldAfterQueued = controlWidget.afterQueued;
82
- controlWidget.afterQueued = function() {
83
- onControlWidget(self, controlWidget, controlWidget.value);
84
- if( typeof oldAfterQueued === 'function' ) { oldAfterQueued.apply(this, arguments); }
85
- };
86
- }
87
-
88
- // set controller properties and public methods
89
- self.node = node;
90
- self.allStyleWidgets = allStyleWidgets;
91
- self.channelWidget = channelWidget;
92
- self.controlWidget = controlWidget;
93
- self.eventEnabled = true;
94
- self.topStylesOriginID = null;
95
- self.inputOriginID = null;
96
- self.updateTopStyles = function(topStyles) { updateTopStyles(self, topStyles); };
97
- self.processChainMessage = function(message) { processChainMessage(self, message); };
98
- self.onInterval = function() { onInterval(self); };
99
- scheduleIntervalCalls(self);
100
- }
101
-
102
-
103
- /**
104
- * Processes a chain message by delegating the task to appropriate handlers.
105
- *
106
- * All messages should be launched with the prefix "launch:", this causes the
107
- * message to search left from the initial node of the chain. Once the initial
108
- * node is reached, the message loses its prefix "launch:" and moves to the
109
- * right reaching all nodes of the chain in order.
110
- *
111
- * @param {MyTopStylesCtrl} self - The controller instance.
112
- * @param {Object} message - The message object containing at least
113
- * `type` and `sender_id`. properties.
114
- */
115
- function processChainMessage(self, message) {
116
- let type = message.type;
117
- let sender_id = message.sender_id;
118
- if( typeof type !== "string" || sender_id == null )
119
- { console.error("Invalid chain message!", message); return; }
120
-
121
- // <<< go left while `type` starts with "launch:"
122
- if( type.startsWith("launch:") ) {
123
- const inputNode = getInputNode(self.node, DATA_INPUT);
124
- if( inputNode?.id === sender_id )
125
- { console.error("Recursive chain detected!"); return; }
126
-
127
- if( inputNode?.zzController?.processChainMessage ) {
128
- inputNode.zzController.processChainMessage(message);
129
- } else {
130
- // if there's no left node, go right
131
- type = type.substring("launch:".length);
132
- message["type"] = type;
133
- }
134
- }
135
-
136
- // >>> go right when `type` doesn't start with "launch:"
137
- if( !type.startsWith("launch:") ) {
138
- onChainMessage(self, message);
139
-
140
- const outputNodes = getOutputNodes(self.node, DATA_OUTPUT);
141
- for( const outputNode of outputNodes ) {
142
- outputNode.zzController?.processChainMessage(message);
143
- }
144
- }
145
- }
146
-
147
-
148
- /**
149
- * Updates the top styles of a controller and refreshes their widgets accordingly.
150
- * @param {MyTopStylesCtrl} self - The controller instance.
151
- * @param {Array<string>} [topStyles] - The list of new top styles (optional).
152
- */
153
- function updateTopStyles(self, topStyles) {
154
-
155
- const node = self.node;
156
- const allStyleWidgets = self.allStyleWidgets;
157
- if( !topStyles ) { topStyles = []; }
158
-
159
- for( let i=0 ; i<allStyleWidgets.length ; i++ ) {
160
- const widget = allStyleWidgets[i];
161
- const styleName = i<topStyles.length ? topStyles[i] : "";
162
- if( isValidStyleName(styleName) ) {
163
- const text = (i+1) + " - " + styleName;
164
- forceRenameWidget(widget, node, text);
165
- } else {
166
- forceRenameWidget(widget, node, "-");
167
- }
168
- }
169
- }
170
-
171
-
172
- /**
173
- * Returns the index of the first style widget with a valid style name.
174
- * @param {MyTopStylesCtrl} self - The controller instance.
175
- * @returns {number}
176
- * The index of the first valid widget,
177
- * or -1 if no widget has a valid style name.
178
- */
179
- function getFirstValidWidgetIndex(self) {
180
- const allStyleWidgets = self.allStyleWidgets;
181
- for( let i=0 ; i<allStyleWidgets.length ; ++i ) {
182
- if( isValidStyleName(allStyleWidgets[i].label) ) { return i; }
183
- }
184
- return -1;
185
- }
186
-
187
-
188
- /**
189
- * Deselects all styles turning off all switch widgets.
190
- * @param {MyTopStylesCtrl} self - The controller instance.
191
- */
192
- function deselectAllStyles(self) {
193
- for( const widget of self.allStyleWidgets ) {
194
- if( widget.value ) {
195
- widget.value = false;
196
- widget.callback(false, "no-event");
197
- }
198
- }
199
- }
200
-
201
-
202
- //#-------------------------------- EVENTS ---------------------------------#
203
-
204
- /**
205
- * Called when the switch associated with a style changes its state.
206
- * @param {MyTopStylesCtrl} self - The controller instance.
207
- * @param {Object} widget - The widget whose value has changed.
208
- * @param {boolean} value - The new boolean value of the switch widget.
209
- */
210
- function onBooleanSwitchChanged(self, widget, _value) {
211
- const allStyleWidgets = self.allStyleWidgets;
212
-
213
- // only one style can be selected, or none at all
214
- for( const styleWidget of allStyleWidgets ) {
215
- if( styleWidget !== widget ) {
216
- styleWidget.value = false;
217
- styleWidget.callback(false, "no-event");
218
- }
219
- }
220
-
221
- // send a message to all nodes in the chain to deselect styles linked to "channel"
222
- // (currently there are 4 channels "custom_1", "custom_2", "custom_3" and "custom_4")
223
- processChainMessage(self, { type : "launch:deselectAllStyles",
224
- channel : self.channelWidget.value,
225
- sender_id: self.node.id });
226
- }
227
-
228
-
229
- /**
230
- * Called when the control widget requests to perform an action, typically after the workflow is queued.
231
- * @param {MyTopStylesCtrl} self - The controller instance.
232
- * @param {Object} widget - The control widget that requested the action.
233
- * @param {string} value - The action to be performed, either "fixed", "next", or "randomize".
234
- */
235
- function onControlWidget(self, widget, value) {
236
- const allStyleWidgets = self.allStyleWidgets;
237
-
238
- if( value === "next" ) {
239
-
240
- const firstValidIndex = getFirstValidWidgetIndex(self);
241
- if( firstValidIndex === -1 ) {
242
- deselectAllStyles(self); return; }
243
-
244
- // find the next widget after the one that is selected,
245
- // taking into account that it must have a valid style name
246
- let i = firstValidIndex;
247
- for( ; i<allStyleWidgets.length ; ++i ) {
248
- if( allStyleWidgets[i].value ) { ++i; break; } }
249
- for( ; i<allStyleWidgets.length ; ++i ) {
250
- if( isValidStyleName(allStyleWidgets[i].label) ) { break; } }
251
-
252
- // activate the 'i' widget, but verifying that
253
- // if it reached the end of the list it should return to the beginning
254
- if( i>=allStyleWidgets.length ) { i = firstValidIndex; }
255
- allStyleWidgets[i].value = true;
256
- allStyleWidgets[i].callback(true);
257
- }
258
- else if( value === "randomize" ) {
259
- // TODO: implement a random selector that doesn't repeat (something like a shuffle)
260
- }
261
- }
262
-
263
-
264
- /**
265
- * Called when the input slot 'top_styles' changes its connection to another node (or disconnects).
266
- * @param {MyTopStylesCtrl} self - The controller instance.
267
- * @param {Object|null} node - The connected node or null if disconnected.
268
- */
269
- function onTopStylesConnectionChanged(self, node) {
270
- // updates the top styles based on the new connected node's list.
271
- updateTopStyles( self, node?.zzController?.getTopStyles?.() );
272
- }
273
-
274
-
275
- /**
276
- * Called when the input slot 'input' changes its connection to another node (or disconnects).
277
- * @param {MyTopStylesCtrl} self - The controller instance.
278
- * @param {Object|null} node - The connected node or null if disconnected.
279
- */
280
- function onInputConnectionChanged(self, node) {
281
-
282
- if( node ) {
283
- // send a message to all nodes in the chain forcing no 2 styles selected on same channel
284
- // (currently there are 4 channels "custom_1", "custom_2", "custom_3" and "custom_4")
285
- processChainMessage(self, { type : "launch:forceNoRepeatChannels",
286
- channels : new Set(),
287
- sender_id: self.node.id });
288
- }
289
- else {
290
- console.log("##>> DISCONNECTED from input connection");
291
- }
292
- }
293
-
294
-
295
- /**
296
- * Called when a message from another node in the chain is received.
297
- * @param {MyTopStylesCtrl} self - The controller instance.
298
- * @param {Object} message - The received message containing `type`,
299
- * `sender_id`, and custom properties.
300
- */
301
- function onChainMessage(self, message) {
302
- const type = message.type;
303
- const sender_id = message.sender_id;
304
-
305
- // message that deselects all styles of a specific channel:
306
- // - this message should not be processed by the same node that sent it.
307
- // - don't process if channel is specified and it's different from the current one,
308
- if( type === 'deselectAllStyles' ) {
309
- if( self.node.id === sender_id ) { return; }
310
- if( message.channel && message.channel !== self.channelWidget.value ) { return; }
311
- deselectAllStyles(self);
312
- return;
313
- }
314
-
315
- // message that forces no 2 styles to be selected in the same channel
316
- if( type == 'forceNoRepeatChannels' ) {
317
- const channels = message.channels;
318
- const repeated = channels.has(self.channelWidget.value);
319
- if( repeated ) { deselectAllStyles(self); }
320
- else { channels.add(self.channelWidget.value); }
321
- }
322
- }
323
-
324
-
325
- /**
326
- * Called periodically to verify node connections.
327
- * @param {MyTopStylesCtrl} self - The controller instance.
328
- */
329
- function onInterval(self) {
330
-
331
- // verify the `top_styles` slot connection
332
- const topStylesOriginID = getInputOriginID(self.node, "top_styles");
333
- if( self.topStylesOriginID !== topStylesOriginID ) {
334
- self.topStylesOriginID = topStylesOriginID;
335
- const originNode = topStylesOriginID == null ? null : self.node?.graph?.getNodeById(topStylesOriginID);
336
- onTopStylesConnectionChanged(self, originNode);
337
- }
338
-
339
- // verify the `input` slot connection
340
- const inputOriginID = getInputOriginID(self.node, "input");
341
- if( self.inputOriginID !== inputOriginID ) {
342
- self.inputOriginID = inputOriginID;
343
- const originNode = inputOriginID == null ? null : self.node?.graph?.getNodeById(inputOriginID);
344
- onInputConnectionChanged(self, originNode);
345
- }
346
- }
347
-
348
-
349
- //#-------------------------------- HELPERS --------------------------------#
350
-
351
- /**
352
- * Checks whether a given style name is valid.
353
- * @param {string} styleName - The name of the style to validate.
354
- * @returns {boolean} True if the style name is valid, false otherwise.
355
- */
356
- function isValidStyleName(styleName) {
357
-
358
- // discard any name that is not a string
359
- if( typeof styleName != 'string' ) { return false; }
360
-
361
- // discard any empty string, dash or "none"
362
- const trimmedName = styleName.trim();
363
- if( trimmedName === "" || trimmedName === "-" || trimmedName === "none" ) { return false; }
364
-
365
- return true;
366
- }
367
-
368
-
369
-
370
-
371
- //#=========================================================================#
372
- //#////////////////////////// REGISTER EXTENSION ///////////////////////////#
373
- //#=========================================================================#
374
-
375
- app.registerExtension({
376
- name: "ZPowerNodesOLD.MyTopStyles",
377
-
378
- /** Called when the extension is loaded. */
379
- init() {
380
- if (!ENABLED) return;
381
- console.log(`[${this.name}]: Extension loaded.`);
382
- },
383
-
384
- /**
385
- * Called every time ComfyUI creates a new node.
386
- * @param {ComfyNode} node - The node that was created.
387
- */
388
- async nodeCreated(node) {
389
- if (!ENABLED) return;
390
- const comfyClass = node?.comfyClass ?? "";
391
-
392
- // inject controller only to nodes of type "My Top-X Styles Selector"
393
- if( comfyClass.startsWith("MyTop10Styles //ZImage" ) ) {
394
- node.zzController = {};
395
- init(node.zzController, node);
396
- }
397
- },
398
-
399
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/js/my_top_styles_editor.js DELETED
@@ -1,122 +0,0 @@
1
- /**
2
- * File : my_top_styles_editor.js
3
- * Purpose : Frontend implementation for "My Top-<N> Style Editor" node functionality.
4
- * Author : Martin Rizzo | <martinrizzo@gmail.com>
5
- * Date : Jan 31, 2026
6
- * Repo : https://github.com/yourname/z-power-nodes-old
7
- * License : MIT
8
- *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9
- * ComfyUI-ZImagePowerNodes
10
- * ComfyUI nodes designed specifically for the "Z-Image" model.
11
- *_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
12
- */
13
- import { app } from "../../../scripts/app.js";
14
- import { getOutputNodes } from "./common.js";
15
- const ENABLED = true;
16
-
17
-
18
- //#==================== My Top Styles Editor Controller ====================#
19
- /**
20
- * Controller for any node that edits the top styles. (e.g. "My Top-10 Style Editor")
21
- * @typedef {Object} MyTopStylesEditorCtrl
22
- * @property {Object} node - The node this controller is attached to.
23
- * @property {Array<Object>} allStyleWidgets - A list of all widgets whose name starts with "style_".
24
- */
25
-
26
-
27
- /**
28
- * Initializes the MyTopStylesEditorCtrl.
29
- *
30
- * @param {MyTopStylesEditorCtrl} self - The instance of the controller being initialized.
31
- * @param {Object} node - The node to control.
32
- */
33
- function init(self, node) {
34
-
35
- // build a list with all widgets whose name starts with "style_"
36
- const allStyleWidgets = node.widgets.filter(w => w.name.startsWith("style_"));
37
- if( !allStyleWidgets || allStyleWidgets.length == 0 ) {
38
- console.error(`##>> MyTopStylesEditorCtrl: No widgets found whose name starts with "style_"`);
39
- return;
40
- }
41
-
42
- // add a callback to each widget so we can know when the user makes any modification
43
- for( let i=0 ; i<allStyleWidgets.length ; ++i ) {
44
- const widget = allStyleWidgets[i];
45
- widget.callback = function () {
46
- const topStyles = getTopStylesFromWidgets(self);
47
- onTopStylesChanged(self, topStyles);
48
- self.node?.setDirtyCanvas?.(true);
49
- };
50
- }
51
-
52
- // controller properties and methods
53
- self.allStyleWidgets = allStyleWidgets;
54
- self.node = node;
55
- self.getTopStyles = function() { return getTopStylesFromWidgets(self); };
56
- }
57
-
58
-
59
- /**
60
- * Retrieves all the selected top styles from the node widgets.
61
- *
62
- * @param {MyTopStylesEditorCtrl} self - The controller instance.
63
- * @returns {Array<string>} An array of strings representing the selected top styles.
64
- */
65
- function getTopStylesFromWidgets(self) {
66
- const allStyleWidgets = self.allStyleWidgets;
67
-
68
- let topStyles = [];
69
- for( let i=0 ; i<allStyleWidgets.length ; ++i ) {
70
- const widget = allStyleWidgets[i];
71
- topStyles.push( widget.value.toString() );
72
- }
73
- return topStyles;
74
- }
75
-
76
-
77
- /**
78
- * Handles the change of top styles by notifying all connected output nodes.
79
- *
80
- * @param {MyTopStylesEditorCtrl} self - The controller instance.
81
- * @param {Array<string>} topStyles - An array of strings representing the new top styles.
82
- */
83
- function onTopStylesChanged(self, topStyles) {
84
-
85
- // send the new top styles to all nodes connected to the 'TOP_STYLES' output
86
- const outputNodes = getOutputNodes(self.node, 'TOP_STYLES');
87
- for( let i=0 ; i<outputNodes.length ; ++i ) {
88
- const outputNode = outputNodes[i];
89
- outputNode?.zzController?.updateTopStyles?.(topStyles);
90
- }
91
- }
92
-
93
-
94
- //#=========================================================================#
95
- //#////////////////////////// REGISTER EXTENSION ///////////////////////////#
96
- //#=========================================================================#
97
-
98
- app.registerExtension({
99
- name: "ZPowerNodesOLD.MyTopStylesEditor",
100
-
101
- /** Called when the extension is loaded. */
102
- init() {
103
- if (!ENABLED) return;
104
- console.log(`[${this.name}]: Extension loaded.`);
105
- },
106
-
107
- /**
108
- * Called every time ComfyUI creates a new node.
109
- * @param {ComfyNode} node - The node that was created.
110
- */
111
- async nodeCreated(node) {
112
- if (!ENABLED) return;
113
- const comfyClass = node?.comfyClass ?? "";
114
-
115
- // inject controller only to nodes of type "My Top-X Styles"
116
- if( comfyClass.startsWith("MyTop10StylesEditor //ZImage") ) {
117
- node.zzController = {};
118
- init(node.zzController, node);
119
- }
120
- },
121
-
122
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/js/style_category_selector.js DELETED
@@ -1,156 +0,0 @@
1
- /**
2
- * File : style_category_selector.js
3
- * Purpose : Implement a 'style' widget that shows only the styles corresponding with the selected category.
4
- * Author : Martin Rizzo | <martinrizzo@gmail.com>
5
- * Date : Jan 22, 2026
6
- * Repo : https://github.com/yourname/z-power-nodes-old
7
- * License : MIT
8
- *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9
- * ComfyUI-ZImagePowerNodes
10
- * ComfyUI nodes designed specifically for the "Z-Image" model.
11
- *_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
12
- */
13
- import { app } from "../../../scripts/app.js";
14
- import { fetchStyleNamesByCategory09 } from "./common_server.js";
15
- const ENABLED = true;
16
- /**
17
- * Object encapsulating the style category selection functionality.
18
- * @typedef {Object} StyleCategorySelector
19
- * @property {Object} categoryWidget - The combobox that selects the category to show.
20
- * @property {Object} styleWidget - The combobox that will be refilled with styles.
21
- * @property {Object.<string, Array<string>>} stylesByCategory - An object mapping each category to a list of styles.
22
- * @property {string} oldCategory - The name of the last selected category.
23
- * @property {Object.<string, string>} selectedByCategory - An object storing the last selected style for each category.
24
- */
25
-
26
-
27
- /**
28
- * Initializes the StyleCategorySelector object with specific widgets.
29
- * @param {StyleCategorySelector} self - The StyleCategorySelector object to initialize.
30
- * @param {Object} categoryWidget - The combobox that manages categories.
31
- * @param {Object} styleWidget - The combobox that manages styles.
32
- */
33
- function init(self, categoryWidget, styleWidget) {
34
-
35
- self.categoryWidget = categoryWidget;
36
- self.styleWidget = styleWidget;
37
- self.stylesByCategory = null;
38
- self.oldCategory = self.categoryWidget.value;
39
- self.selectedByCategory = {};
40
-
41
- // performs an asynchronous request to the server to get styles by category
42
- fetchStyleNamesByCategory09( (stylesByCategory) => {
43
- self.stylesByCategory = stylesByCategory;
44
- // fill the style combo widget with all the styles from the current category
45
- fillStyleWidget(self, self.categoryWidget.value);
46
- });
47
-
48
-
49
- // save the existing callback functionconst ENABLED = true;
50
- const originalCallback = self.categoryWidget.callback;
51
-
52
- self.categoryWidget.callback = async (value) => {
53
- onCategoryChange(self, value);
54
- if (typeof originalCallback === 'function') { await originalCallback(value); }
55
- };
56
- }
57
-
58
-
59
- /**
60
- * Fills the style combo widget with styles corresponding to the given category.
61
- *
62
- * @param {StyleCategorySelector} self - The StyleCategorySelector object.
63
- * @param {string} category - The name of the category whose styles should be displayed.
64
- * @returns {string}
65
- * The name of the default style for the given category,
66
- * which is either "none" or the first style available.
67
- */
68
- function fillStyleWidget(self, category) {
69
-
70
- // if the category is not valid -> styles = ["none"]
71
- if( !self.stylesByCategory ||
72
- category in self.stylesByCategory === false
73
- ) {
74
- self.styleWidget.options.values = ["none"];
75
- return "none";
76
- }
77
-
78
- // fill the style combo widget with the option "none"
79
- // followed by all the styles from the category
80
- let styles = ["none"];
81
- const catStyles = self.stylesByCategory[category];
82
- for (let i = 0; i < catStyles.length; i++) {
83
- styles.push( catStyles[i] );
84
- }
85
- self.styleWidget.options.values = styles;
86
-
87
- // by default try to select the second style
88
- // (because the first always is "none")
89
- return styles[ styles.length>=2 ? 1 : 0 ];
90
- }
91
-
92
-
93
- /**
94
- * Handles the change in category by updating available styles.
95
- * @param {StyleCategorySelector} self - The StyleCategorySelector object whose category has changed.
96
- * @param {string} newCategory - The name of the new selected category.
97
- */
98
- function onCategoryChange(self, newCategory) {
99
-
100
- // store the selection that existed before the change
101
- self.selectedByCategory[ self.oldCategory ] = self.styleWidget.value;
102
- self.oldCategory = newCategory;
103
-
104
- // fill the style combo widget with all the styles for the new category
105
- // and get the default style for that category
106
- let defaultStyle = fillStyleWidget(self, newCategory);
107
-
108
- // if the category already had a previously selected style, use it as the default
109
- if( newCategory in self.selectedByCategory ) {
110
- defaultStyle = self.selectedByCategory[newCategory];
111
- }
112
- self.styleWidget.value = defaultStyle;
113
- }
114
-
115
-
116
- //#=========================================================================#
117
- //#////////////////////////// REGISTER EXTENSION ///////////////////////////#
118
- //#=========================================================================#
119
-
120
- app.registerExtension({
121
- name: "ZPowerNodesOLD.StyleCategorySelector",
122
-
123
- /** Called when the extension is loaded. */
124
- init()
125
- {
126
- if (!ENABLED) return;
127
- console.log(`[${this.name}]: Extension loaded.`);
128
- },
129
-
130
- /**
131
- * Called every time ComfyUI creates a new node.
132
- * @param {ComfyNode} node - The node that was created.
133
- */
134
- async nodeCreated(node)
135
- {
136
- if (!ENABLED) return;
137
- const comfyClass = node?.comfyClass ?? "";
138
-
139
- // only applies to "Style & Prompt Encoder" and "Style String Injector"
140
- if( !comfyClass.startsWith("StylePromptEncoder //ZImage" ) &&
141
- !comfyClass.startsWith("StyleStringInjector //ZImage") )
142
- { return; }
143
-
144
- const categoryWidget = node.widgets.find(w => w.name === "category");
145
- const styleWidget = node.widgets.find(w => w.name === "style" );
146
-
147
- // if any of the widgets or stylesByCategory could not be created, return
148
- if( !categoryWidget || !styleWidget )
149
- { return; }
150
-
151
- node.styleCategorySelectorZ = {};
152
- init(node.styleCategorySelectorZ, categoryWidget, styleWidget );
153
-
154
- },
155
-
156
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/js/style_gallery.css DELETED
@@ -1,178 +0,0 @@
1
-
2
- .zipn-spacer {
3
- width : 0.5em;
4
- height : 20px;
5
- display : inline-block;
6
- vertical-align : middle;
7
- }
8
-
9
- .zipn-divider {
10
- width : 1px;
11
- height : 20px;
12
- margin-inline : 0.5em;
13
- display : inline-block;
14
- background-color: rgb(113, 113, 113);
15
- vertical-align : middle;
16
- }
17
-
18
- /*============================ TOOLBAR BUTTONS ============================*/
19
-
20
- .zipn-dialog .p-button-text {
21
- color : var(--p-button-link-color);
22
- background-color: transparent;
23
- border-color : transparent;
24
- border-radius: 4px;
25
- }
26
-
27
- .zipn-dialog .p-button-text.p-highlight {
28
- color : var(--p-dialog-color);
29
- background-color: var(--p-button-primary-background);
30
- background-color: color-mix(in srgb, var(--p-button-primary-background) 40%, var(--p-dialog-background));
31
- }
32
-
33
- /*======================= STYLE GALLERY: CONTAINERS =======================*/
34
-
35
- .zipn-two-columns {
36
- display : flex;
37
- flex-direction: row;
38
- overflow : hidden;
39
- min-width : 880px;
40
- height : 600px;
41
- }
42
-
43
- .zipn-search-results-pane {
44
- flex : 1 1 0;
45
- overflow-y : auto;
46
- padding : 10px;
47
- }
48
-
49
- .zipn-details-pane {
50
- flex : 0 0 auto;
51
- flex-basis : 384px;
52
- min-width : 384px;
53
- overflow-x : hidden;
54
- overflow-y : auto;
55
- padding : 0px;
56
- }
57
-
58
- .zipn-details-pane h1 {
59
- font-size: 1.5rem;
60
- }
61
-
62
- .zipn-details-pane img {
63
- width : 384px;
64
- height : 384px;
65
- border-radius: 16px;
66
- }
67
-
68
- .zipn-details-pane p {
69
- font-size : 0.9rem;
70
- color : var(--text-secondary);
71
- }
72
-
73
- /*========================== STYLE GALLERY: GRID ==========================*/
74
-
75
- .zipn-style-grid {
76
- display: grid;
77
- grid-template-columns: repeat(auto-fit, 110px);
78
- gap: 1px;
79
- }
80
-
81
- .zipn-style-grid-card {
82
- width : 110px;
83
- display : flex;
84
- flex-direction : column;
85
- align-items : center;
86
- border : 2px solid transparent;
87
- border-radius : 8px;
88
- }
89
-
90
- .zipn-style-grid-card.initial {
91
- background-color: var(--p-button-primary-background);
92
- background-color: color-mix(in srgb, var(--p-button-primary-background) 33%, var(--p-dialog-background));
93
- }
94
-
95
- .zipn-style-grid-card.active {
96
- background-color: var(--p-button-primary-background);
97
- background-color: color-mix(in srgb, var(--p-button-primary-background) 66%, var(--p-dialog-background));
98
- border-color: var(--p-button-primary-background);
99
- }
100
-
101
- .zipn-style-grid-card img {
102
- width : 96px;
103
- height : 96px;
104
- object-fit : cover;
105
- display : block;
106
- border-radius : 8px;
107
- }
108
-
109
- .zipn-style-grid-card p {
110
- margin : 4px 0 0 0;
111
- padding : 0 2px;
112
- width : 100%;
113
- font-size : 0.7rem;
114
- line-height : 1.1;
115
- text-align : center;
116
- overflow : hidden;
117
- text-overflow : ellipsis;
118
- white-space : nowrap;
119
- background : transparent;
120
- }
121
-
122
- /*========================== STYLE GALLERY: LIST ==========================*/
123
-
124
- .zipn-style-list {
125
- display: flex;
126
- flex-direction: column;
127
- gap: 0.1rem;
128
- }
129
-
130
- .zipn-style-list-card {
131
- width : 100%;
132
- display : flex;
133
- align-items : center;
134
- gap : 0.75rem;
135
- padding : 0.2rem 0.2rem;
136
- background-color: var(--p-dialog-background);
137
- cursor : pointer;
138
- }
139
-
140
- .zipn-style-list-card.p-highlight {
141
- background-color: var(--p-button-primary-background);
142
- background-color: color-mix(in srgb, var(--p-button-primary-background) 66%, var(--p-dialog-background));
143
- }
144
-
145
- .zipn-style-list-card.initial {
146
- background-color: var(--p-button-primary-background);
147
- background-color: color-mix(in srgb, var(--p-button-primary-background) 33%, var(--p-dialog-background));
148
- }
149
-
150
- .zipn-style-list-card.active {
151
- background-color: var(--p-button-primary-background);
152
- background-color: color-mix(in srgb, var(--p-button-primary-background) 66%, var(--p-dialog-background));
153
- border-color: var(--p-button-primary-background);
154
- }
155
-
156
-
157
- .zipn-style-list-card img {
158
- width : 32px;
159
- height : 32px;
160
- flex-shrink : 0;
161
- object-fit : cover;
162
- display : block;
163
- border-radius : 4px;
164
- }
165
-
166
- .zipn-style-list-card p {
167
- margin : 0;
168
- padding : 0;
169
- font-size : 1.2rem;
170
- line-height : 1.3;
171
- color : inherit;
172
- overflow : hidden;
173
- text-overflow : ellipsis;
174
- white-space : nowrap;
175
- color : var(--p-dialog-color);
176
- }
177
-
178
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/js/style_gallery.js DELETED
@@ -1,799 +0,0 @@
1
- /**
2
- * File : style_gallery.js
3
- * Purpose : Extension that presents a gallery of available visual styles to select from.
4
- * Author : Martin Rizzo | <martinrizzo@gmail.com>
5
- * Date : Feb 7, 2026
6
- * Repo : https://github.com/yourname/z-power-nodes-old
7
- * License : MIT
8
- *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9
- * ComfyUI-ZImagePowerNodes
10
- * ComfyUI nodes designed specifically for the "Z-Image" model.
11
- *_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
12
- */
13
- import { app } from "../../../scripts/app.js";
14
- import { ComfyDialog, $el as html } from "../../../scripts/ui.js"; //< deprrecated ?
15
- import { loadCSS } from "./common.js";
16
- import { makeCustomDialog, setupCardHoverListeners } from "./common_dialog.js";
17
- import { fetchLastVersionStyles } from "./common_server.js";
18
- const ENABLED = true;
19
- const DIALOG_ID = 'zipn-style-gallery-dialog';
20
- const TITLE_ID = 'zipn-style-gallery-title';
21
- loadCSS("style_gallery.css");
22
-
23
-
24
- //#========================= Style Gallery Dialog ==========================#
25
-
26
- /**
27
- * Represents a dialog for selecting styles in a gallery format. Extends the base ComfyDialog class.
28
- */
29
- class StyleGalleryDialog extends ComfyDialog {
30
-
31
- constructor() {
32
- super();
33
-
34
- // create the custom dialog.
35
- // icons can be taken from PrimeIcons or Pictogrammers MDT
36
- // PrimeIcons : e.g. "i.pi.pi-image" (https://primevue.org/icons)
37
- // Pictogrammers MDI: e.g. "i.mdi.mdi-image" (https://pictogrammers.com/library/mdi)
38
- this.element = makeCustomDialog(
39
- DIALOG_ID , //< ID of the DOM element where the dialog is located
40
- TITLE_ID , //< ID of the DOM element where the title is located
41
- 'Select Style' , //< title
42
- 'i.mdi.mdi-image-multiple', //< icon
43
-
44
- // DIALOG CONTENT
45
- html("div.zipn-dialog", {}, [
46
- this.createSearchBar(),
47
- html("div.zipn-two-columns", {}, [
48
- StyleGalleryDialog.DETAILS_PANE,
49
- StyleGalleryDialog.SEARCH_RESULTS_PANE,
50
- ]),
51
- ]),
52
-
53
- () => this.close() //< close callback
54
- );
55
-
56
-
57
- //---- INTERNAL STATE VARIABLES -------------------
58
- // - should be re-initialized every time the dialog is launched
59
-
60
- /** @type {boolean} Indica si el diálogo está abierto. */
61
- this.isOpen = false;
62
-
63
- /** @type {string} The initial style name (before applying the selected one). */
64
- this.initialStyleName = "";
65
-
66
- /** @type {number|null} ID of the initial card/style (which will be highlighted). */
67
- this.initialCardID = null;
68
-
69
- /** @type {number|null} ID of the card/style being pointed by the mouse. */
70
- this.hoveredCardID = null;
71
-
72
- /** @type {number|null} Index of the selected style in 'resultStyles'. */
73
- // focusedCardIndex
74
- this.resultIndex = null;
75
-
76
- /** @type {Array<object>} An array of styles that match the search text. */
77
- this.resultStyles = [];
78
-
79
- /** @type {number} Number of columns used in the search results grid. */
80
- this.resultColumns = 4;
81
-
82
- /** @type {number|null} ID of the previously selected style. */
83
- this.oldSelectionID = null;
84
-
85
- /** @type {string} Text entered by the user to filter styles (case-insensitive). */
86
- this.textFilter = "";
87
-
88
- /** @type {string} Active category filter ("photo", "illustration", "wild", "custom"). Empty means all categories. */
89
- this.categoryFilter = "";
90
-
91
- /** @type {"grid"|"list"} View mode of the dialog, either "grid" or "list". */
92
- this.viewMode = "grid";
93
-
94
- //---- INTERNAL VARIABLES -------------------------
95
-
96
- /** @type {Array<object>} An array to store styles in ID order for fast access. */
97
- this.stylesByID = [];
98
-
99
- /** @type {Object<string, number>} Map of lowercase style names to their IDs. */
100
- this.styleIDsByLowerName = {};
101
-
102
- /** @type {number|null} Timer used by the lockPointer method. */
103
- this.pointerLockedTimer = null;
104
-
105
- /** @type {number|null} Timer used by the 'onInputChange' event. */
106
- this.inputChangeTimer2 = null;
107
-
108
- /** @type {boolean} Flag used by 'onInputChange' to block mouse events. */
109
- this.isPointerLocked = false;
110
-
111
- //---- DIALOG ELEMENTS ----------------------------
112
-
113
- /** @type {HTMLElement|null} Search input element in the dialog. */
114
- this.searchInputEl = this.element.querySelector('#zipn-search-input');
115
-
116
- /** @type {HTMLElement|null} Element containing search results. */
117
- this.searchResultsEl = this.element.querySelector('#zipn-search-results');
118
-
119
- /** @type {HTMLElement|null} Header element in the details pane. */
120
- this.detailsHeaderEl = this.element.querySelector('.zipn-details-pane h1');
121
-
122
- /** @type {HTMLElement|null} Image element in the details pane. */
123
- this.detailsImageEl = this.element.querySelector('.zipn-details-pane img');
124
-
125
- /** @type {HTMLElement|null} Text element in the details pane. */
126
- this.detailsTextEl = this.element.querySelector('.zipn-details-pane p');
127
-
128
- /** @type {Function|null} Callback function for when a style is selected. */
129
- this.onSelectStyle = null;
130
-
131
- //---- TOOLBAR BUTTONS ----------------------------
132
-
133
- /** @type {HTMLElement|null} Button to view styles from all categories. (no filter) */
134
- this.tb_allButtonEl = this.element.querySelector('#zipn-all-btn');
135
-
136
- /** @type {HTMLElement|null} Button to filter photo styles. */
137
- this.tb_photoButtonEl = this.element.querySelector('#zipn-photo-btn');
138
-
139
- /** @type {HTMLElement|null} Button to filter illustration styles. */
140
- this.tb_illusButtonEl = this.element.querySelector('#zipn-illus-btn');
141
-
142
- /** @type {HTMLElement|null} Button to filter wild styles. */
143
- this.tb_wildButtonEl = this.element.querySelector('#zipn-wild-btn');
144
-
145
- /** @type {HTMLElement|null} Button to filter custom styles. */
146
- this.tb_customButtonEl = this.element.querySelector('#zipn-custom-btn');
147
-
148
- /** @type {HTMLElement|null} Button to switch to grid view mode. */
149
- this.tb_gridButtonEl = this.element.querySelector('#zipn-grid-btn');
150
-
151
- /** @type {HTMLElement|null} Button to switch to list view mode. */
152
- this.tb_listButtonEl = this.element.querySelector('#zipn-list-btn');
153
-
154
- //---- EVENT LISTENERS ----------------------------
155
-
156
- const CARD_SELECTOR = '.zipn-style-grid-card, .zipn-style-list-card';
157
- setupCardHoverListeners( this.searchResultsEl, CARD_SELECTOR,
158
- (card ) => { this.onCardEnter(card); },
159
- (_card ) => { },
160
- (card ) => { this.onCardClick(card); },
161
- (container) => { this.onCardContainerLeave(container); }
162
- );
163
- this.searchInputEl.addEventListener('input' , (e) => { this.onInputChange(e.target); });
164
- this.searchInputEl.addEventListener('keydown', (e) => { if (this.onInputKeyDown(e.key)) { event.preventDefault(); } });
165
- this.searchInputEl.addEventListener('blur' , () => { this.onInputLostFocus(); } );
166
- }
167
-
168
-
169
- /**
170
- * Launches the style gallery dialog.
171
- * @param {string} title - The title of the dialog.
172
- * @param {string} styleName - The name of the selected style.
173
- * @param {Function} onSelectStyle - A callback function that gets called
174
- * when a style is selected by the user.
175
- */
176
- static launch(title, styleName, onSelectStyle) {
177
-
178
- // styleName can be wrapped in quotes, remove them
179
- if( styleName && styleName.startsWith('"') && styleName.endsWith('"') ) {
180
- styleName = styleName.slice(1, -1);
181
- }
182
-
183
- // create the first time and use the same instance the next time
184
- if( !this._instance ) { this._instance = new StyleGalleryDialog(); }
185
- const dialog = this._instance;
186
- const titleEl = dialog.element.querySelector(`#${TITLE_ID}`);
187
-
188
- if( titleEl ) { titleEl.textContent = title; }
189
- dialog.onSelectStyle = onSelectStyle;
190
- dialog.onOpen(styleName);
191
- }
192
-
193
-
194
- /**
195
- * Closes the dialog.
196
- */
197
- close()
198
- { this.onClose(); super.close(); }
199
-
200
-
201
- /**
202
- * Handles the user's choice of a style and closes the dialog.
203
- */
204
- userHasChosen() {
205
- const selectionID = this.getSelectionID();
206
- const style = selectionID != null ? this.stylesByID[selectionID] : null;
207
- if( style ) {
208
- this.onSelectStyle?.(style.name);
209
- this.close();
210
- }
211
- }
212
-
213
-
214
- /**
215
- * Updates toolbar buttons state based on current view mode and category filter.
216
- */
217
- updateToolbarButtons() {
218
- // view mode buttons
219
- this.tb_listButtonEl.classList.toggle('p-highlight', this.viewMode == "list" );
220
- this.tb_gridButtonEl.classList.toggle('p-highlight', this.viewMode == "grid" );
221
- // category buttons
222
- this.tb_allButtonEl.classList.toggle('p-highlight', this.categoryFilter == "" );
223
- this.tb_photoButtonEl.classList.toggle('p-highlight', this.categoryFilter == "photo" );
224
- this.tb_illusButtonEl.classList.toggle('p-highlight', this.categoryFilter == "illustration" );
225
- this.tb_wildButtonEl.classList.toggle('p-highlight', this.categoryFilter == "wild" );
226
- this.tb_customButtonEl.classList.toggle('p-highlight', this.categoryFilter == "custom" );
227
- }
228
-
229
-
230
- /**
231
- * Returns the ID of the currently selected style.
232
- * @returns {string|null} The selected style's ID or null if no selection exists.
233
- */
234
- getSelectionID() {
235
- const resultID = (this.resultIndex != null) ? this.resultStyles[this.resultIndex]?.id : null;
236
- return (this.hoveredCardID != null) ? this.hoveredCardID : resultID;
237
- }
238
-
239
-
240
- /**
241
- * Updates the selected style and displays its details in the dialog.
242
- * @param {boolean|Object} shouldScroll - If true, scrolls to the selected style. Defaults to false.
243
- * Can also be an object containing the scrollIntoView options.
244
- * @param {boolean} force - If true, updates the selection even if no change occurred. Defaults to false.
245
- */
246
- updateSelection(shouldScroll=false, force=false) {
247
- const newSelectionID = this.getSelectionID();
248
- const detailsID = newSelectionID != null ? newSelectionID : this.initialCardID;
249
- if( !force && newSelectionID === this.oldSelectionID ) { return; }
250
-
251
- // deactivate the card with the old style
252
- const oldCardEl = this.oldSelectionID != null ? this.element.querySelector(`#zipn-style-${this.oldSelectionID}`) : null;
253
- if( oldCardEl ) { oldCardEl.classList.remove('active'); }
254
-
255
- this.oldSelectionID = newSelectionID;
256
-
257
- // activate the card with the new style and optionally scroll to it
258
- const newCardEl = newSelectionID != null ? this.element.querySelector(`#zipn-style-${newSelectionID}`) : null;
259
- if( newCardEl ) { newCardEl.classList.add('active'); }
260
- if( newCardEl && shouldScroll ) {
261
- let options = typeof shouldScroll === "object" ? shouldScroll : { behavior: 'smooth', block: 'nearest' };
262
- newCardEl.scrollIntoView(options);
263
- }
264
-
265
- // update details pane
266
- const style = detailsID != null ? this.stylesByID[ detailsID ] : null;
267
- const cacheBuster = this.cacheBuster ? '&cache=' + this.cacheBuster : '';
268
-
269
- this.detailsHeaderEl.textContent = style?.name || "";
270
- this.detailsTextEl.textContent = style?.description || "";
271
- if( style?.thumbnail ) {
272
- this.detailsImageEl.src = style.thumbnail + cacheBuster;
273
- this.detailsImageEl.style.visibility = 'visible';
274
- } else {
275
- this.detailsImageEl.style.visibility = 'hidden';
276
- }
277
- }
278
-
279
-
280
- /**
281
- * Updates the search filters and visualization modes based on a command.
282
- *
283
- * This method processes a given command to modify the current view mode
284
- * or category/text filters, then updates the displayed styles in the
285
- * gallery according to these changes.
286
- *
287
- * @param {string} command - A string representing the update operation,
288
- * starting with:
289
- * '$' followed by 'grid' or 'list' to switch view modes
290
- * '@' followed by a category name to filter by category (empty string for no filtering)
291
- * '>' followed by a text to filter styles by name (empty string for no filtering)
292
- */
293
- updateSearchResults(command) {
294
- let shouldScroll = false;
295
-
296
- // if the command starts with "$", change the view mode
297
- if( command.startsWith('$') ) {
298
- const viewMode = command.substring(1);
299
- if( viewMode == this.viewMode ) { return; }
300
- this.viewMode = viewMode;
301
- this.resultColumns = (viewMode=="grid" ? 4 : 1);
302
- this.updateToolbarButtons();
303
- shouldScroll = { behavior: 'instant', block: 'center' };
304
- }
305
-
306
- // if the command starts with "@", change the category filter
307
- else if( command.startsWith('@') ) {
308
- const categoryFilter = command.substring(1);
309
- if( categoryFilter == this.categoryFilter ) { return; }
310
- this.categoryFilter = categoryFilter;
311
- this.updateToolbarButtons();
312
- this.resultIndex = null;
313
- }
314
-
315
- // if the command starts with ">", change the text filter
316
- else if( command.startsWith(">") ) {
317
- const textFilter = command.substring(1);
318
- if( textFilter == this.textFilter ) { return; }
319
- this.textFilter = textFilter;
320
- if( this.textFilter ) { this.resultIndex = 0; }
321
- else { this.resultIndex = null; }
322
- }
323
-
324
- // cache buster used to force re-fetching of images from cache each hour
325
- this.cacheBuster = Math.floor(Date.now() / 3600000);
326
-
327
- // apply filters and re-render gallery
328
- this.resultStyles = StyleGalleryDialog.applyFilter( this.stylesByID, this.textFilter, this.categoryFilter );
329
- StyleGalleryDialog.renderResults( this.searchResultsEl, this.viewMode, this.resultStyles, this.initialCardID, this.cacheBuster );
330
-
331
- // disable focus if there are no results
332
- if( this.resultStyles.length == 0 ) { this.resultIndex = null; }
333
-
334
- // update the visual aspect of the card shown as active
335
- this.updateSelection(shouldScroll,true);
336
- }
337
-
338
- /**
339
- * Renders the gallery grid with the provided visual styles.
340
- *
341
- * This static method generates HTML content for displaying a list or grid
342
- * of styles based on the specified view mode. Each style is represented as
343
- * an object in the 'styles' array and includes properties such as
344
- * 'id', 'name', and 'thumbnail'.
345
- *
346
- * @param {HTMLElement} containerEl - The container element where the gallery will be rendered.
347
- * @param {string} viewMode - The current view mode ('grid' or 'list') that determines
348
- * the layout of each item in the gallery. This parameter
349
- * is used to apply appropriate CSS classes.
350
- * @param {Array<Object>} styles - An array of objects representing the visual styles to display.
351
- * @param {string|null} initialStyleID - The ID of the initially selected style, which will receive an
352
- * additional CSS class ('initial') for highlighting.
353
- * @param {string|null} cacheBuster_ - A string used as a cache buster appended to each thumbnail image URL
354
- * to ensure that the browser fetches the latest version of images.
355
- * @example
356
- * const styles = [
357
- * { id: 'style-1', name: 'Modern Look', thumbnail: '/images/modern.jpg' },
358
- * { id: 'style-2', name: 'Retro Feel', thumbnail: '/images/retro.jpg' }
359
- * ];
360
- * renderResults(document.getElementById('gallery-container'), 'grid', styles, 'style-1', Date.now());
361
- */
362
- static renderResults(containerEl, viewMode, styles, initialStyleID = null, cacheBuster_ = null) {
363
- const baseClass = `zipn-style-${viewMode}`;
364
- const cacheBuster = cacheBuster_ ? '&cache=' + cacheBuster_ : '';
365
- containerEl.className = baseClass;
366
- containerEl.innerHTML = styles.map( style => {
367
- const extraClass = style.id === initialStyleID ? ' initial' : '';
368
- const imageSrc = style.thumbnail + cacheBuster;
369
- return `
370
- <div class="${baseClass}-card${extraClass}" id="zipn-style-${style.id}" data-id="${style.id}">
371
- <img src="${imageSrc}" loading="lazy" alt="${style.name}">
372
- <p>${style.name}</p>
373
- </div>`;
374
- }).join('');
375
- }
376
-
377
-
378
- /**
379
- * Applies a filter to an array of styles based on text and category criteria.
380
- * @param {Object[]} allStyles - An array of style objects, each containing properties
381
- * such as id, name, description, category, etc.
382
- * @param {string} textFilter - A string that filters styles by matching style names
383
- * against search terms.
384
- * @param {string} category - The selected category for filtering the styles
385
- * (e.g., "photo", "illustration", etc.). An empty
386
- * string indicates no specific category filter.
387
- * @returns {Object[]}
388
- * Returns an array of style objects that match the given text and category filters.
389
- */
390
- static applyFilter(allStyles, textFilter, category) {
391
- const terms = textFilter.toLowerCase().split(' ');
392
- //const tags = terms.filter(t => t.startsWith('#'));
393
- const words = terms.filter(t => !t.startsWith('#'));
394
- return allStyles.filter(style => {
395
- const matchesCategory = category === "" || style.category === category;
396
- const matchesWords = words.every(word => style.lowerName.includes(word));
397
- const matchesTags = true; //tags.length === 0 || tags.some(tag => style.tags.includes(tag));
398
- return matchesCategory && matchesWords && matchesTags;
399
- });
400
- }
401
-
402
-
403
- //-- EVENTS -----------------------------------------------------------
404
-
405
- /**
406
- * Called when the dialog is launched or re-opened.
407
- *
408
- * Initializes variables and loads style data from the server.
409
- * @param {string} styleName - The name of the initial style to be selected.
410
- */
411
- onOpen(styleName) {
412
-
413
- // initialize variables as if the dialog had just been created
414
- this.isOpen = true;
415
- this.initialStyleName = styleName;
416
- this.initialCardID = null;
417
- this.resultStyles = [];
418
- this.resultIndex = null;
419
- this.hoveredCardID = null;
420
- this.oldSelectionID = null;
421
- this.textFilter = '';
422
- this.categoryFilter = "";
423
- this.isPointerLocked = false;
424
- this.searchInputEl.value = '';
425
- // `this.viewMode` is not set here because it persists between dialog reopenings
426
-
427
- // load style data from server and focus on the initial style
428
- fetchLastVersionStyles( (styles) =>
429
- {
430
- // process the received data
431
- this.onReceivedStyles(styles);
432
-
433
- // if the initial card is in the list of results,
434
- // focus on that initial card !
435
- const initialCardIndex = this.findIndexFromCardID(this.initialCardID);
436
- if( initialCardIndex >= 0 ) {
437
- this.resultIndex = initialCardIndex;
438
- this.updateSelection();
439
- requestAnimationFrame( () => {
440
- //requestAnimationFrame( () => {
441
- const focusedCardID = this.resultIndex != null ? this.resultStyles[this.resultIndex]?.id : null;
442
- const focusedCardEl = this.elementFromCardID(focusedCardID);
443
- if( focusedCardEl ) { focusedCardEl.scrollIntoView({ block: 'start' }); }
444
- //});
445
- });
446
- }
447
- });
448
-
449
- this.show();
450
- this.updateToolbarButtons();
451
- this.searchInputEl.focus();
452
-
453
- // trigger enter animation
454
- //requestAnimationFrame(() => { this.element.classList.add('fade-in'); });
455
- }
456
-
457
-
458
- /**
459
- * Called when the dialog is closed. Updates the open state flag.
460
- */
461
- onClose() {
462
- this.isOpen = false;
463
- }
464
-
465
-
466
- /**
467
- * Called when style data is received from the server.
468
- * Initializes internal arrays and maps with the received data.
469
- * @param {Array} styles - An array of style objects received from the server.
470
- */
471
- onReceivedStyles(styles) {
472
- this.stylesByID = styles;
473
- this.styleIDsByLowerName = Object.fromEntries(styles.map(style => [style.name.toLowerCase(), style.id]));
474
- this.initialCardID = this.styleIDsByLowerName[this.initialStyleName.toLowerCase()];
475
- this.updateSearchResults("!refresh");
476
- this.updateSelection();
477
- }
478
-
479
-
480
- /**
481
- * Called when the search input loses focus.
482
- * Try to keep the search input focused always.
483
- */
484
- onInputLostFocus() {
485
- if( !this.isOpen ) { return; }
486
- setTimeout(() => { if (this.isOpen) this.searchInputEl.focus(); }, 0);
487
- }
488
-
489
-
490
- /**
491
- * Called when the text in the search input changes.
492
- * Updates the search results and the active item, locking the pointer
493
- * movement events temporarily to prevent they interfering with the
494
- * search result autoselection.
495
- * @param {HTMLInputElement} inputEl - The search input element.
496
- * @param {boolean} isEnterPressed - Indicates whether the Enter key was pressed.
497
- */
498
- onInputChange(inputEl, isEnterPressed = false) {
499
-
500
- // temporarily lock pointer movement events
501
- this.lockPointer();
502
-
503
- // debounce the search results update
504
- clearTimeout(this.inputChangeTimer2);
505
- this.inputChangeTimer2 = setTimeout(() =>
506
- {
507
- // always update the search results first so that when user
508
- // presses enter it will accept the most updated result
509
- this.updateSearchResults(`>${inputEl.value}`);
510
- if( isEnterPressed ) {
511
- this.userHasChosen();
512
- }
513
- this.hoveredCardID = null;
514
- this.updateSelection();
515
-
516
- }, isEnterPressed ? 100 : 300);
517
-
518
- }
519
-
520
-
521
- /**
522
- * Called when a key is pressed in the search input.
523
- * @param {string} key - The key that was pressed.
524
- * @return {boolean}
525
- * True if the key if handled by the method and should not be processed by the input field.
526
- */
527
- onInputKeyDown(key) {
528
- let resultIndex = this.resultIndex;
529
-
530
- if ( key === 'Escape' ) { this.close(); }
531
- else if( key === 'Enter' ) { this.onInputChange(this.searchInputEl, true); }
532
- else if( this.resultIndex != null || this.hoveredCardID != null )
533
- {
534
- // if the current selection is determined by the mouse pointer,
535
- // capture that selection!
536
- if( resultIndex == null ) {
537
- const hoveredIndex = this.findIndexFromCardID(this.hoveredCardID);
538
- resultIndex = hoveredIndex >= 0 ? hoveredIndex : 0;
539
- }
540
-
541
- // cursor key movement
542
- const oldResultIndex = this.resultIndex;
543
- if ( key === 'ArrowUp' ) { resultIndex-=this.resultColumns; }
544
- else if( key === 'ArrowDown' ) { resultIndex+=this.resultColumns; }
545
- else if( key === 'ArrowLeft' ) { resultIndex--; }
546
- else if( key === 'ArrowRight' ) { resultIndex++; }
547
- if( resultIndex >= this.resultStyles.length ) { resultIndex = oldResultIndex; }
548
- if( resultIndex < 0 ) { resultIndex = oldResultIndex; }
549
-
550
- }
551
- // if there is no selection (e.g. just opened the dialog) and user presses down,
552
- // first search result gets selected
553
- else if( this.resultIndex == null && key === 'ArrowDown' ) {
554
- if( this.resultStyles ) { resultIndex = 0; }
555
- }
556
-
557
- // if the selected search result index is modified, update its on-screen representation
558
- if( this.resultIndex !== resultIndex ) {
559
- this.resultIndex = resultIndex;
560
- this.hoveredCardID = null;
561
- this.lockPointer();
562
- this.updateSelection(true);
563
- }
564
- return ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(key);
565
- }
566
-
567
-
568
- /**
569
- * Called when the mouse enters a style card.
570
- * @param {HTMLElement} cardEl - The card element that was entered.
571
- */
572
- onCardEnter(cardEl) {
573
- if( this.isPointerLocked ) { return; }
574
- // updates the currently pointed style ID and triggers selection updates
575
- this.hoveredCardID = Number(cardEl.dataset?.id);
576
- this.updateSelection();
577
- }
578
-
579
- /**
580
- * Called when a style card is clicked.
581
- * @param {HTMLElement} cardEl - The card element that was clicked.
582
- */
583
- onCardClick(cardEl) {
584
- // sets the currently pointed style ID and triggers user selection handling
585
- this.hoveredCardID = Number(cardEl?.dataset?.id);
586
- this.userHasChosen();
587
- }
588
-
589
- /**
590
- * Called when the mouse leaves the card container.
591
- * This function is responsible for resetting the currently pointed style ID
592
- * when the user moves the mouse out of the area containing the style cards.
593
- */
594
- onCardContainerLeave() {
595
- if( this.isPointerLocked ) { return; }
596
- this.hoveredCardID = null;
597
- this.updateSelection();
598
- }
599
-
600
- //-- HELPERS ----------------------------------------------------------
601
-
602
- /**
603
- * Temporarily locks the pointer movement events.
604
- *
605
- * This method sets a flag to prevent pointer movement events from being
606
- * processed, the flag is reset after a short delay (800 milliseconds).
607
- */
608
- lockPointer() {
609
- this.isPointerLocked = true;
610
- clearTimeout(this.pointerLockedTimer);
611
- this.pointerLockedTimer = setTimeout(() => { this.isPointerLocked = false; }, 800);
612
- }
613
-
614
- /**
615
- * Finds the index of a style card in the `resultStyles` array based on its ID.
616
- * @param {number|null} cardID - The ID of the style card to find.
617
- * @returns {number} The index of the card with the specified ID, or -1 if not found.
618
- */
619
- findIndexFromCardID(cardID) {
620
- return cardID != null ? this.resultStyles.findIndex(card => card.id == cardID) : -1;
621
- }
622
-
623
- /**
624
- * Returns the HTML element corresponding to the style card with the given ID.
625
- * @param {number|null} cardID - The ID of the style card whose corresponding element is sought.
626
- * @returns {Element|null} The HTML element associated with the given card ID, or null if no match is found.
627
- */
628
- elementFromCardID(cardID) {
629
- return cardID != null ? this.element.querySelector(`#zipn-style-${cardID}`) : null;
630
- }
631
-
632
- //-- DIALOG COMPONENTS ------------------------------------------------
633
-
634
- /** A spacer element in the toolbar. */
635
- static get SPACER() { return html("div.zipn-spacer"); }
636
-
637
- /** A divider element (vertical line) in the toolbar. */
638
- static get DIVIDER() { return html("div.zipn-divider"); }
639
-
640
- /**
641
- * A container for displaying detailed information about the hovered style.
642
- * @returns {HTMLElement} An HTML structure representing the details pane.
643
- */
644
- static get DETAILS_PANE() {
645
- return html(
646
- "div.zipn-details-pane", {}, [
647
- html("h1.zipn-details-header"),
648
- html("img"),
649
- html("p.zipn-details-description"),
650
- ]);
651
- }
652
-
653
- /**
654
- * A container for displaying the styles resulting from a search query.
655
- * @returns {HTMLElement} An HTML structure representing the search results pane.
656
- */
657
- static get SEARCH_RESULTS_PANE() {
658
- return html(
659
- "div.zipn-search-results-pane", { id: "zipn-search-results-pane" }, [
660
- html("div.zipn-style-grid", { id: "zipn-search-results" })
661
- ]);
662
- }
663
-
664
- /**
665
- * Creates a button for the toolbar.
666
- * @param {string} id - The unique identifier for the button.
667
- * @param {string} icon - The icon to be used in the button. e.g., "i.pi.pi-image"
668
- * @param {string} text - The text content of the button.
669
- * @param {string} tooltip - The title attribute value for the button, representing its tooltip.
670
- * @param {function} onClick - Function to be executed when the button is clicked.
671
- * @returns {HTMLElement} A button element with the specified icon, text, tooltip and onclick function.
672
- */
673
- createToolButton(id, icon, text, tooltip, onClick) {
674
- // if no ID is provided, generate a random one
675
- if( !id ) {
676
- do { id = 'zipn-btn-' + Math.random().toString(36).slice(2, 9); }
677
- while( document.getElementById(id) );
678
- }
679
- // if the icon ID is provided with spaces between words, convert them to dots
680
- if( icon ) {
681
- icon = icon.replace(' ', '.');
682
- }
683
- // generate the 3 possible types of buttons:
684
- // - button with icon only (no text)
685
- // - button with text only
686
- // - button with icon and text
687
- if( icon && !text ) {
688
- return html( "button.p-button-text", { id: id, title: tooltip, onclick: onClick }, [ html(`i.${icon}`) ] );
689
- }
690
- if( !icon && text ) {
691
- return html( "button.p-button-text", { id: id, title: tooltip, textContent: text, onclick: onClick }, [] );
692
- }
693
- return html("button.p-button-text", { id: id, title: tooltip, onclick: onClick }, [
694
- html(`i.${icon}`, { textContent: text})
695
- ]);
696
- }
697
-
698
- /**
699
- * Creates an input search bar for searching within the gallery dialog.
700
- * @returns {HTMLElement} An HTML structure representing a search bar.
701
- */
702
- createSearchBar() {
703
- return html("div", {}, [
704
- html("input.p-inputtext.p-component", { id: "zipn-search-input", type: "search", placeholder: "Search" }),
705
- StyleGalleryDialog.DIVIDER,
706
- this.createToolButton("zipn-all-btn" , '', "All" , "Search all styles" , () => { this.updateSearchResults("@"); }),
707
- this.createToolButton("zipn-photo-btn" , '', "Photo" , "Search only photographic styles", () => { this.updateSearchResults("@photo");}),
708
- this.createToolButton("zipn-illus-btn" , '', "Illustration", "Search only illustration styles", () => { this.updateSearchResults("@illustration"); }),
709
- this.createToolButton("zipn-wild-btn" , '', "Wild" , "Search only wild styles" , () => { this.updateSearchResults("@wild"); }),
710
- this.createToolButton("zipn-custom-btn", '', "Custom" , "Search only custom styles" , () => { this.updateSearchResults("@custom"); }),
711
- StyleGalleryDialog.DIVIDER,
712
- this.createToolButton("zipn-grid-btn", 'pi pi-image', "", "Grid View", () => { this.updateSearchResults("$grid"); }),
713
- this.createToolButton("zipn-list-btn", 'pi pi-list' , "", "List View", () => { this.updateSearchResults("$list"); }),
714
- StyleGalleryDialog.DIVIDER,
715
- ]);
716
- }
717
- }
718
-
719
-
720
- //#========================= Style Gallery Button ==========================#
721
-
722
- /**
723
- * Creates a button widget that when pressed opens the style gallery.
724
- * @param {LGraphNode} node - The node where the widget is added.
725
- * @param {string} inputName - The name of the input associated with this widget.
726
- * @returns {{widget: object}}
727
- * An object containing the created widget.
728
- */
729
- function createStyleGalleryButton( node, inputName ) {
730
-
731
- // split the inputName to extract any title variant
732
- // (title variant is the part of the input-name after the last underscore)
733
- const parts = inputName.split('_');
734
- let variant = parts.length>1 ? parts[ parts.length - 1 ] : "";
735
-
736
- // ensure the variant is a number
737
- if( variant.match(/^[0-9]+$/) === null ) { variant = ""; }
738
- const title = `Select Style${variant ? ' ' + variant : ""}`;
739
-
740
- // find the previous widget,
741
- // which should be a combo widget to receive the style selection
742
- const prevIndex = node.widgets.length - 1;
743
- const prevWidget = prevIndex>=0 ? node.widgets[prevIndex] : null;
744
- if( !prevWidget || prevWidget.type !== "combo" ) {
745
- console.error("Style Gallery Button must follow a Combo Widget!");
746
- return;
747
- }
748
-
749
- // add a custom button widget to the node
750
- const button = node.addCustomWidget({
751
- type : "button",
752
- name : inputName,
753
- label : `🖼️ ${title} ...`,
754
- serialize: true,
755
- });
756
-
757
- // the serialized value is always null, as it doesn't store a value itself.
758
- // (disable serialization may cause problems when saving and retrieving nodes)
759
- button.serializeValue = () => null;
760
-
761
- // when the button is pressed, launch the dialog
762
- button.callback = () => {
763
- StyleGalleryDialog.launch(title, prevWidget.value, (style) =>
764
- {
765
- // ensure the style name is properly quoted
766
- if( style!="" && style!="-" && style!="none" ) {
767
- if( !style.startsWith('"') ) { style = `"${style}"`; }
768
- }
769
- prevWidget.value = style;
770
- prevWidget.callback(style);
771
- node?.setDirtyCanvas?.(true);
772
- });
773
- };
774
- return { widget: button };
775
- }
776
-
777
-
778
- //#=========================================================================#
779
- //#////////////////////////// REGISTER EXTENSION ///////////////////////////#
780
- //#=========================================================================#
781
-
782
- app.registerExtension({
783
- name: "ZPowerNodesOLD.StyleGallery",
784
-
785
- /** Called when the extension is loaded */
786
- init() {
787
- if( !ENABLED ) return;
788
- console.log(`[${this.name}]: Extension loaded.`);
789
- },
790
-
791
- /** Called to register custom widgets */
792
- getCustomWidgets() {
793
- if( !ENABLED ) return {};
794
- return {
795
- "ZIPN_STYLE_GALLERY": createStyleGalleryButton,
796
- };
797
- },
798
-
799
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/jsconfig.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- /* File : jsconfig.json */
3
- /* Purpose: Provides IntelliSense and logical type-checking for VSCode */
4
-
5
-
6
- "compilerOptions": {
7
- "checkJs": true, /* Enable type-checking for JS files */
8
- "module": "ESNext", /* Use modern import/export module syntax */
9
- "moduleResolution": "Bundler", /* Resolve modules for Vite/Webpack/Rollup*/
10
- "target": "ES2020", /* Set language level for IntelliSense */
11
- "strict": true, /* Enable all strict type-checking rules */
12
- "strictNullChecks": true, /* Prevent errors on null/undefined values*/
13
- "strictFunctionTypes": true /* Ensure function parameters match types */
14
- },
15
- "exclude": [
16
- "node_modules", /* Skip indexing of Node.js dependencies */
17
- "**/node_modules/*" /* Ignore all nested Node.js library files*/
18
- ]
19
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
custom_nodes/z-power-nodes-old/nodes/__pycache__/empty_zimage_latent_image.cpython-313.pyc DELETED
Binary file (5.37 kB)
 
custom_nodes/z-power-nodes-old/nodes/__pycache__/my_top_10_styles.cpython-313.pyc DELETED
Binary file (5.64 kB)
 
custom_nodes/z-power-nodes-old/nodes/__pycache__/my_top_10_styles_editor.cpython-313.pyc DELETED
Binary file (6.93 kB)
 
custom_nodes/z-power-nodes-old/nodes/__pycache__/save_image.cpython-313.pyc DELETED
Binary file (21.5 kB)
 
custom_nodes/z-power-nodes-old/nodes/__pycache__/server.cpython-313.pyc DELETED
Binary file (6.71 kB)
 
custom_nodes/z-power-nodes-old/nodes/__pycache__/style_prompt_encoder_2.cpython-313.pyc DELETED
Binary file (6.09 kB)
 
custom_nodes/z-power-nodes-old/nodes/__pycache__/style_string_injector_2.cpython-313.pyc DELETED
Binary file (4.27 kB)