Merge branch 'main' into dev
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
@author: Crystian
|
||||
@title: Crystools
|
||||
@nickname: Crystools
|
||||
@version: 1.9.2
|
||||
@version: 1.9.3
|
||||
@project: "https://github.com/crystian/ComfyUI-Crystools",
|
||||
@description: Plugins for multiples uses, mainly for debugging, you need them! IG: https://www.instagram.com/crystian.ia
|
||||
"""
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
version = "1.9.2"
|
||||
version = "1.9.3"
|
||||
|
||||
+26
-26
@@ -1,67 +1,67 @@
|
||||
from enum import Enum
|
||||
|
||||
postfix = ' 🪛'
|
||||
prefix = '🪛 '
|
||||
|
||||
# IMPORTANT DON'T CHANGE THE 'NAME' AND 'TYPE' OF THE ENUMS, IT WILL BREAK THE COMPATIBILITY!
|
||||
# remember: NAME is for search, DESC is for contextual
|
||||
class CLASSES(Enum):
|
||||
CBOOLEAN_NAME = 'Primitive boolean [Crystools]'
|
||||
CBOOLEAN_DESC = 'Primitive boolean' + postfix
|
||||
CBOOLEAN_DESC = prefix + 'Primitive boolean'
|
||||
CTEXT_NAME = 'Primitive string [Crystools]'
|
||||
CTEXT_DESC = 'Primitive string' + postfix
|
||||
CTEXT_DESC = prefix + 'Primitive string'
|
||||
CTEXTML_NAME = 'Primitive string multiline [Crystools]'
|
||||
CTEXTML_DESC = 'Primitive string multiline' + postfix
|
||||
CTEXTML_DESC = prefix + 'Primitive string multiline'
|
||||
CINTEGER_NAME = 'Primitive integer [Crystools]'
|
||||
CINTEGER_DESC = 'Primitive integer' + postfix
|
||||
CINTEGER_DESC = prefix + 'Primitive integer'
|
||||
CFLOAT_NAME = 'Primitive float [Crystools]'
|
||||
CFLOAT_DESC = 'Primitive float' + postfix
|
||||
CFLOAT_DESC = prefix + 'Primitive float'
|
||||
|
||||
CDEBUGGER_CONSOLE_ANY_NAME = 'Show any [Crystools]'
|
||||
CDEBUGGER_ANY_DESC = 'Show any value to console/display' + postfix
|
||||
CDEBUGGER_ANY_DESC = prefix + 'Show any value to console/display'
|
||||
CDEBUGGER_CONSOLE_ANY_TO_JSON_NAME = 'Show any to JSON [Crystools]'
|
||||
CDEBUGGER_CONSOLE_ANY_TO_JSON_DESC = 'Show any to JSON' + postfix
|
||||
CDEBUGGER_CONSOLE_ANY_TO_JSON_DESC = prefix + 'Show any to JSON'
|
||||
|
||||
CLIST_ANY_TYPE = 'ListAny'
|
||||
CLIST_ANY_NAME = 'List of any [Crystools]'
|
||||
CLIST_ANY_DESC = 'List of any' + postfix
|
||||
CLIST_ANY_DESC = prefix + 'List of any'
|
||||
CLIST_STRING_TYPE = 'ListString'
|
||||
CLIST_STRING_NAME = 'List of strings [Crystools]'
|
||||
CLIST_STRING_DESC = 'List of strings' + postfix
|
||||
CLIST_STRING_DESC = prefix + 'List of strings'
|
||||
|
||||
CSWITCH_ANY_NAME = 'Switch any [Crystools]'
|
||||
CSWITCH_ANY_DESC = 'Switch any' + postfix
|
||||
CSWITCH_ANY_DESC = prefix + 'Switch any'
|
||||
CSWITCH_STRING_NAME = 'Switch string [Crystools]'
|
||||
CSWITCH_STRING_DESC = 'Switch string' + postfix
|
||||
CSWITCH_STRING_DESC = prefix + 'Switch string'
|
||||
CSWITCH_CONDITIONING_NAME = 'Switch conditioning [Crystools]'
|
||||
CSWITCH_CONDITIONING_DESC = 'Switch conditioning' + postfix
|
||||
CSWITCH_CONDITIONING_DESC = prefix + 'Switch conditioning'
|
||||
CSWITCH_IMAGE_NAME = 'Switch image [Crystools]'
|
||||
CSWITCH_IMAGE_DESC = 'Switch image' + postfix
|
||||
CSWITCH_IMAGE_DESC = prefix + 'Switch image'
|
||||
CSWITCH_LATENT_NAME = 'Switch latent [Crystools]'
|
||||
CSWITCH_LATENT_DESC = 'Switch latent' + postfix
|
||||
CSWITCH_LATENT_DESC = prefix + 'Switch latent'
|
||||
|
||||
CPIPE_ANY_TYPE = 'CPipeAny'
|
||||
CPIPE_TO_ANY_NAME = 'Pipe to/edit any [Crystools]'
|
||||
CPIPE_TO_ANY_DESC = 'Pipe to/edit any' + postfix
|
||||
CPIPE_TO_ANY_DESC = prefix + 'Pipe to/edit any'
|
||||
CPIPE_FROM_ANY_NAME = 'Pipe from any [Crystools]'
|
||||
CPIPE_FROM_ANY_DESC = 'Pipe from any' + postfix
|
||||
CPIPE_FROM_ANY_DESC = prefix + 'Pipe from any'
|
||||
|
||||
CIMAGE_LOAD_METADATA_NAME = 'Load image with metadata [Crystools]'
|
||||
CIMAGE_LOAD_METADATA_DESC = 'Load image with metadata' + postfix
|
||||
CIMAGE_LOAD_METADATA_DESC = prefix + 'Load image with metadata'
|
||||
CIMAGE_GET_RESOLUTION_NAME = 'Get resolution [Crystools]'
|
||||
CIMAGE_GET_RESOLUTION_DESC = 'Get resolution' + postfix
|
||||
CIMAGE_GET_RESOLUTION_DESC = prefix + 'Get resolution'
|
||||
CIMAGE_PREVIEW_IMAGE_NAME = 'Preview from image [Crystools]'
|
||||
CIMAGE_PREVIEW_IMAGE_DESC = 'Preview from image' + postfix
|
||||
CIMAGE_PREVIEW_IMAGE_DESC = prefix + 'Preview from image'
|
||||
CIMAGE_PREVIEW_METADATA_NAME = 'Preview from metadata [Crystools]'
|
||||
CIMAGE_PREVIEW_METADATA_DESC = 'Preview from metadata' + postfix
|
||||
CIMAGE_PREVIEW_METADATA_DESC = prefix + 'Preview from metadata'
|
||||
CIMAGE_SAVE_METADATA_NAME = 'Save image with extra metadata [Crystools]'
|
||||
CIMAGE_SAVE_METADATA_DESC = 'Save image with extra metadata' + postfix
|
||||
CIMAGE_SAVE_METADATA_DESC = prefix + 'Save image with extra metadata'
|
||||
|
||||
CMETADATA_EXTRACTOR_NAME = 'Metadata extractor [Crystools]'
|
||||
CMETADATA_EXTRACTOR_DESC = 'Metadata extractor' + postfix
|
||||
CMETADATA_EXTRACTOR_DESC = prefix + 'Metadata extractor'
|
||||
CMETADATA_COMPARATOR_NAME = 'Metadata comparator [Crystools]'
|
||||
CMETADATA_COMPARATOR_DESC = 'Metadata comparator' + postfix
|
||||
CMETADATA_COMPARATOR_DESC = prefix + 'Metadata comparator'
|
||||
|
||||
CUTILS_JSON_COMPARATOR_NAME = 'Json comparator [Crystools]'
|
||||
CUTILS_JSON_COMPARATOR_DESC = 'Json comparator' + postfix
|
||||
CUTILS_JSON_COMPARATOR_DESC = prefix + 'Json comparator'
|
||||
CUTILS_STAT_SYSTEM_NAME = 'Stats system [Crystools]'
|
||||
CUTILS_STAT_SYSTEM_DESC = 'Stats system (powered by WAS)' + postfix
|
||||
CUTILS_STAT_SYSTEM_DESC = prefix + 'Stats system (powered by WAS)'
|
||||
|
||||
+2
-1
@@ -15,7 +15,7 @@ app.registerExtension({
|
||||
registerCustomNodes() {
|
||||
class MetadataNode extends TLGraphNode {
|
||||
constructor() {
|
||||
super(`Show Metadata ${commonPrefix}`);
|
||||
super(`${commonPrefix} Show Metadata `);
|
||||
Object.defineProperty(this, "fillMetadataWidget", {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
@@ -82,5 +82,6 @@ app.registerExtension({
|
||||
LiteGraph.registerNodeType('Show Metadata [Crystools]', MetadataNode);
|
||||
MetadataNode.category = `crystools ${commonPrefix}/Debugger`;
|
||||
MetadataNode.shape = LiteGraph.BOX_SHAPE;
|
||||
MetadataNode.title = `${commonPrefix} Show Metadata`;
|
||||
},
|
||||
});
|
||||
|
||||
+2
-1
@@ -20,7 +20,7 @@ app.registerExtension({
|
||||
registerCustomNodes() {
|
||||
class MetadataNode extends TLGraphNode {
|
||||
constructor() {
|
||||
super(`Show Metadata ${commonPrefix}`);
|
||||
super(`${commonPrefix} Show Metadata `);
|
||||
this.serialize_widgets = false;
|
||||
this.isVirtualNode = true;
|
||||
|
||||
@@ -88,6 +88,7 @@ app.registerExtension({
|
||||
LiteGraph.registerNodeType('Show Metadata [Crystools]', MetadataNode);
|
||||
MetadataNode.category = `crystools ${commonPrefix}/Debugger`;
|
||||
MetadataNode.shape = LiteGraph.BOX_SHAPE;
|
||||
MetadataNode.title = `${commonPrefix} Show Metadata`;
|
||||
// MetadataNode.collapsable = false;
|
||||
// MetadataNode.color = '#FF2222';
|
||||
// MetadataNode.bgcolor = '#000000';
|
||||
|
||||
+9
-9
@@ -57,7 +57,7 @@ class CrystoolsMonitor {
|
||||
writable: true,
|
||||
value: {
|
||||
id: 'Crystools.switchCPU',
|
||||
name: this.menuPrefix + '[menu] Display CPU monitor',
|
||||
name: this.menuPrefix + ' [monitor] CPU Usage',
|
||||
type: 'boolean',
|
||||
label: 'CPU',
|
||||
defaultValue: true,
|
||||
@@ -79,7 +79,7 @@ class CrystoolsMonitor {
|
||||
writable: true,
|
||||
value: {
|
||||
id: 'Crystools.switchRAM',
|
||||
name: this.menuPrefix + '[menu] Display RAM monitor',
|
||||
name: this.menuPrefix + ' [monitor] RAM Used',
|
||||
type: 'boolean',
|
||||
label: 'RAM',
|
||||
defaultValue: true,
|
||||
@@ -101,10 +101,10 @@ class CrystoolsMonitor {
|
||||
writable: true,
|
||||
value: {
|
||||
id: 'Crystools.switchHDD',
|
||||
name: this.menuPrefix + '[menu] Display partition disk monitor (HDD)',
|
||||
name: this.menuPrefix + ' [monitor] HDD Used',
|
||||
type: 'boolean',
|
||||
label: 'HDD',
|
||||
tooltip: `Drive: ${app.ui.settings.getSettingValue(this.idWhichHDD, this.defaultWhichHDD)}`,
|
||||
tooltip: 'See Partition to show (HDD)',
|
||||
defaultValue: true,
|
||||
htmlMonitorRef: undefined,
|
||||
htmlMonitorSliderRef: undefined,
|
||||
@@ -124,7 +124,7 @@ class CrystoolsMonitor {
|
||||
writable: true,
|
||||
value: {
|
||||
id: 'Crystools.switchGPU',
|
||||
name: this.menuPrefix + '[menu] Display GPU monitor',
|
||||
name: this.menuPrefix + ' [monitor] GPU Usage',
|
||||
type: 'boolean',
|
||||
label: 'GPU',
|
||||
defaultValue: true,
|
||||
@@ -146,7 +146,7 @@ class CrystoolsMonitor {
|
||||
writable: true,
|
||||
value: {
|
||||
id: 'Crystools.switchVRAM',
|
||||
name: this.menuPrefix + '[menu] Display Video RAM monitor',
|
||||
name: this.menuPrefix + ' [monitor] VRAM Used',
|
||||
type: 'boolean',
|
||||
label: 'VRAM',
|
||||
defaultValue: true,
|
||||
@@ -174,8 +174,8 @@ class CrystoolsMonitor {
|
||||
app.ui.settings.addSetting(this.monitorHDDElement);
|
||||
app.ui.settings.addSetting({
|
||||
id: this.idInputRate,
|
||||
name: this.menuPrefix + '[menu] Monitors refresh rate (in seconds)',
|
||||
tooltip: 'This is the time between each update of the monitors, 0 means no refresh',
|
||||
name: this.menuPrefix + '[monitor] Refresh rate',
|
||||
tooltip: 'This is the time (in seconds) between each update of the monitors, 0 means no refresh',
|
||||
type: 'slider',
|
||||
attrs: {
|
||||
min: 0,
|
||||
@@ -231,7 +231,7 @@ class CrystoolsMonitor {
|
||||
const which = app.ui.settings.getSettingValue(this.idWhichHDD, this.defaultWhichHDD);
|
||||
app.ui.settings.addSetting({
|
||||
id: this.idWhichHDD,
|
||||
name: this.menuPrefix + 'Partition to show (HDD)',
|
||||
name: this.menuPrefix + '[monitor] Partition to show',
|
||||
type: 'combo',
|
||||
defaultValue: this.defaultWhichHDD,
|
||||
options: (value) => data.map((m) => ({
|
||||
|
||||
+9
-9
@@ -16,7 +16,7 @@ class CrystoolsMonitor {
|
||||
// CPU Variables
|
||||
monitorCPUElement: TMonitorSettings = {
|
||||
id: 'Crystools.switchCPU',
|
||||
name: this.menuPrefix + '[menu] Display CPU monitor',
|
||||
name: this.menuPrefix + ' [monitor] CPU Usage',
|
||||
type: 'boolean',
|
||||
label: 'CPU',
|
||||
defaultValue: true,
|
||||
@@ -35,7 +35,7 @@ class CrystoolsMonitor {
|
||||
// RAM Variables
|
||||
monitorRAMElement: TMonitorSettings = {
|
||||
id: 'Crystools.switchRAM',
|
||||
name: this.menuPrefix + '[menu] Display RAM monitor',
|
||||
name: this.menuPrefix + ' [monitor] RAM Used',
|
||||
type: 'boolean',
|
||||
label: 'RAM',
|
||||
defaultValue: true,
|
||||
@@ -54,10 +54,10 @@ class CrystoolsMonitor {
|
||||
// HDD Variables
|
||||
monitorHDDElement: TMonitorSettings = {
|
||||
id: 'Crystools.switchHDD',
|
||||
name: this.menuPrefix + '[menu] Display partition disk monitor (HDD)',
|
||||
name: this.menuPrefix + ' [monitor] HDD Used',
|
||||
type: 'boolean',
|
||||
label: 'HDD',
|
||||
tooltip: `Drive: ${app.ui.settings.getSettingValue(this.idWhichHDD, this.defaultWhichHDD)}`,
|
||||
tooltip: 'See Partition to show (HDD)',
|
||||
defaultValue: true,
|
||||
htmlMonitorRef: undefined,
|
||||
htmlMonitorSliderRef: undefined,
|
||||
@@ -74,7 +74,7 @@ class CrystoolsMonitor {
|
||||
// GPU Variables
|
||||
monitorGPUElement: TMonitorSettings = {
|
||||
id: 'Crystools.switchGPU',
|
||||
name: this.menuPrefix + '[menu] Display GPU monitor',
|
||||
name: this.menuPrefix + ' [monitor] GPU Usage',
|
||||
type: 'boolean',
|
||||
label: 'GPU',
|
||||
defaultValue: true,
|
||||
@@ -93,7 +93,7 @@ class CrystoolsMonitor {
|
||||
// VRAM Variables
|
||||
monitorVRAMElement: TMonitorSettings = {
|
||||
id: 'Crystools.switchVRAM',
|
||||
name: this.menuPrefix + '[menu] Display Video RAM monitor',
|
||||
name: this.menuPrefix + ' [monitor] VRAM Used',
|
||||
type: 'boolean',
|
||||
label: 'VRAM',
|
||||
defaultValue: true,
|
||||
@@ -122,8 +122,8 @@ class CrystoolsMonitor {
|
||||
|
||||
app.ui.settings.addSetting({
|
||||
id: this.idInputRate,
|
||||
name: this.menuPrefix + '[menu] Monitors refresh rate (in seconds)',
|
||||
tooltip: 'This is the time between each update of the monitors, 0 means no refresh',
|
||||
name: this.menuPrefix + '[monitor] Refresh rate',
|
||||
tooltip: 'This is the time (in seconds) between each update of the monitors, 0 means no refresh',
|
||||
type: 'slider',
|
||||
attrs: {
|
||||
min: 0,
|
||||
@@ -182,7 +182,7 @@ class CrystoolsMonitor {
|
||||
const which = app.ui.settings.getSettingValue(this.idWhichHDD, this.defaultWhichHDD);
|
||||
app.ui.settings.addSetting({
|
||||
id: this.idWhichHDD,
|
||||
name: this.menuPrefix + 'Partition to show (HDD)',
|
||||
name: this.menuPrefix + '[monitor] Partition to show',
|
||||
type: 'combo',
|
||||
defaultValue: this.defaultWhichHDD,
|
||||
options: (value: string) =>
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ class CrystoolsProgressBar {
|
||||
value: () => {
|
||||
app.ui.settings.addSetting({
|
||||
id: this.idShowProgressBar,
|
||||
name: this.menuPrefix + 'Show progress bar [menu]',
|
||||
name: this.menuPrefix + '[monitor] Show progress bar',
|
||||
type: 'boolean',
|
||||
defaultValue: this.defaultShowStatus,
|
||||
onChange: this.showProgressBar,
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ class CrystoolsProgressBar {
|
||||
createSettings = (): void => {
|
||||
app.ui.settings.addSetting({
|
||||
id: this.idShowProgressBar,
|
||||
name: this.menuPrefix + 'Show progress bar [menu]',
|
||||
name: this.menuPrefix + '[monitor] Show progress bar',
|
||||
type: 'boolean',
|
||||
defaultValue: this.defaultShowStatus,
|
||||
onChange: this.showProgressBar,
|
||||
|
||||
Reference in New Issue
Block a user