yors_pano_action_handle
🤖 A python library to set comfyui custom nodes action easily for developers in development.
to set comfyui custom nodes action for developers in development:
- set action for some filed in node input easily
- detect if node is enbale easily
Why
- set your comfyui nodes action easily.
- share commom code in each node.
1 - install python package
pip install yors_pano_action_handle
2 - use it in your python code
-
in some comfyui custom nodes project or module
-
code in your
node_xx.py
from yors_pano_action_handle import node_action_values,action_is_enable,any_type
CURRENT_CATEGORY="ymc/link"
CURRENT_FUNCTION="exec"
# feat(core): node to set it as any type
class NodeSetItAsAny:
@classmethod
def INPUT_TYPES(s):
return {
"required": {
},
"optional":{
"a": (any_type)
},
# "hidden": {
# "unique_id": "UNIQUE_ID",
# "extra_pnginfo": "EXTRA_PNGINFO",
# },
}
# INPUT_IS_LIST = True
RETURN_TYPES = (any_type,)
RETURN_NAMES = ("a")
FUNCTION = CURRENT_FUNCTION
CATEGORY = CURRENT_CATEGORY
NODE_NAME = "as any"
NODE_DESC = "set it as any type"
# OUTPUT_NODE = True
# OUTPUT_IS_LIST = (True,)
def exec(s, **kwargs):
# load config from dict with name cnf
a = kwargs.get("a")
return (a,)
class NodeTextUpper:
@classmethod
def INPUT_TYPES(s):
return {
"required": {
},
"optional":{
"text": ("STRING", {"default": ""}),
"cmd_action": node_action_values,
},
# "hidden": {
# "unique_id": "UNIQUE_ID",
# "extra_pnginfo": "EXTRA_PNGINFO",
# },
}
# INPUT_IS_LIST = True
RETURN_TYPES = ("STRING","BOOL")
RETURN_NAMES = ("text","status")
FUNCTION = CURRENT_FUNCTION
CATEGORY = CURRENT_CATEGORY
NODE_NAME = "upper case"
NODE_DESC = "transform text to upper case"
# OUTPUT_NODE = True
# OUTPUT_IS_LIST = (True,)
def exec(s, **kwargs):
# load config from dict with name cnf
text = kwargs.get("text")
cmd_action = kwargs.get("cmd_action")
if action_is_enable(cmd_action) == False or cmd in ["",None]:
return (text.upper(), False)
return (text,True)
the dirs of your comfyui nodes repo
.
│ .gitignore
│ LICENSE
│ nodes.py
│ requirements.txt
│ __init__.py
└─link # some nodes to link nodes
__init__.py
xx.py
...
└─utils # some nodes for util process
__init__.py
xx.py
...
└─image # some nodes for image process
__init__.py
xx.py
...
Author
ymc-github ymc.github@gmail.com
License
MIT
Metadata
Release files for yors_pano_action_handle 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| yors_pano_action_handle-0.1.0.tar.gz | 2.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yors_pano_action_handle-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.2 kB
Release files / yors_pano_action_handle-0.1.0.tar.gz
| Download URL | yors_pano_action_handle-0.1.0.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3388f0e255aecd2c9df2412918e06de9dc4092b25358f93b165943a0e1a12dc6
|
|
BLAKE2b-256 checksum How to use checksums |
371286462ac33359904322fcb55463c02e7c316341c95c5d450a2b9e8b870f9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.10.6 Windows/10
|
Release files / yors_pano_action_handle-0.1.0-py3-none-any.whl
| Download URL | yors_pano_action_handle-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5eea9aee2099d7e7b0bdef87ecdc90bee4b82a90ffcd6e2ed2344595124dcefc
|
|
BLAKE2b-256 checksum How to use checksums |
aa280357110b4845e8bfc50f5d4bcc86f68ef42031dfaf42cef10e3f8111ac59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.10.6 Windows/10
|