27 Commits
Author SHA1 Message Date
Crystian 91b249cc82 Update README.md 2025-08-17 14:29:48 +02:00
Crystian b63c33ec0c console logs removed 2025-06-01 22:17:24 +02:00
Crystian c7913ae331 deprectaed 2025-06-01 22:08:01 +02:00
Crystian f73b704955 deprecated! 2025-06-01 22:00:25 +02:00
Crystian f5b3dbbb28 Merge pull request #6 from ComfyNodePRs/update-publish-yaml
Update Github Action for Publishing to Comfy Registry
2025-06-01 21:36:50 +02:00
snomiao 134d49ab56 chore(publish): update GitHub Actions workflow for node publishing with conditional execution and permissions adjustments 2025-01-25 04:53:54 +00:00
Crystian dfa85a3d08 visual fixes 2024-09-25 01:39:00 +02:00
Crystian 0f61271f66 update to crystools and horizontal ui 2024-09-23 16:18:29 +02:00
Crystian 9aca152235 new menu on settings 2024-09-21 14:54:31 +02:00
Crystian 29e1597acd Merge pull request #5 from ComfyNodePRs/licence-update
Update PyProject Toml - License
2024-07-31 22:06:26 +02:00
snomiao d7aa366338 chore(licence-update): Update PyProject Toml - License 2024-07-31 18:03:35 +00:00
Crystian e9fbea244e test of comfy org 2024-07-01 03:19:32 +02:00
Crystian 624ef9e9e2 test 2024-07-01 02:34:21 +02:00
Crystian 9e54d0fb2b test 2024-07-01 02:33:48 +02:00
Crystian 37059b31fe test of comfy.org hook 2024-07-01 02:29:32 +02:00
Crystian 49694e0aa6 test of comfy.org hook 2024-07-01 02:21:33 +02:00
Crystian 06d076fe1c comfyui org files added 2024-07-01 02:11:22 +02:00
Crystian ad643e21cc Merge pull request #4 from haohaocreates/pyproject
Add pyproject.toml for Custom Node Registry
2024-07-01 02:06:48 +02:00
Crystian 8c2978f51a Merge pull request #3 from haohaocreates/publish
Add Github Action for Publishing to Comfy Registry
2024-07-01 02:03:16 +02:00
haohaocreates 54a171db29 chore(pyproject): Add pyproject.toml for Custom Node Registry 2024-05-22 18:20:10 -04:00
haohaocreates 4a0fbba606 chore(publish): Add Github Action for Publishing to Comfy Registry 2024-05-22 18:20:07 -04:00
Crystian 5de5c44b94 console log removed 2024-01-28 15:37:51 +01:00
Crystian 1723a76eac fix for rerouter with primitives on load (the value was "undefined") 2024-01-19 20:48:17 +01:00
Crystian 7064725cd0 fix primitive values lost 2024-01-18 22:35:10 +01:00
Crystian 63bb685f0c Standardized names. 2024-01-15 22:47:39 +01:00
Crystian 68e41f7c02 fix issue #10 (inputs widgets reappear)
https://github.com/crystian/ComfyUI-Crystools/issues/10
2024-01-09 23:16:50 +01:00
Crystian 65bdafe91a fix new issue from comfyui update 2024-01-09 00:53:04 +01:00
12 changed files with 193 additions and 68 deletions
+25
View File
@@ -0,0 +1,25 @@
name: Publish to Comfy registry
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "pyproject.toml"
permissions:
issues: write
jobs:
publish-node:
name: Publish Custom Node to registry
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'crystian' }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Publish Custom Node
uses: Comfy-Org/publish-node-action@v1
with:
## Add your own personal access token to your Github Repository secrets and reference it here.
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
+1
View File
@@ -153,3 +153,4 @@ cython_debug/
*.pyc
.idea
/node.zip
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
python .others/version.py
git add __init__.py
git add __init__.py pyproject.toml version
exit 0
+21
View File
@@ -31,3 +31,24 @@ if not file1VersionFound:
with open(file1, "w") as f2:
f2.writelines(lines)
# modify pyproject.toml file with @version
file3 = os.path.join(os.path.dirname(__file__), "../pyproject.toml")
print(f"> File3: {file3}")
file3VersionFound = False
# lines = None
with open(file3, "r") as f:
lines = f.readlines()
for line in lines:
if "version = " in line:
file3VersionFound = True
lines[lines.index(line)] = f"version = \"{version}\"\n"
if not file3VersionFound:
raise RuntimeError(f"Version label not found in file: {file3}")
with open(file3, "w") as f3:
f3.writelines(lines)
+1 -1
View File
@@ -1,4 +1,4 @@
# ComfyUI-Crystools-save [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fcrystian%2FComfyUI-Crystools-save&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false)](https://hits.seeyoufarm.com) [![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/crystian77)
[deprecated] # ComfyUI-Crystools-save [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fcrystian%2FComfyUI-Crystools-save&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false)](https://hits.seeyoufarm.com) [![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/crystian77)
🪛 **_You can save your workflows with a particular file name (finally!), and save author info as metadata_** 🪛
+1 -1
View File
@@ -2,7 +2,7 @@
@author: Crystian
@title: Crystools-save
@nickname: Crystools-save
@version: 1.1.0
@version: 1.4.2
@project: "https://github.com/crystian/ComfyUI-Crystools-save",
@description: With this quality of life extension, you can save your workflow with a specific name and include additional details such as the author, a description, and the version (in metadata/json) IG: https://www.instagram.com/crystian.ia
"""
+14
View File
@@ -0,0 +1,14 @@
[project]
name = "comfyui-crystools-save"
description = "[Deprecated in favor of the new saving system] With this quality of life extension, you can save your workflow with a specific name and include additional details such as the author, a description, and the version (in metadata/json). Important: When you share your workflow (via png/json), others will be able to see your information!"
version = "1.4.2"
license = { file = "LICENSE" }
[project.urls]
Repository = "https://github.com/crystian/ComfyUI-Crystools-save"
# Used by Comfy Registry https://comfyregistry.org
[tool.comfy]
PublisherId = "crystian"
DisplayName = "ComfyUI-Crystools-save"
Icon = "https://raw.githubusercontent.com/crystian/ComfyUI-Crystools/main/docs/screwdriver.png"
+1 -1
View File
@@ -1 +1 @@
1.1.0
1.4.2
+19
View File
@@ -0,0 +1,19 @@
export const commonPrefix = '🪛';
export function injectCss(href) {
if (document.querySelector(`link[href^='${href}']`)) {
return Promise.resolve();
}
return new Promise((resolve) => {
const link = document.createElement('link');
link.setAttribute('rel', 'stylesheet');
link.setAttribute('type', 'text/css');
const timeout = setTimeout(resolve, 1000);
link.addEventListener('load', (_e) => {
clearInterval(timeout);
resolve();
});
link.href = href;
document.head.appendChild(link);
});
}
-1
View File
@@ -1 +0,0 @@
export const commonPrefix = '🪛';
+32
View File
@@ -0,0 +1,32 @@
.comfy-menu #crystools-root {
/*background-color: red;*/
display: flex;
width: 100%;
flex-direction: column;
#crystools-project-input-container{
margin: 6px;
width: 100%;
order: 5;
input{
width: 80%;
}
}
}
.comfyui-menu #crystools-root {
/*background-color: red;*/
/*display: flex;*/
/*min-width: 300px;*/
#crystools-project-input-container{
margin: 6px;
/*width: 100%;*/
order: 5;
input{
width: 80px;
}
}
}
+77 -63
View File
@@ -1,7 +1,10 @@
import { app } from '../../../scripts/app.js';
import { $el } from '../../../scripts/ui.js';
import { commonPrefix } from './common.js';
import { app } from '../../scripts/app.js';
import { $el } from '../../scripts/ui.js';
import { commonPrefix, injectCss } from './common.js';
injectCss('extensions/ComfyUI-Crystools-save/save.css').then(() => {
// console.log('injectCss');
});
class CrystoolsSave {
// common variables
@@ -37,49 +40,23 @@ class CrystoolsSave {
createSettings = () => {
/** Form on settings: (the order is important) */
// show the input on menu
// version
app.ui.settings.addSetting({
id: this.idProjectNameShow,
name: this.menuPrefix + 'Show project name [menu]',
type: 'boolean',
defaultValue: this.defaultProjectNameShow,
onChange: this.showProjectName,
});
// use new save button
app.ui.settings.addSetting({
id: this.idNewSave,
name: this.menuPrefix + 'New save button (requires page reload) [save]',
type: 'boolean',
tooltip: 'This will replace the save button function and propose the name of project as filename!',
defaultValue: this.defaultNewSave,
onChange: this.saveFunctionSwitch,
});
// project name
app.ui.settings.addSetting({
id: this.idProjectNameText,
name: this.menuPrefix + 'Project name [save]',
id: this.idVersion,
name: 'Version',
category: ['Crystools', this.menuPrefix + ' [Deprecated] Save', 'version' ],
type: 'text',
defaultValue: this.defaultProjectNameText,
onChange: this.updateProjectName,
});
// author
app.ui.settings.addSetting({
id: this.idAuthor,
name: this.menuPrefix + 'Author [save]',
type: 'text',
defaultValue: this.defaultAuthor,
defaultValue: this.defaultVersion,
onChange: (value) => {
this.updateInfoOnGraph({author: value});
this.updateInfoOnGraph({version: value});
},
});
// description
app.ui.settings.addSetting({
id: this.idDescription,
name: this.menuPrefix + 'Description [save]',
name: 'Description',
category: ['Crystools', this.menuPrefix + ' [Deprecated] Save', 'desc' ],
type: 'text',
defaultValue: this.defaultDescription,
onChange: (value) => {
@@ -87,29 +64,72 @@ class CrystoolsSave {
},
});
// version
// author
app.ui.settings.addSetting({
id: this.idVersion,
name: this.menuPrefix + 'Version [save]',
id: this.idAuthor,
name: 'Author',
category: ['Crystools', this.menuPrefix + ' [Deprecated] Save', 'author' ],
type: 'text',
defaultValue: this.defaultVersion,
defaultValue: this.defaultAuthor,
onChange: (value) => {
this.updateInfoOnGraph({version: value});
this.updateInfoOnGraph({author: value});
},
});
// project name
app.ui.settings.addSetting({
id: this.idProjectNameText,
name: 'Project name',
category: ['Crystools', this.menuPrefix + ' [Deprecated] Save', 'name' ],
type: 'text',
defaultValue: this.defaultProjectNameText,
onChange: this.updateProjectName,
});
// use new save button
app.ui.settings.addSetting({
id: this.idNewSave,
name: 'New save button',
category: ['Crystools', this.menuPrefix + ' [Deprecated] Save', 'new button' ],
type: 'boolean',
tooltip: 'This will replace the save button function and propose the name of project as filename! (requires page reload)',
defaultValue: this.defaultNewSave,
onChange: this.saveFunctionSwitch,
});
// show the input on menu
app.ui.settings.addSetting({
id: this.idProjectNameShow,
name: 'Show project name on menu',
category: ['Crystools', this.menuPrefix + ' [Deprecated] Save', 'menu' ],
type: 'boolean',
defaultValue: this.defaultProjectNameShow,
onChange: this.showProjectName,
});
};
setup() {
app.graph.onConfigure = (a) => {
// save the original onConfigure event
const onConfigure = app.graph.onConfigure;
app.graph.onConfigure = () => {
// when load a workflow from file pass here!
// on drops a file on the canvas
this.getInfoOnGraph().then((p) => {
onConfigure?.bind(this); // recall the original event
if (!p.workflow.extra.info) {
p.workflow.extra.info = {};
}
// this is a hack to wait the rerouters nodes created
setTimeout(() => {
this.getInfoOnGraph().then((p) => {
if (!p.workflow.extra.info) {
p.workflow.extra.info = {
name: this.defaultProjectNameText,
};
}
this.setInfoOnGraph(p.workflow.extra.info);
});
app.ui.settings.setSettingValue(this.idProjectNameText, p.workflow.extra.info.name);
this.setInfoOnGraph(p.workflow.extra.info);
});
}, 100);
};
const parentElement = document.getElementById('queue-button');
@@ -118,28 +138,21 @@ class CrystoolsSave {
if(!ctoolsRoot){
ctoolsRoot = document.createElement('div');
ctoolsRoot.setAttribute('id', this.htmlIdCrystoolsRoot);
ctoolsRoot.style.display = 'flex';
ctoolsRoot.style.width = '100%';
ctoolsRoot.style.flexDirection = 'column';
parentElement.insertAdjacentElement('afterend', ctoolsRoot);
}
const htmlContainer = document.createElement('div');
htmlContainer.setAttribute('id', this.htmlIdCrystoolsInputContainer);
htmlContainer.style.margin = '6px 0';
htmlContainer.style.width = '100%';
htmlContainer.style.order = '5';
ctoolsRoot.append(htmlContainer);
const projectNameInput = document.createElement('input');
projectNameInput.setAttribute('placeholder', 'Project name');
projectNameInput.style.width = '80%';
htmlContainer.append(projectNameInput);
this.inputRefProjectNameText = projectNameInput;
// events for the input to persist the data on workflow
projectNameInput.addEventListener('keyup', (event) => {
this.updateProjectName(event.target.value);
app.ui.settings.setSettingValue(this.idProjectNameText, event.target.value);
});
// this boolean does not save the value on workflow
@@ -166,21 +179,20 @@ class CrystoolsSave {
// just persist the data on workflow reference
setInfoOnGraph = (values) => {
// create the info object if not exists on workflow
let name = values?.name || this.defaultProjectNameText;
app.ui.settings.setSettingValue(this.idProjectNameText, name);
// app.ui.settings.setSettingValue(this.idProjectNameText, name);
values.name = name;
let author = values?.author || this.defaultAuthor;
app.ui.settings.setSettingValue(this.idAuthor, author);
// app.ui.settings.setSettingValue(this.idAuthor, author);
values.author = author;
let description = values?.description || this.defaultDescription;
app.ui.settings.setSettingValue(this.idDescription, description);
// app.ui.settings.setSettingValue(this.idDescription, description);
values.description = description;
let version = values?.version || this.defaultVersion;
app.ui.settings.setSettingValue(this.idVersion, version);
// app.ui.settings.setSettingValue(this.idVersion, version);
values.version = version;
if (!(values?.created)) {
@@ -219,7 +231,9 @@ class CrystoolsSave {
if (!p.workflow.extra.info) {
p.workflow.extra.info = {};
}
this.setInfoOnGraph(Object.assign(p.workflow.extra.info, {name: value}));
const finalValue = Object.assign(p.workflow.extra.info, {name: value});
// console.log(finalValue);
this.setInfoOnGraph(finalValue);
});
}
};