Compare commits

...
1 Commits
Author SHA1 Message Date
ketle-manandClaude Sonnet 4.6 202deab5d6 release: v0.3.67 — Alt+Click Apply & Generate
GenerateUI タブの Apply ボタンを Alt+Click すると Apply と Generate を
1操作で実行できる機能を追加。

- Positive Prompt / Checkpoint / KSampler 等の Apply ボタン対象
- Apply 成功時のみ生成をトリガー(ノード未存在時は何もしない)
- カスタムイベント (wfm:apply-and-generate) 経由で循環参照を回避
- ボタンに title 属性でヒントを表示
- ヘルプ helpGen18 を EN/JA/ZH で追加

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 22:15:03 +09:00
8 changed files with 54 additions and 10 deletions
+29
View File
@@ -2,6 +2,35 @@
---
## v0.3.67
### Alt+Click Apply & Generate
GenerateUI タブの Apply ボタンを Alt+Click すると、Apply と Generate を1操作で実行できる機能を追加。
よく変更する箇所(Positive Prompt・Checkpoint・KSampler)でApplyボタンとGenerateボタンを往復する手間を省く。
**対象ボタン(`comfyui-editor.js`):**
- Input タブ — Positive Prompt の Apply(`wfm-prompt-pos-apply`)
- Model タブ — 全モデル Apply(`wfm-model-apply`: Checkpoint / VAE / Diffusion Model / ControlNet / Hypernetwork)
- Settings タブ — KSampler の Apply(`wfm-settings-sampler-apply`)
**動作の流れ:**
1. Alt+Click → Apply 処理を実行(ワークフローへの書き込み+Raw JSON同期)
2. Apply が成功(対象ノードが存在)した場合のみ `wfm:apply-and-generate` カスタムイベントを dispatch
3. `generate-tab.js` のリスナーがイベントを受け取り `handleGenerate()` を呼び出す
循環参照を避けるためカスタムイベント経由で連携(comfyui-editor.js は generate-tab.js を import しない設計を維持)。
対象ノードが存在しない場合はdispatchされないため、ワークフロー未読み込み時は何も起きない。
各 Apply ボタンに `title="Apply (Alt+Click: Apply & Generate)"` を追加してホバーで操作を確認できるようにした。
**ヘルプ更新:**
- `helpGen18` を EN/JA/ZH の3言語で追加
- `index.html` に `wfm-help-gen-18` の `<li>` 追加
- `app.js` の `helpIdMap` に `"wfm-help-gen-18": "helpGen18"` 登録
---
## 計画: Image Edit 拡張 — ABRブラシ連携 + Mask Editor One 統合
**方針**: Mask Editor One(同作者)のインストールを前提に、WFS Image Edit タブに2つの拡張を加える。
+7 -2
View File
@@ -1,4 +1,4 @@
前回から引き続きImage EditタブのMask Editor Oneとの連携、機能追加を行いたい。まずDrawメニューにマスクメニューと同じくプロパティペインを追加し上部のcolor他をプロパティに移動、下部にMask Editor Oneのブラシ機能としたい。名称による混乱を防ぐためMASK EDITOR ONE (COLOR)としてほしい。# ComfyUI-Workflow-Studio
# ComfyUI-Workflow-Studio
A comprehensive workflow, asset management, and generation UI plugin for [ComfyUI](https://github.com/comfyanonymous/ComfyUI).
@@ -21,7 +21,7 @@ A comprehensive workflow, asset management, and generation UI plugin for [ComfyU
- Built-in AI tools (translation and more)
![Workflow Studio](https://img.shields.io/badge/ComfyUI-Custom_Node-blue)
![Version](https://img.shields.io/badge/version-0.3.66-green)
![Version](https://img.shields.io/badge/version-0.3.67-green)
## Screenshots
@@ -392,6 +392,11 @@ Click the **camera icon** (next to the W button) in ComfyUI's top bar to capture
## Changelog
### v0.3.67
- **GenerateUI — Alt+Click Apply & Generate** — Alt+Click any Apply button to apply the parameter and immediately queue a generation in one step; applies to Positive Prompt Apply (Input tab), all model Apply buttons (Model tab: Checkpoint / VAE / Diffusion Model / ControlNet / Hypernetwork), and KSampler Apply (Settings tab); only triggers generation when the target node exists in the loaded workflow (no action on missing nodes); each Apply button shows a tooltip `Apply (Alt+Click: Apply & Generate)` on hover
- **Help — Alt+Click Apply & Generate** — new help entry (`helpGen18`) added in EN / JA / ZH
### v0.3.66
- **Image Edit — Mask Tool: 5 new sub-tools** — Paint / Color / Alpha / Text / Vector / Shape / SAM3 (7 sub-tools total); Color, Alpha, Text, Vector, and Shape work without Mask Editor One
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "comfyui-workflow-studio"
description = "A comprehensive workflow, asset management, and generation UI plugin for ComfyUI. Manage workflows, models, images, and prompts; batch generation and Image Feeder in the GenerateUI tab; library side panel with canvas drag & drop and AI tools."
version = "0.3.66"
version = "0.3.67"
license = "MIT"
requires-python = ">= 3.10"
dependencies = ["jinja2"]
+1 -1
View File
@@ -355,7 +355,7 @@ function applyI18nToHtml() {
"wfm-help-gen-11": "helpGen11", "wfm-help-gen-12": "helpGen12",
"wfm-help-gen-13": "helpGen13", "wfm-help-gen-14": "helpGen14",
"wfm-help-gen-15": "helpGen15", "wfm-help-gen-16": "helpGen16",
"wfm-help-gen-17": "helpGen17",
"wfm-help-gen-17": "helpGen17", "wfm-help-gen-18": "helpGen18",
"wfm-help-feeder-title": "helpFeederTitle",
"wfm-help-feeder-desc": "helpFeederDesc",
"wfm-help-feeder-imgloop-title": "helpFeederImgloopTitle",
+9 -6
View File
@@ -225,7 +225,7 @@ export const comfyEditor = {
${positiveNodes.map((n) => `<option value="${n.id}" data-text-key="${n.textKey || "text"}" selected>ID:${n.id} (${n.title})</option>`).join("")}
${nodeOpts}
</select>
<button class="wfm-btn wfm-btn-sm" id="wfm-prompt-pos-apply">Apply</button>
<button class="wfm-btn wfm-btn-sm" id="wfm-prompt-pos-apply" title="Apply (Alt+Click: Apply &amp; Generate)">Apply</button>
</div>
<textarea class="wfm-textarea" id="wfm-prompt-pos-text" rows="6">${positiveNodes[0]?.text || ""}</textarea>
</div>
@@ -254,7 +254,7 @@ export const comfyEditor = {
</div>
`;
document.getElementById("wfm-prompt-pos-apply")?.addEventListener("click", () => {
document.getElementById("wfm-prompt-pos-apply")?.addEventListener("click", (e) => {
const nodeId = document.getElementById("wfm-prompt-pos-target")?.value;
const text = document.getElementById("wfm-prompt-pos-text")?.value;
if (nodeId && comfyUI.currentWorkflow?.[nodeId]) {
@@ -262,6 +262,7 @@ export const comfyEditor = {
const textKey = promptNode?.textKey || "text";
comfyUI.currentWorkflow[nodeId].inputs[textKey] = text;
_syncRawJson();
if (e.altKey) document.dispatchEvent(new CustomEvent("wfm:apply-and-generate"));
}
});
@@ -377,7 +378,7 @@ export const comfyEditor = {
${extrasHtml}
<div style="display:flex;gap:8px;align-items:center;margin-top:4px;">
<select class="wfm-select" id="wfm-model-${s.key}-target" style="flex:1;">${targetOpts}</select>
<button class="wfm-btn wfm-btn-sm wfm-model-apply" data-key="${s.key}" data-input="${s.inputKey}">Apply</button>
<button class="wfm-btn wfm-btn-sm wfm-model-apply" data-key="${s.key}" data-input="${s.inputKey}" title="Apply (Alt+Click: Apply &amp; Generate)">Apply</button>
</div>
</div>
`;
@@ -402,7 +403,7 @@ export const comfyEditor = {
// Apply buttons
el.querySelectorAll(".wfm-model-apply").forEach((btn) => {
btn.addEventListener("click", () => {
btn.addEventListener("click", (e) => {
const key = btn.dataset.key;
let inputKey = btn.dataset.input;
const select = document.getElementById(`wfm-model-${key}`);
@@ -424,6 +425,7 @@ export const comfyEditor = {
if (!isNaN(exVal)) comfyUI.currentWorkflow[nodeId].inputs[exInputKey] = exVal;
});
_syncRawJson();
if (e.altKey) document.dispatchEvent(new CustomEvent("wfm:apply-and-generate"));
}
});
});
@@ -890,7 +892,7 @@ export const comfyEditor = {
<label>Denoise</label>
<input type="number" class="wfm-input" id="wfm-settings-denoise" value="${sampler.denoise ?? 1.0}" step="0.05" min="0" max="1">
</div>
<button class="wfm-btn wfm-btn-sm" id="wfm-settings-sampler-apply">Apply</button>
<button class="wfm-btn wfm-btn-sm" id="wfm-settings-sampler-apply" title="Apply (Alt+Click: Apply &amp; Generate)">Apply</button>
` : "<p class='wfm-placeholder'>No KSampler node found</p>"}
</div>
<div style="flex:1;min-width:0;padding-left:14px;">
@@ -934,7 +936,7 @@ export const comfyEditor = {
</div>
`;
document.getElementById("wfm-settings-sampler-apply")?.addEventListener("click", () => {
document.getElementById("wfm-settings-sampler-apply")?.addEventListener("click", (e) => {
const nodeId = document.getElementById("wfm-settings-sampler-id")?.value;
if (!nodeId || !comfyUI.currentWorkflow?.[nodeId]) return;
const inputs = comfyUI.currentWorkflow[nodeId].inputs;
@@ -947,6 +949,7 @@ export const comfyEditor = {
inputs.scheduler = document.getElementById("wfm-settings-scheduler")?.value;
inputs.denoise = parseFloat(document.getElementById("wfm-settings-denoise")?.value) || 1.0;
_syncRawJson();
if (e.altKey) document.dispatchEvent(new CustomEvent("wfm:apply-and-generate"));
});
document.getElementById("wfm-settings-latent-apply")?.addEventListener("click", () => {
+3
View File
@@ -1752,6 +1752,9 @@ export async function initGenerateTab() {
// Generate button
document.getElementById("wfm-gen-generate-btn")?.addEventListener("click", handleGenerate);
// Alt+Apply from Input/Model/Settings tabs → Apply & Generate
document.addEventListener("wfm:apply-and-generate", () => handleGenerate());
// Interrupt button (stops both single generation and batch loop)
document.getElementById("wfm-gen-interrupt-btn")?.addEventListener("click", async () => {
_ckptBatch.aborted = true;
+3
View File
@@ -629,6 +629,7 @@ const LANGUAGES = {
helpGen15: "Sampler/Scheduler batch: select samplers or schedulers in the left pane, enable the column in Batch Queue, then Generate to iterate through each value on the KSampler node; lists are fetched from ComfyUI (connection required)",
helpGen16: "SPA-side wildcard expansion (A1111-style): when prompt text in non-ImpactWildcard nodes (e.g. CLIPTextEncode) contains __name__ syntax, the SPA expands it at generation time by randomly picking a line from the matching file in the WFS wildcard folder; nested wildcards are re-expanded up to 5 passes; unresolved wildcards are passed through unchanged; ImpactWildcardEncode/Processor nodes are skipped (handled server-side by Impact Pack); works in both single and batch generation",
helpGen17: "Style batch: select styles from the Style tab in the left pane, enable the Style column in Batch Queue, then Generate — each selected style is applied in sequence to the positive and negative prompts; applied to workflow copies so the loaded workflow is not modified; style files are re-read on each page load from user/default/Workflow-Studio/style/*.json",
helpGen18: "Alt+Click any Apply button (Positive Prompt / Checkpoint / KSampler) to Apply & Generate in one step — applies the parameter to the workflow then immediately queues a generation; only fires when the target node exists in the loaded workflow",
helpFeederTitle: "GenerateUI Tab — Feeder subtab",
helpFeederDesc: "Two modes switchable via the [Image Loop] / [Gallery] toggle at the top of the left pane.",
helpFeederImgloopTitle: "Image Loop mode",
@@ -1605,6 +1606,7 @@ const LANGUAGES = {
helpGen15: "Sampler/Schedulerバッチ:左ペインでサンプラーまたはスケジューラーを選択し、バッチキューの対応列を有効化してGenerateを実行;選択した値を順番にKSamplerノードに適用して生成;リストはComfyUIから取得(要接続)",
helpGen16: "SPAサイドのワイルドカード展開(A1111スタイル):ImpactWildcard系以外のノード(CLIPTextEncodeなど)のプロンプトに__name__構文が含まれる場合、生成時にSPA側がWFSワイルドカードフォルダの対応ファイルからランダムに1行選んで展開;ネストしたワイルドカードは最大5パスまで再展開;見つからないワイルドカードはそのまま送信;ImpactWildcardEncode/ProcessorノードはスキップしてComfyUIサーバー側(Impact Pack)が処理;単体生成・バッチ生成どちらでも機能",
helpGen17: "スタイルバッチ:左ペインのStyleタブでスタイルを選択し、バッチキューのStyle列を有効化してGenerateを実行 — 選択した各スタイルをPositiveおよびNegativeプロンプトに順番に適用;ワークフローコピーに適用されるため読み込み済みワークフローは変更されない;スタイルファイルはページロードのたびに user/default/Workflow-Studio/style/*.json から再読み込み",
helpGen18: "Applyボタンを Alt+Click すると Apply & Generate を1操作で実行 — 対象:Positive Prompt・Checkpoint・KSamplerの各Applyボタン;ワークフローに値を書き込んだ後、即座に生成をキューに追加;対象ノードが存在しない場合は何もしない",
helpFeederTitle: "GenerateUI Tab — Feeder サブタブ",
helpFeederDesc: "左ペイン上部の [Image Loop] / [Gallery] トグルで2つのモードを切り替えられます。",
helpFeederImgloopTitle: "Image Loop モード",
@@ -2580,6 +2582,7 @@ const LANGUAGES = {
helpGen15: "Sampler/Scheduler批次:在左窗格选择采样器或调度器,启用批次队列对应列后点击Generate;依次将每个值应用到KSampler节点逐一生成;列表从ComfyUI获取(需已连接)",
helpGen16: "SPA端通配符展开(A1111风格):当非ImpactWildcard系节点(如CLIPTextEncode)的提示词中含有__name__语法时,SPA在生成时从WFS通配符文件夹的对应文件中随机选取一行展开;嵌套通配符最多重复展开5次;未找到的通配符原样传递;ImpactWildcardEncode/Processor节点跳过(由ComfyUI服务端Impact Pack处理);单次生成和批量生成均有效",
helpGen17: "样式批处理:在左窗格Style标签中选择样式,启用批次队列Style列后点击Generate — 每个选中样式依次应用到正向和负向提示词;样式应用于工作流副本,不会修改已加载的工作流;每次页面加载时从 user/default/Workflow-Studio/style/*.json 重新读取样式文件",
helpGen18: "Alt+单击Apply按钮(Positive Prompt / Checkpoint / KSampler)可一步完成Apply & Generate — 将参数写入工作流后立即排队生成;仅当工作流中存在目标节点时才触发生成",
helpFeederTitle: "GenerateUI Tab — Feeder 子标签",
helpFeederDesc: "通过左侧面板顶部的 [图片循环] / [图库] 切换按钮可在两种模式间切换。",
helpFeederImgloopTitle: "图片循环模式",
+1
View File
@@ -1102,6 +1102,7 @@
<li id="wfm-help-gen-15">Sampler/Scheduler batch: select one or more samplers or schedulers from the left pane, enable the column in Batch Queue, then Generate to run each value through the KSampler node sequentially; sampler/scheduler lists are fetched from ComfyUI (requires connection)</li>
<li id="wfm-help-gen-17">Style batch: select styles in the left pane Style tab, enable the Style column in Batch Queue, then Generate — each selected style is applied in sequence to the positive and negative prompts; styles are applied to workflow copies so the loaded workflow is not modified; style files are re-read each time the page loads from <code>user/default/Workflow-Studio/style/*.json</code></li>
<li id="wfm-help-gen-16">SPA-side wildcard expansion (A1111-style): when prompt text in non-ImpactWildcard nodes (e.g. CLIPTextEncode) contains __name__ syntax, the SPA expands it at generation time by randomly picking a line from the matching file in the WFS wildcard folder; nested wildcards are re-expanded up to 5 passes; unresolved wildcards are passed through unchanged; ImpactWildcardEncode/Processor nodes are skipped (handled server-side by Impact Pack); works in both single and batch generation</li>
<li id="wfm-help-gen-18">Alt+Click any Apply button (Positive Prompt / Checkpoint / KSampler) to Apply &amp; Generate in one step — applies the parameter to the workflow then immediately queues a generation; only fires when the target node exists in the loaded workflow</li>
</ul>
</div>
</div>