build(core): init
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
name: Publish to Comfy registry
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "pyproject.toml"
|
||||
|
||||
jobs:
|
||||
publish-node:
|
||||
name: Publish Custom Node to registry
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
- name: Publish Custom Node
|
||||
uses: Comfy-Org/publish-node-action@main
|
||||
with:
|
||||
## Add your own personal access token to your Github Repository secrets and reference it here.
|
||||
personal_access_token: ${{ secrets.COMFY_REGISTRY_TOKEN }}
|
||||
@@ -0,0 +1,2 @@
|
||||
models
|
||||
__pycache__
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 ymc-github <ymc.github@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,55 @@
|
||||
<div align="center">
|
||||
<h1>ymc-node-as-x-type</h1>
|
||||
<p>
|
||||
<strong>🤖 some comfyui custom nodes to set it as known type.</strong>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
## Features
|
||||
|
||||
- feat(core): node to set it as any type
|
||||
- feat(core): node to set it as image type
|
||||
- feat(core): node to set it as model type
|
||||
- feat(core): node to set it as clip type
|
||||
- feat(core): node to set it as vae type
|
||||
- feat(core): node to set it as conditioning type
|
||||
- feat(core): node to set it as latent type
|
||||
- feat(core): node to set it as string type
|
||||
- feat(core): node to set it as int type
|
||||
- feat(core): node to set it as float type
|
||||
- feat(core): node to set it as number type
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
# cd to comfyui/custom_nodes
|
||||
git clone https://github.com/ymc-github/ymc-node-as-x-type
|
||||
```
|
||||
|
||||
- **deps will be installed automatically** if requirements in requirements.txtnot installed when comfyui up
|
||||
|
||||
## Usage
|
||||
|
||||
- you can find it in search box : double click + typing `set it as`
|
||||
- you can find it in right mouse menu : `YMC/LINK`
|
||||
- you can find it in right mouse menu : `YMC/as_x_type` (as alias)
|
||||
|
||||
## Based-on
|
||||
|
||||
- pypi package [yors_comfyui_node_setup](https://pypi.org/project/yors_comfyui_node_setup/)
|
||||
- pypi package [yors_comfyui_node_as_x_type](https://pypi.org/project/yors_comfyui_node_as_x_type/)
|
||||
|
||||
## Published to Comfy registry
|
||||
|
||||
- get more details in [publish_to_comfy.yml](.github/workflows/publish_to_comfy.yml)
|
||||
|
||||
- [docs for publishing to comfy registey](https://docs.comfy.org/registry/overview)
|
||||
|
||||
## Author
|
||||
|
||||
ymc-github <ymc.github@gmail.com>
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
# v1
|
||||
# from yors_comfyui_node_setup import entry,node_install_requirements # global
|
||||
|
||||
# # install requirements
|
||||
# node_install_requirements(__file__)
|
||||
|
||||
# # export comfyui node vars
|
||||
# __all__,NODE_CLASS_MAPPINGS,NODE_DISPLAY_NAME_MAPPINGS,NODE_MENU_NAMES = entry(__name__,__file__)
|
||||
|
||||
# v2
|
||||
from yors_comfyui_node_setup import node_install_requirements,entry_pre_import,entry_import,get_all_classs_in_sys,register_node_list_local
|
||||
|
||||
# install requirements
|
||||
node_install_requirements(__file__)
|
||||
|
||||
# gen __all__
|
||||
__all__ = entry_pre_import(__name__,__file__)
|
||||
|
||||
# import moudle with __all__
|
||||
entry_import(__name__,__all__)
|
||||
|
||||
# get class after importing moudle with __all__
|
||||
this_module_all_classes = get_all_classs_in_sys(__name__)
|
||||
|
||||
# register node with default category
|
||||
# NODE_CLASS_MAPPINGS,NODE_DISPLAY_NAME_MAPPINGS,NODE_MENU_NAMES = register_node_list(this_module_all_classes,False)
|
||||
|
||||
# addtional register node with custom category
|
||||
NODE_CLASS_MAPPINGS,NODE_DISPLAY_NAME_MAPPINGS,NODE_MENU_NAMES = register_node_list_local(this_module_all_classes,True,"YMC/as_x_type")
|
||||
# print(NODE_CLASS_MAPPINGS,NODE_DISPLAY_NAME_MAPPINGS,NODE_MENU_NAMES)
|
||||
print("\n".join(NODE_MENU_NAMES))
|
||||
@@ -0,0 +1,21 @@
|
||||
# 1. define yors comfyui nodes here
|
||||
# ...
|
||||
|
||||
# ucase 1.1:
|
||||
from yors_comfyui_node_as_x_type import * # import all yors comfyui nodes from it
|
||||
|
||||
# ucase 1.2:
|
||||
# from yors_comfyui_node_as_x_type import NodeSetItAsImage # import some yors comfyui nodes from it
|
||||
|
||||
|
||||
# 2. reset yors comfyui nodes category (it will be used set rmb in yors_comfyui_node_setup)
|
||||
# from yors_comfyui_node_reset_rmb import reset_rmb
|
||||
# reset_rmb(__name__,"YMC/as_x_type") // danger!
|
||||
|
||||
# 3. set nodes category alias
|
||||
# to set the right mouse menu as your likes.
|
||||
|
||||
import yors_comfyui_node_as_x_type as base
|
||||
from yors_comfyui_node_setup import get_sys_module,set_node_class_category_alias
|
||||
this_py_module = get_sys_module(__name__)
|
||||
set_node_class_category_alias(base,this_py_module,"YMC/as_x_type",True)
|
||||
@@ -0,0 +1,14 @@
|
||||
[project]
|
||||
name = "ymc-node-as-x-type"
|
||||
description = "some comfyui custom nodes to set it as known type"
|
||||
version = "0.1.0"
|
||||
license = "LICENSE"
|
||||
|
||||
[project.urls]
|
||||
Repository = "https://github.com/ymc-github/ymc-node-as-x-type"
|
||||
# Used by Comfy Registry https://comfyregistry.org
|
||||
|
||||
[tool.comfy]
|
||||
PublisherId = "ymc-github"
|
||||
DisplayName = "ymc-node-as-x-type"
|
||||
Icon = ""
|
||||
@@ -0,0 +1,2 @@
|
||||
yors_comfyui_node_setup
|
||||
yors_comfyui_node_as_x_type
|
||||
Reference in New Issue
Block a user