diff --git a/Rayko_Prompts.py b/Rayko_Prompts.py index fe7e0be..ede3205 100644 --- a/Rayko_Prompts.py +++ b/Rayko_Prompts.py @@ -31,8 +31,8 @@ class RSPrompts: } } - RETURN_TYPES = ("CONDITIONING", "CONDITIONING") - RETURN_NAMES = ("POSITIVE", "NEGATIVE") + RETURN_TYPES = ("CONDITIONING", "CONDITIONING", "STRING") + RETURN_NAMES = ("POSITIVE", "NEGATIVE", "PROMPT_STRING") FUNCTION = "encode_prompts" CATEGORY = "🦊 RaykoStudio" DESCRIPTION = "Text encoder with visual prompt controls and pause-for-edit mode." @@ -88,7 +88,7 @@ class RSPrompts: return { "ui": {"text": [current_text]}, - "result": (pos_cond, neg_cond) + "result": (pos_cond, neg_cond, current_text) } @classmethod diff --git a/__init__.py b/__init__.py index 76c0897..b57e5a5 100644 --- a/__init__.py +++ b/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.17.2" +__version__ = "0.17.3" import importlib import logging from pathlib import Path diff --git a/package.json b/package.json index d924a90..409a1a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ComfyUI_RaykoStudio", - "version": "0.17.2", + "version": "0.17.3", "description": "Set of custom nodes for ComfyUI providing additional image processing capabilities", "author": "Raykosan", "license": "MIT", diff --git a/pyproject.toml b/pyproject.toml index b15df10..5e19ee5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "ComfyUI_RaykoStudio" description = "Set of custom nodes for ComfyUI providing additional image processing capabilities" -version = "0.17.2" +version = "0.17.3" license = { file = "LICENSE" } dependencies = ["torch>=1.7.0", "numpy>=1.19.0", "Pillow>=8.0.0", "freetype-py>=2.5.1"] diff --git a/web/rs_prompts.js b/web/rs_prompts.js index 6444cd2..beda565 100644 --- a/web/rs_prompts.js +++ b/web/rs_prompts.js @@ -28,7 +28,6 @@ styleBlock.innerHTML = ` border: 1px solid #5090cc; text-align: center; } - /* Toggle switch styles */ .rs-toggle-switch { position: relative; display: inline-flex; @@ -74,10 +73,6 @@ styleBlock.innerHTML = ` color: #ccc; user-select: none; } - .rs-toggle-active .rs-toggle-label { - color: #28a745; - font-weight: bold; - } `; document.head.appendChild(styleBlock); @@ -98,6 +93,7 @@ app.registerExtension({ const result = origOnNodeCreated?.apply(this, arguments); const node = this; + // Скрытие фантомного слота text const hidePhantomSlot = () => { if (node.inputs) { const textInput = node.inputs.find(i => i.name === "text"); @@ -116,7 +112,6 @@ app.registerExtension({ if (pauseWidget) { pauseWidget.hidden = true; - pauseWidget.serializeValue = () => toggleInput.checked; } if (textWidget) textWidget.hidden = true; @@ -315,6 +310,10 @@ app.registerExtension({ toggleInput.addEventListener("change", (e) => { pauseModeEnabled = e.target.checked; + if (pauseWidget) { + pauseWidget.value = e.target.checked; + if (pauseWidget.callback) pauseWidget.callback(e.target.checked); + } if (pauseModeEnabled) { statusIndicator.innerHTML = "🔘 Pause ON"; statusIndicator.style.background = "#3a2a1a"; @@ -463,14 +462,11 @@ app.registerExtension({ updateUIForPauseMode(false); - if (pauseWidget) { - const savedValue = pauseWidget.value; - if (savedValue !== undefined) { - toggleInput.checked = savedValue; - if (savedValue) { - statusIndicator.innerHTML = "🔘 Pause ON"; - statusIndicator.style.background = "#3a2a1a"; - } + if (pauseWidget && pauseWidget.value !== undefined) { + toggleInput.checked = pauseWidget.value; + if (pauseWidget.value) { + statusIndicator.innerHTML = "🔘 Pause ON"; + statusIndicator.style.background = "#3a2a1a"; } }