Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a993702d86 | ||
|
|
296f8df4d1 |
@@ -2,6 +2,7 @@
|
||||
|
||||
Condensed version-by-version index of DEVLOG.md (each line: version + one-line summary of what changed and why). Full rationale, code details, and "How to apply" lessons live in the excluded DEVLOG.md itself; this index exists so graphify can extract a queryable semantic node per release without feeding the full log to the local Ollama model. Regenerate with `python tools/generate_doc_index.py devlog` whenever DEVLOG.md changes.
|
||||
|
||||
- **v0.8.7(2026-10-16)** — Qwen Image 2.1 Turbo(ComfyUI公式テンプレート T2I / I2I)対応
|
||||
- **v0.8.6(2026-10-14)** — GenerateUI: パートナーAPIノード(Nano Banana 等)の実行に対応
|
||||
- **v0.8.5(2026-10-14)** — Metadata / I タブ: Gemini 系ノード(Nano Banana)の画像を読めるように
|
||||
- **v0.8.4(2026-10-14)** — ComfyUI v0.40.0 対応: ネイティブ LoRA スタックノード(`LoadLoraModel` / `LoadLoraTextEncoder`)
|
||||
|
||||
@@ -2,6 +2,27 @@
|
||||
|
||||
---
|
||||
|
||||
## v0.8.7(2026-10-16)
|
||||
|
||||
### Qwen Image 2.1 Turbo(ComfyUI公式テンプレート T2I / I2I)対応
|
||||
|
||||
テンプレート(`SamplerCustomAdvanced`+`ManualSigmas`+`CFGGuider`、プロンプトエンハンサー=`TextGenerate`+`ComfySwitchNode`構成)をGenerateUIで使えるようにした。
|
||||
|
||||
- **Positiveプロンプトが空になる問題**: プロンプトが`PreviewAny → ComfySwitchNode(on_false=文字列リテラル)`経由で`TextEncodeQwenImage21.prompt`に入るため検出できなかった。`comfyui-workflow.js`のPass 1で`TextEncodeQwenImage21`のリンクされた`prompt`/`negative_prompt`へロールを伝播し、Pass 2で文字列リテラルを持つ`ComfySwitchNode`を`textKey: "on_false"`のプロンプトノードとして登録。
|
||||
- **サブグラフ展開のファンアウト**: `_flattenSubgraphs()`は外部リンクをポートの最初の接続先にしか張らなかったため、`images.image_1`がTextEncodeとプロンプトエンハンサー用`BatchImagesNode`の2か所へ分岐するI2Iで、後者が画像未接続になっていた。2番目以降の接続先にも同じ外部リンクを複製するよう修正。
|
||||
- 実機(8189)でT2I/I2Iとも生成成功を確認。
|
||||
- プロンプトエンハンサー対応: `TextGenerate.prompt`とスイッチ`on_false`が展開後に別々のリテラルになる問題を、`_unifyPromptEnhancerText()`で共有の`PrimitiveStringMultiline`(`<switchId>:wfs_prompt`)へ集約して解消。GenerateUIの入力欄の編集がエンハンサー入力にも反映される。I2Iでエンハンサーをオンにして実機確認(入力プロンプトと参照画像の両方がエンハンサーに届く)。
|
||||
|
||||
### Flux.3 Image Klein(ComfyUI公式テンプレート 4種)対応
|
||||
|
||||
Klein(cfg 3.5/25step)とKlein SD(蒸留、cfg 1/16step)それぞれのT2I(プロンプトエンハンサー付きサブグラフ)とImage Edit(`ReferenceMultiLatent`)。`CLIPLoader`のtype=`flux3`は既存の変換でそのまま通る。
|
||||
|
||||
- **`ReferenceMultiLatent`のロール伝播**: positive/negative入力が別々の出力に出るノードなので、`InstructPixToPixConditioning`と同様にロールを各入力へ個別に伝播。従来はEdit版のPositive/Negativeが両方とも"Positive Prompt"というタイトルだったため、Negative側もpositiveと誤判定されていた。
|
||||
- **未使用の空Latent**: `ReferenceMultiLatent`は参照画像サイズの`empty_latent`を自前で出力するため、テンプレートに残っている未接続の`EmptyFlux2LatentImage`はSettingsのLatent Imageに出さない(`ReferenceMultiLatent`を含むワークフローに限定)。
|
||||
- T2I側はQwen Image 2.1 Turboと同様、エンハンサーの`TextGenerate.prompt`が入力用`PrimitiveStringMultiline`に直結しているため、そのまま編集が両方に反映される。SD版T2I(SD_4)はテンプレート既定でエンハンサーがオン。
|
||||
- **COMBO値の誤置換**: テンプレートは`unet_name`をフォルダ接頭辞なし(`flux3_image_klein_int8_convrot.safetensors`)で保存しているが、実機の選択肢は`diffusion_models\flux3_...`。従来の「選択肢に無い値はchoices[0]へ無警告で差し替え」により、無関係なモデルに差し替わって実行されていた。選択肢に無い場合はまずファイル名(区切り文字`\`/`/`の後ろ)が一致する選択肢が1つだけあればそれを採用してから、従来のフォールバックに回すよう変更(`_convertUiToApiImpl`のCOMBO検証)。
|
||||
- 実機で4種とも生成成功(エンハンサーはオフ)。Edit版は参照画像の編集が効くことを画像で確認。
|
||||
|
||||
## v0.8.6(2026-10-14)
|
||||
|
||||
### GenerateUI: パートナーAPIノード(Nano Banana 等)の実行に対応
|
||||
@@ -30,6 +51,24 @@ Comic Creator v1.55.0 で、半自動マンガがネイティブノード経由
|
||||
- `.env` に `COMFY_API_KEY` を設定し、GenerateUI でサンプル(Nano Banana 2.1)を読み込み、Prompt タブで編集して Apply → Generate を実クリック: リクエストは `/api/wfm/partner/prompt` 経由、16.4秒で成功、編集どおりの絵(青いティーポット)が `output/nano_banana_00001_.png` に出力された。
|
||||
- キー未設定時の案内文(`partnerAuthHint`)が表示用文言として解決されること、ヘルプ(`helpGen32`)が表示されることを確認。
|
||||
|
||||
### 今後の作業候補(2026-10-14 時点・未着手。v0.8.4〜v0.8.6 の続き)
|
||||
|
||||
**ネイティブ LoRA スタックノード(`LoadLoraModel` / `LoadLoraTextEncoder`、v0.8.4)**
|
||||
- **UI形式への対応**: ComfyUI フロントエンド 1.55.17 は DynamicGroup を実装していない(行を追加できず `widgets_values` も空)。フロントエンドが対応したら、実物の UI 形式 JSON で `widgets_values` の並びを確認し、`analyzeWorkflow` / Metadata / I タブの UI 形式分岐を追加する。
|
||||
- **画面操作の確認**: GenerateUI の Stack タブ(Stack グループを複数行として書き込む処理)は、関数の直接呼び出しでのみ確認済み。Models タブで Stack グループを登録した状態での画面確認が未実施。
|
||||
|
||||
**Gemini / Nano Banana 系ノード(v0.8.5 / v0.8.6)**
|
||||
- **Metadata / I タブの表示拡充**: プロンプトは Positive / Negative に分けず全文を1件で表示している(送信全文に `NEGATIVE_PROMPT:` が含まれる)。`NEGATIVE_PROMPT:` で分割して Positive / Negative に振り分ける、`aspect_ratio` / `resolution` / `thinking_level` を設定欄に出す、UI 形式の `widgets_values`(並びは `[prompt, model, aspect_ratio, resolution, thinking_level, seed, control_after_generate, response_modalities, system_prompt, temperature, top_p]`)に対応する、が候補。
|
||||
- **他のパートナーAPIノードの Prompt タブ対応**: 現状は `Gemini(Image|NanoBanana)*` のみを `prompt_nodes` に登録している。`/object_info` の `api_node: true` かつ `prompt` 入力を持つノード(Seedream / Kling 等)へ一般化できないか検討する。
|
||||
- **費用ガード**: Batch / Lab / カタログ作成などの繰り返し実行でパートナーAPIノードを使うと、回数ぶんのクレジットが連続して消費される。`/object_info` の `price_badge` から概算を出して、実行前に表示・確認する案。
|
||||
- **Settings タブに `COMFY_API_KEY` の設定状態を表示**: 現状は `.env` 編集のみ。`GET /api/wfm/partner/status`(設定の有無のみ返す)を使って、設定済み/未設定と設定手順を Settings タブに出す。キー自体は表示・入力させない方針を維持する。
|
||||
- **サンプルの追加**: 参考画像付き(I2I、`LoadImage` → `model.images.image_1`)の Nano Banana ワークフロー、複数参考画像のもの。Nano Banana Pro(`GeminiImage2Node`)は Comic Creator 側のネイティブ対応と合わせて。
|
||||
|
||||
**運用・開発環境**
|
||||
- **同期スクリプトの整備**: 開発リポジトリから実機の `custom_nodes` への反映は、今回も手作業(追跡ファイルの `cmp` 比較 + `cp`、`workflows/` / `data/` / `.env` は除外)だった。CLAUDE.md の「同期スクリプトでパッケージ全体をデプロイ」に沿って、`tools/` に同期スクリプト(除外リスト付き、ハッシュ比較・`__pycache__` 削除まで)を用意する。部分同期が残ると古い版が混在する(今回、実機は v0.8.2 開発途中の版のまま止まっていた)。
|
||||
- **comfy-cli / comfy-mcp の既定ワークスペース**が ComfyUI_6(プラグイン 0.3.78)で、実際に使っている ComfyUI_5(8189)と一致しない。`server_info` の `running` / `freshness` は ComfyUI_6 の情報になるため、MCP で実機を扱うときは注意するか、既定ワークスペースを揃える。
|
||||
- **英語・中国語UIでの表示確認**: 今回追加したヘルプ(`helpGen32` ほか)と `partnerAuthHint` は日本語UIでのみ画面確認した。
|
||||
|
||||
## v0.8.5(2026-10-14)
|
||||
|
||||
### Metadata / I タブ: Gemini 系ノード(Nano Banana)の画像を読めるように
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ A comprehensive workflow, asset management, and generation UI plugin for [ComfyU
|
||||
- Built-in AI tools (translation and more)
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## Features (tab -> feature names)
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ A comprehensive workflow, asset management, and generation UI plugin for [ComfyU
|
||||
- Built-in AI tools (translation and more)
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## Screenshots
|
||||
|
||||
@@ -55,6 +55,10 @@ A comprehensive workflow, asset management, and generation UI plugin for [ComfyU
|
||||
| :--------------------------------: | :------------------------------------------: |
|
||||
|  |  |
|
||||
|
||||
| Gallery Tab - Semantic Search ("sunset city street") |
|
||||
| :-----------------------------------------------------------------: |
|
||||
|  |
|
||||
|
||||
---
|
||||
|
||||
## Features
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
+1
-1
@@ -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.8.6"
|
||||
version = "0.8.7"
|
||||
license = { file = "LICENSE" }
|
||||
requires-python = ">= 3.10"
|
||||
dependencies = ["jinja2"]
|
||||
|
||||
@@ -458,6 +458,9 @@ function _flattenSubgraphs(workflow, objectInfo) {
|
||||
// from ports that truly carry a link end-to-end (e.g. width/height wired to a
|
||||
// ResolutionSelector node).
|
||||
const redirectedTargets = new Set();
|
||||
// Extra links for the 2nd+ fan-out targets of a port that has a real outer link
|
||||
// (collected here and appended after the loop so wf.links isn't mutated mid-iteration).
|
||||
const fanOutLinks = [];
|
||||
for (const link of wf.links) {
|
||||
if (link[3] === node.id) {
|
||||
const dstSlot = link[4];
|
||||
@@ -475,6 +478,13 @@ function _flattenSubgraphs(workflow, objectInfo) {
|
||||
link[3] = target.targetNodeId;
|
||||
link[4] = target.targetSlot;
|
||||
redirectedTargets.add(`${target.targetNodeId}:${target.targetSlot}`);
|
||||
// Same real outer link feeding further internal targets (e.g. Qwen Image 2.1
|
||||
// Edit: images.image_1 -> TextEncodeQwenImage21 AND the prompt-enhancer's
|
||||
// BatchImagesNode) — duplicate it for each remaining target.
|
||||
for (const extra of (inputPortTargets[portIdx] || []).slice(1)) {
|
||||
fanOutLinks.push([0, link[1], link[2], extra.targetNodeId, extra.targetSlot, link[5]]);
|
||||
redirectedTargets.add(`${extra.targetNodeId}:${extra.targetSlot}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (link[1] === node.id) {
|
||||
@@ -487,6 +497,11 @@ function _flattenSubgraphs(workflow, objectInfo) {
|
||||
}
|
||||
}
|
||||
|
||||
for (const l of fanOutLinks) {
|
||||
l[0] = ++maxLinkId;
|
||||
wf.links.push(l);
|
||||
}
|
||||
|
||||
// === Add internal nodes (remapped IDs) ===
|
||||
const remappedByOrigId = {};
|
||||
for (const iNode of sgDef.nodes) {
|
||||
@@ -846,6 +861,14 @@ export const comfyWorkflow = {
|
||||
const spec = allInputDefs[name];
|
||||
if (spec) {
|
||||
const choices = Array.isArray(spec[0]) ? spec[0] : null;
|
||||
// Template saved the bare file name while this install lists it under a
|
||||
// sub-folder (or the reverse, or with the other path separator): prefer the
|
||||
// choice whose file name matches over an unrelated choices[0].
|
||||
if (choices && choices.length > 0 && typeof val === "string" && !choices.includes(val)) {
|
||||
const base = (x) => String(x).split(/[\\/]/).pop();
|
||||
const sameFile = choices.filter((c) => typeof c === "string" && base(c) === base(val));
|
||||
if (sameFile.length === 1) val = sameFile[0];
|
||||
}
|
||||
if (!opts.readOnly && choices && choices.length > 0 && !choices.includes(val)) {
|
||||
if (name === "ckpt_name") {
|
||||
_lastCheckpointSubstitutions.push({
|
||||
@@ -906,6 +929,7 @@ export const comfyWorkflow = {
|
||||
_meta: { title: node.title || node.type },
|
||||
};
|
||||
}
|
||||
_unifyPromptEnhancerText(api);
|
||||
return api;
|
||||
},
|
||||
|
||||
@@ -1136,6 +1160,13 @@ export const comfyWorkflow = {
|
||||
if (isPos && Array.isArray(inputs.positive)) samplerPositiveRef[inputs.positive[0]] = true;
|
||||
if (isNeg && Array.isArray(inputs.negative)) samplerNegativeRef[inputs.negative[0]] = true;
|
||||
}
|
||||
// ReferenceMultiLatent (Flux.3 Klein edit) — encodes reference images into the
|
||||
// conditioning and outputs positive/negative/empty_latent: separate positive/negative
|
||||
// inputs feeding separate outputs, so each role routes only to its own input.
|
||||
if (ct === "ReferenceMultiLatent") {
|
||||
if (isPos && Array.isArray(inputs.positive)) samplerPositiveRef[inputs.positive[0]] = true;
|
||||
if (isNeg && Array.isArray(inputs.negative)) samplerNegativeRef[inputs.negative[0]] = true;
|
||||
}
|
||||
// LTXVConditioning (LTX-2.5) — same shape as InstructPixToPixConditioning:
|
||||
// separate positive/negative inputs feeding separate outputs consumed by
|
||||
// LTXVDualCFGGuider, so each role must route only to its own input.
|
||||
@@ -1168,6 +1199,13 @@ export const comfyWorkflow = {
|
||||
if (isNeg) samplerNegativeRef[tv[0]] = true;
|
||||
}
|
||||
}
|
||||
// TextEncodeQwenImage21 — fixed roles (the node feeds both guider inputs): a linked
|
||||
// "prompt" (prompt-enhancer switch chain, Qwen Image 2.1 Turbo) is the positive text,
|
||||
// a linked "negative_prompt" the negative.
|
||||
if (ct === "TextEncodeQwenImage21") {
|
||||
if (Array.isArray(inputs.prompt)) samplerPositiveRef[inputs.prompt[0]] = true;
|
||||
if (Array.isArray(inputs.negative_prompt)) samplerNegativeRef[inputs.negative_prompt[0]] = true;
|
||||
}
|
||||
// PreviewAny — generic value tap/relay used mid-chain in prompt-enhancement wiring
|
||||
// (e.g. Krea-2's "Refine Prompt?" switch output tap); pass role through its
|
||||
// "source" input unchanged.
|
||||
@@ -1192,6 +1230,19 @@ export const comfyWorkflow = {
|
||||
}
|
||||
}
|
||||
|
||||
// ReferenceMultiLatent outputs its own empty latent sized from the reference image, so a
|
||||
// template's leftover EmptyFlux2LatentImage that nothing consumes does nothing — don't offer
|
||||
// its width/height in Settings.
|
||||
const hasRefMultiLatent = Object.values(workflow).some((n) => n?.class_type === "ReferenceMultiLatent");
|
||||
const referencedIds = new Set();
|
||||
if (hasRefMultiLatent) {
|
||||
for (const n of Object.values(workflow)) {
|
||||
for (const v of Object.values(n?.inputs || {})) {
|
||||
if (Array.isArray(v) && v.length === 2) referencedIds.add(String(v[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// === Pass 2: Main analysis ===
|
||||
for (const [id, node] of Object.entries(workflow)) {
|
||||
if (!node?.class_type) continue;
|
||||
@@ -1462,6 +1513,16 @@ export const comfyWorkflow = {
|
||||
}
|
||||
}
|
||||
|
||||
// ComfySwitchNode holding the raw prompt as an inline literal (on_false) — the
|
||||
// prompt-enhancer toggle of Qwen Image 2.1 Turbo, where the subgraph's prompt widget
|
||||
// lands directly on the switch instead of a PrimitiveStringMultiline.
|
||||
if (ct === "ComfySwitchNode" && typeof inputs.on_false === "string" && (isPos || isNeg)) {
|
||||
result.prompt_nodes.push({
|
||||
id, type: ct, title, role: getRole(),
|
||||
text: inputs.on_false, textKey: "on_false",
|
||||
});
|
||||
}
|
||||
|
||||
// PrimitiveStringMultiline / PrimitiveString — when feeding a prompt node
|
||||
if ((ct === "PrimitiveStringMultiline" || ct === "PrimitiveString") && (isPos || isNeg)) {
|
||||
result.prompt_nodes.push({
|
||||
@@ -1503,12 +1564,14 @@ export const comfyWorkflow = {
|
||||
// has the same width/height/batch_size shape plus a "layers" count, left as-is.
|
||||
if (ct === "EmptyLatentImage" || ct === "EmptySD3LatentImage" || ct === "EmptyFlux2LatentImage"
|
||||
|| ct === "EmptyQwenImageLayeredLatentImage") {
|
||||
result.latent_nodes.push({
|
||||
id, type: ct, title,
|
||||
width: typeof inputs.width === "number" ? inputs.width : undefined,
|
||||
height: typeof inputs.height === "number" ? inputs.height : undefined,
|
||||
batch_size: inputs.batch_size,
|
||||
});
|
||||
if (!hasRefMultiLatent || referencedIds.has(String(id))) {
|
||||
result.latent_nodes.push({
|
||||
id, type: ct, title,
|
||||
width: typeof inputs.width === "number" ? inputs.width : undefined,
|
||||
height: typeof inputs.height === "number" ? inputs.height : undefined,
|
||||
batch_size: inputs.batch_size,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Video latent nodes (Wan2.2's EmptyHunyuanLatentVideo, LTX-2.5's
|
||||
@@ -1758,6 +1821,30 @@ export const comfyWorkflow = {
|
||||
};
|
||||
|
||||
/** Check if a node is display-only (no connected inputs or outputs) */
|
||||
/**
|
||||
* Prompt-enhancer toggle (Qwen Image 2.1 Turbo): the template's subgraph "prompt" port fans out to
|
||||
* both a ComfySwitchNode.on_false (raw text) and TextGenerate.prompt (text fed to the enhancer,
|
||||
* wired to on_true). After flattening these are two independent literals, so editing one in the UI
|
||||
* would leave the other stale. Route both through one shared PrimitiveStringMultiline instead.
|
||||
*/
|
||||
function _unifyPromptEnhancerText(api) {
|
||||
for (const [swId, sw] of Object.entries(api)) {
|
||||
if (sw.class_type !== "ComfySwitchNode" || typeof sw.inputs?.on_false !== "string") continue;
|
||||
const tgRef = sw.inputs.on_true;
|
||||
if (!Array.isArray(tgRef)) continue;
|
||||
const tg = api[String(tgRef[0])];
|
||||
if (tg?.class_type !== "TextGenerate" || tg.inputs.prompt !== sw.inputs.on_false) continue;
|
||||
const primId = `${swId}:wfs_prompt`;
|
||||
api[primId] = {
|
||||
class_type: "PrimitiveStringMultiline",
|
||||
inputs: { value: sw.inputs.on_false },
|
||||
_meta: { title: "Prompt" },
|
||||
};
|
||||
sw.inputs.on_false = [primId, 0];
|
||||
tg.inputs.prompt = [primId, 0];
|
||||
}
|
||||
}
|
||||
|
||||
function _isDisplayOnlyNode(node) {
|
||||
const hasConnectedOutput = node.outputs?.some(o => o.links && o.links.length > 0);
|
||||
const hasConnectedInput = node.inputs?.some(i => i.link != null);
|
||||
|
||||
Reference in New Issue
Block a user