Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a993702d86 | ||
|
|
296f8df4d1 | ||
|
|
091d37fa1a | ||
|
|
ffcc68568c |
@@ -19,3 +19,11 @@ UNSLOTH_API_KEY=
|
||||
# Get a key at https://aistudio.google.com (free tier available).
|
||||
# Same steps as above: copy to ".env", paste the key, restart ComfyUI.
|
||||
GEMINI_API_KEY=
|
||||
|
||||
# ComfyUI-Workflow-Studio - Partner API nodes in GenerateUI (Nano Banana, Kling, Seedream, ...)
|
||||
# A Comfy API key issued at https://platform.comfy.org (separate from the Gemini key above;
|
||||
# usage is billed as Comfy credits). With it set, GenerateUI queues prompts through the plugin
|
||||
# server, which adds the key to the request only when the workflow contains a partner API node.
|
||||
# Same steps as above: copy to ".env", paste the key, restart ComfyUI.
|
||||
|
||||
COMFY_API_KEY=
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
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`)
|
||||
- **v0.8.3(2026-10-13)** — GenerateUI: シードモード「Workflow」を追加(改善候補メモ 2-A)
|
||||
- **v0.8.2(2026-10-12)** — Gallery: セマンティック検索(Gemini Embedding 2 / EmbeddingGemma 2)
|
||||
|
||||
@@ -2,6 +2,91 @@
|
||||
|
||||
---
|
||||
|
||||
## 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 等)の実行に対応
|
||||
|
||||
v0.8.5 で見送った課題。パートナーAPIノードは `/prompt` の `extra_data` に Comfy の認証情報(`auth_token_comfy_org` = ブラウザのログイン、または `api_key_comfy_org` = Comfy APIキー)が必要。ComfyUI 本体の画面は自動で付けるが、WFS の `queuePrompt`(`fetch('/prompt')` 直叩き)は付けないため、GenerateUI からは `Unauthorized: Please login first to use this node.` で失敗していた。
|
||||
|
||||
- **`py/routes/partner_routes.py`(新規)**: `GET /api/wfm/partner/status`(キー設定の有無のみ)、`POST /api/wfm/partner/prompt`(`/prompt` の中継)。`.env` の `COMFY_API_KEY`(prestartup_script.py が python-dotenv で読み込み)が設定されているとき、プロンプトに API ノード(`/object_info` の `api_node: true`、クラスごとにキャッシュ)が含まれる場合だけ `extra_data.api_key_comfy_org` を付与して自 ComfyUI の `/prompt` へ中継し、応答はそのまま返す。クライアントが既に認証情報を付けている場合は上書きしない。キーはブラウザへ出さない。`.env.example` に追記。
|
||||
- **`comfyui-client.js`**: `queuePrompt` は、キー設定あり(`isPartnerKeyConfigured()`、60秒キャッシュ)かつ接続先が同一オリジンのときだけ中継を使う(別サーバーへキーを送らない)。`execution_error` が `Unauthorized` / `login first` のときは、設定方法を案内する文言(`partnerAuthHint`、3言語)を付ける。
|
||||
- **`comfyui-workflow.js`**: `Gemini(Image|NanoBanana)*` ノードの `prompt` 入力を `prompt_nodes`(positive、`textKey: "prompt"`)に追加し、GenerateUI の Prompt タブで編集できるようにした。参考画像は従来どおり Image タブの `LoadImage` 経由。
|
||||
- ヘルプ(`helpGen32`、`index.html` / `i18n.js` 3言語 / `app.js` の `helpIdMap`)、README、サンプルワークフロー `workflows/ws_nano_banana_2_1_t2i.json` を追加。
|
||||
|
||||
### UI形式→API形式の変換: DynamicCombo ノードの `widgets_values` ずれを修正
|
||||
|
||||
Nano Banana 2.1 の UI 形式ワークフローを変換すると値がずれていた(`seed` が `"IMAGE"`、システムプロンプトが `response_modalities` に入る等)。原因は2つで、どちらも修正した。
|
||||
|
||||
1. `_getDynamicComboSubNames` が、選択肢の子入力のうちソケット(`images` = Autogrow、`files` = `GEMINI_INPUT_FILES`)まで `widgets_values` の1枠として数えていた。ウィジェット型の子入力だけを数えるようにした(`_resolveWidgetType` を再利用)。
|
||||
2. `seed` 等の `control_after_generate` 付きウィジェットの直後に入るフロントエンド専用の `"randomize"` 等の1枠を、次のウィジェットが数値型のときしか読み飛ばせなかった(Nano Banana 2.1 は `seed` の次が COMBO の `response_modalities`)。object_info の `control_after_generate` フラグで判定する `_hasControlAfterGenerate` を追加。
|
||||
|
||||
- 検証: ComfyUI 本体のフロントエンドで作ったワークフローの `graphToPrompt()` 出力と、変換結果が完全に一致。実機の保存済み UI 形式ワークフロー301件を修正前後で比較し、300件は変換結果が同一、変化は今回の Nano Banana サンプルのみ。
|
||||
|
||||
### Gallery: `cc_nanobanana` フォルダの画像でもメタデータがあれば Prompt タブを表示
|
||||
|
||||
Comic Creator v1.55.0 で、半自動マンガがネイティブノード経由で生成した画像が `cc_nanobanana` に保存され、PNG に `prompt` / `workflow` が埋め込まれるようになるため。`gallery-tab.js`: 埋め込みワークフローがある画像は `isNanobananaFolderImage` による Prompt タブの非表示を解除する(埋め込みの無い Gemini API 直叩きの画像だけ従来どおり非表示)。
|
||||
|
||||
**実機確認(ComfyUI_5 / ポート8189、v0.40.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)の画像を読めるように
|
||||
|
||||
Comic Creator v1.54.0 で、Nano Banana を ComfyUI ネイティブノード(`GeminiNanoBanana2V2`)経由で生成できるようにした(併用)。この経路の画像は SaveImage により `prompt` / `workflow` が PNG に埋め込まれるため、Workflow Studio 側で通常の ComfyUI 画像として読めるようにした。
|
||||
|
||||
- `metadata-tab.js` / `web/comfyui/node_sets_menu.js`: 自ノードの `prompt` 入力を持つ `Gemini(Image|NanoBanana)*` ノードを、動画ノード(`*ImageToVideo` / `*TextToVideo`)と同じ扱いでプロンプト候補(`texts`)へ追加。`NEGATIVE_PROMPT:` を含む送信全文がそのまま1件として出る(Positive / Negative の分割はしない)。
|
||||
- `extractDiffusionModels`(API形式): Gemini 系ノードの `model` 入力(例: `Gemini Nano Banana 2.1`)をモデル名として表示。
|
||||
- `extractSamplerSettings`: Gemini 系ノードの `seed` を補助ノードとして拾い、設定欄に表示。
|
||||
- 対象は API 形式のみ(DynamicCombo のため UI 形式の `widgets_values` の並びは未確認)。`GenerateUI` のプロンプト編集・実行は対象外。
|
||||
- `cc_nanobanana` フォルダ用の特別扱い(`history.jsonl` 参照・Promptタブ非表示)は、従来の Gemini API 直叩きの画像のため変更なし。ネイティブ経路の出力先は別フォルダ(`cc_nanobanana_native`)なので、この特別扱いに該当せず、埋め込みメタデータが使われる。
|
||||
|
||||
**実機確認(ComfyUI_5 / ポート8189、v0.40.0)**
|
||||
- Comic Creator のネイティブ経路で実際に生成した画像(`cc_nanobanana_native/NB_00001_.png`、848×1264)を `extractAllMetadata` に通し、モデル名(`Gemini Nano Banana 2.1`)・シード・プロンプト(`NEGATIVE_PROMPT:` 付き全文)が取れることを確認。Gallery の一覧・画像メタ取得でも通常の画像として扱われる(`nanobanana` エントリは null)。
|
||||
|
||||
**ネイティブ API ノードの認証について(今回の調査で判明)**
|
||||
- API ノードは `/prompt` の `extra_data` に `auth_token_comfy_org`(ブラウザのログイン)または `api_key_comfy_org`(Comfy APIキー)が必要。ComfyUI 本体の画面は自動で付けるが、Workflow Studio の `queuePrompt`(`fetch('/prompt')` 直叩き)は付けないため、GenerateUI からパートナーAPIノードを実行すると認証エラーになる。今回は対応せず(Comic Creator はサーバー側で `COMFY_API_KEY` を渡す方式で対応)。必要になれば Workflow Studio 側にも同様のサーバー側プロキシが必要。
|
||||
|
||||
## v0.8.4(2026-10-14)
|
||||
|
||||
### ComfyUI v0.40.0 対応: ネイティブ LoRA スタックノード(`LoadLoraModel` / `LoadLoraTextEncoder`)
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
@@ -53,7 +53,7 @@ Setting / Results / Plan JSON sub-panels, Per-column keyframes, Model column —
|
||||
2-column layout, Collapsible sections, Theme selection, Theme customization, Workflows directory, Gallery output directory, Eagle connection, CivitAI Host, CivitAI API Key, Default workflow, Default Checkpoint, VRAM Management (Ollama), Video Playback Volume, Data Management, Text Size, RAW JSON Colors, GenerateUI Model Tab Highlight, Wildcard Integration, G'MIC-Qt Integration, Language
|
||||
|
||||
### Gallery Tab (v0.3.44)
|
||||
Output / ImagePrompt / Style_Catalog / Metadata sub-tabs, Image browser, Folder tree root label, Thumbnail / Table views, Folder management, File operations, Download, MP4 video support, MP4 embedded metadata, WebM support, Embedded metadata reading fixes, Audio support, File conversion, Move To folder filter, Semantic Search, Audio waveform colors, Info tab: dimensions & duration, Multi-select, Image Compare, Prompt search, Server-side filtering, Group management, Thumbnail F button, Favorites, Detail panel, Prompt tab, Nanobanana tab, Workflow viewer, GenUI button, Image Edit button, Send GenUI Image button, Send to LI node button, Send to LV node button, Send CC button, Search clear (✕), Clear all filters (✕ Clear), Workflow auto-save, Output folder configurable, SVG file support, PSD file support, Performance
|
||||
Output / ImagePrompt / Style_Catalog / Metadata sub-tabs, Image browser, Folder tree root label, Thumbnail / Table views, Folder management, File operations, Download, MP4 video support, MP4 embedded metadata, WebM support, Embedded metadata reading fixes, Audio support, File conversion, Move To folder filter, Semantic Search, Audio waveform colors, Info tab: dimensions & duration, Multi-select, Image Compare, Prompt search, Server-side filtering, Group management, Thumbnail F button, Favorites, Detail panel, Prompt tab, Nanobanana tab, Gemini / Nano Banana nodes, Partner API nodes in GenerateUI, Workflow viewer, GenUI button, Image Edit button, Send GenUI Image button, Send to LI node button, Send to LV node button, Send CC button, Search clear (✕), Clear all filters (✕ Clear), Workflow auto-save, Output folder configurable, SVG file support, PSD file support, Performance
|
||||
|
||||
### ImagePrompt Gallery subtab (v0.3.94, renamed from Style/Prompt in v0.3.95)
|
||||
Visual prompt library, 3-column layout, Prompt builder (right pane), Plain-text prompt storage, ponyxlWildcardsVault format support, Seed data importer
|
||||
|
||||
@@ -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
|
||||
@@ -287,6 +291,8 @@ An experimental batch generator: runs the workflow currently loaded in GenerateU
|
||||
- **Detail panel** — view filename, path, tags, groups, and metadata in a slide-out panel; four or five tabs — **Info** / **JSON** / **Groups** / **Prompt** / **Nanobanana** (only for `cc_nanobanana`-folder images, see below)
|
||||
- **Prompt tab** (v0.4.7) — selected by default (the most frequently checked piece of info shouldn't need an extra click); lists every positive/negative prompt candidate found in the embedded workflow with POS/NEG badges, reusing the exact same list→click→full-text UI as the Metadata tab; extracts from the API-format embedding when available rather than the UI-format one, since a workflow with independent top-level and subgraph sampling chains (e.g. Krea-2) can otherwise have some of its prompts missed; hidden entirely for images in the `cc_nanobanana` folder (see Nanobanana tab below), since they carry no embedded ComfyUI workflow to extract a prompt from
|
||||
- **Nanobanana tab** (v0.7.14) — shown only for images in a `cc_nanobanana` folder (written by ComfyUI Comic Creator's Nanobanana tab) that have a matching entry in that folder's `history.jsonl` generation log; shows engine, model, image size, seed, timestamp, and the prompt/negative prompt actually used — the same info is also surfaced in the Metadata tab (see below) when opened from here via the **Metadata** button
|
||||
- **Gemini / Nano Banana nodes** (v0.8.5) — images generated by ComfyUI's native Nano Banana nodes (`GeminiNanoBanana2V2` etc., e.g. via ComfyUI Comic Creator's "ComfyUI native node" engine) are readable like any other ComfyUI image: the Metadata tab and the side-panel I tab show the prompt (in the prompt list, including the appended `NEGATIVE_PROMPT:` text), the model name (under Diffusion Model, e.g. `Gemini Nano Banana 2.1`) and the seed; these images need no history file and are not special-cased like the `cc_nanobanana` folder (API-format workflows only)
|
||||
- **Partner API nodes in GenerateUI** (v0.8.6) — workflows containing ComfyUI's partner API nodes (Nano Banana / Gemini image nodes, etc.) can be run from GenerateUI. These nodes need Comfy credentials in the `/prompt` request's `extra_data`, which ComfyUI's own screen adds automatically but a separate page cannot: add `COMFY_API_KEY=...` (a Comfy API key issued at platform.comfy.org) to the plugin's `.env` and restart ComfyUI. With it set, GenerateUI queues prompts through the plugin server (`/api/wfm/partner/prompt`), which adds the key only when the workflow contains an API node (`api_node` in `/object_info`) and only for this ComfyUI instance; the key never reaches the browser, and usage is billed as Comfy credits. Without a key, an authentication error now shows how to set it up. A Gemini image node's prompt shows in the Prompt tab (reference images go through `LoadImage` in the Image tab); sample: `ws_nano_banana_2_1_t2i`. Also fixed: UI-format → API-format conversion misaligned `widgets_values` for nodes whose DynamicCombo option has socket sub-inputs (Nano Banana 2.1's `images` / `files`) or a widget right after a `control_after_generate` seed; Gallery now shows the Prompt tab for `cc_nanobanana`-folder images that carry embedded metadata (images made through Comic Creator's ComfyUI native node engine)
|
||||
- **Workflow viewer** — Metadata tab displays workflow JSON from PNG embedded data (`prompt` / `workflow` keys) or from workflow saved by the Generate UI tab; **Copy & Send Canvas** button copies the JSON to the clipboard and sends the workflow directly to the ComfyUI canvas (UI and API formats both supported)
|
||||
- **GenUI button** (renamed from "Load GenUI" in v0.5.0 for readability) — loads the embedded ComfyUI workflow from the selected image directly into the GenerateUI tab; shows a warning toast if no workflow is embedded or the format is unsupported; Metadata button is styled green, GenUI button uses the primary accent color
|
||||
- **Image Edit button** — toolbar button; sends the selected image directly to the Image Edit tab as the base layer; PSD files (v0.6.0) are fully decomposed into their original layers instead of being flattened into one image
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
@@ -0,0 +1,107 @@
|
||||
"""Partner (API) node execution support for GenerateUI.
|
||||
|
||||
ComfyUI's partner API nodes (Nano Banana / Gemini, Kling, Seedream, ...) authenticate through the
|
||||
``extra_data`` of the ``/prompt`` request: ``auth_token_comfy_org`` (the browser's Comfy login) or
|
||||
``api_key_comfy_org`` (a Comfy API key issued at platform.comfy.org). ComfyUI's own web UI adds
|
||||
the login token automatically, but Workflow Studio is a separate page that POSTs to ``/prompt`` itself,
|
||||
so such a prompt fails with "Unauthorized: Please login first to use this node."
|
||||
|
||||
When COMFY_API_KEY is set (loaded from the plugin's .env by prestartup_script.py), the frontend
|
||||
queues prompts through this proxy instead. The proxy adds the key to ``extra_data`` — only when the
|
||||
prompt actually contains an API node (``api_node: true`` in /object_info) — and relays the request
|
||||
to the local ComfyUI. The key never reaches the browser. Usage is billed as Comfy credits.
|
||||
"""
|
||||
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
from urllib.parse import quote
|
||||
|
||||
import aiohttp
|
||||
from aiohttp import web
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
_api_node_cache: dict = {} # class_type -> bool (api_node flag); the node set only changes on restart
|
||||
|
||||
|
||||
def _get_comfy_key():
|
||||
"""Return the Comfy API key from the environment (.env), or None."""
|
||||
return os.environ.get("COMFY_API_KEY", "").strip() or None
|
||||
|
||||
|
||||
def _local_base_url() -> str:
|
||||
"""Base URL of this ComfyUI instance (from its --listen / --port launch arguments)."""
|
||||
try:
|
||||
from comfy.cli_args import args as _a
|
||||
port = getattr(_a, "port", None) or 8188
|
||||
host = str(getattr(_a, "listen", "") or "127.0.0.1").split(",")[0].strip()
|
||||
if host in ("", "0.0.0.0", "::"):
|
||||
host = "127.0.0.1"
|
||||
elif ":" in host:
|
||||
host = f"[{host}]"
|
||||
except Exception:
|
||||
host, port = "127.0.0.1", 8188
|
||||
return f"http://{host}:{port}"
|
||||
|
||||
|
||||
async def _is_api_node(sess: aiohttp.ClientSession, base: str, class_type: str) -> bool:
|
||||
if class_type in _api_node_cache:
|
||||
return _api_node_cache[class_type]
|
||||
for attempt in range(2): # /object_info occasionally drops the connection; one retry is enough
|
||||
try:
|
||||
async with sess.get(f"{base}/object_info/{quote(class_type, safe='')}") as r:
|
||||
if r.status == 200:
|
||||
info = await r.json(content_type=None)
|
||||
flag = bool((info.get(class_type) or {}).get("api_node"))
|
||||
_api_node_cache[class_type] = flag
|
||||
return flag
|
||||
break
|
||||
except Exception:
|
||||
if attempt == 1:
|
||||
logger.warning("object_info lookup failed for %s", class_type)
|
||||
return False
|
||||
|
||||
|
||||
def setup_routes(app: web.Application):
|
||||
app.router.add_get("/api/wfm/partner/status", handle_status)
|
||||
app.router.add_post("/api/wfm/partner/prompt", handle_prompt)
|
||||
|
||||
|
||||
async def handle_status(request: web.Request) -> web.Response:
|
||||
"""GET /api/wfm/partner/status - whether a Comfy API key is configured (the key itself is never returned)."""
|
||||
return web.json_response({"configured": _get_comfy_key() is not None})
|
||||
|
||||
|
||||
async def handle_prompt(request: web.Request) -> web.Response:
|
||||
"""POST /api/wfm/partner/prompt - Relay a /prompt request to this ComfyUI, adding the Comfy API key
|
||||
to ``extra_data`` when the prompt contains an API node. The response is passed through unchanged."""
|
||||
try:
|
||||
body = await request.json()
|
||||
except Exception:
|
||||
return web.json_response({"error": {"message": "invalid JSON body"}}, status=400)
|
||||
prompt = body.get("prompt")
|
||||
if not isinstance(prompt, dict):
|
||||
return web.json_response({"error": {"message": "prompt is required"}}, status=400)
|
||||
|
||||
base = _local_base_url()
|
||||
key = _get_comfy_key()
|
||||
try:
|
||||
async with aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(total=120, connect=10)) as sess:
|
||||
if key:
|
||||
extra = body.get("extra_data")
|
||||
extra = extra if isinstance(extra, dict) else {}
|
||||
already = extra.get("auth_token_comfy_org") or extra.get("api_key_comfy_org")
|
||||
if not already:
|
||||
classes = {n.get("class_type") for n in prompt.values() if isinstance(n, dict) and n.get("class_type")}
|
||||
for cls in classes:
|
||||
if await _is_api_node(sess, base, cls):
|
||||
extra["api_key_comfy_org"] = key
|
||||
break
|
||||
body["extra_data"] = extra
|
||||
async with sess.post(f"{base}/prompt", json=body) as r:
|
||||
data = await r.read()
|
||||
return web.Response(status=r.status, body=data, content_type="application/json")
|
||||
except Exception as e:
|
||||
logger.error("partner prompt relay failed: %s", e)
|
||||
return web.json_response({"error": {"message": f"relay failed: {e}"}}, status=502)
|
||||
@@ -99,12 +99,13 @@ class WorkflowStudio:
|
||||
app.router.add_get("/wfm", serve_index_page)
|
||||
|
||||
# API routes
|
||||
from .routes import workflow_routes, settings_routes, ollama_routes, unsloth_routes, eagle_routes, nodes_routes, prompts_routes, models_routes, gallery_routes, wildcard_routes, tagger_routes, gmic_routes, skill_routes, lab_routes, video_routes, vram_routes
|
||||
from .routes import workflow_routes, settings_routes, ollama_routes, unsloth_routes, eagle_routes, nodes_routes, prompts_routes, models_routes, gallery_routes, wildcard_routes, tagger_routes, gmic_routes, skill_routes, lab_routes, video_routes, vram_routes, partner_routes
|
||||
|
||||
workflow_routes.setup_routes(app)
|
||||
settings_routes.setup_routes(app)
|
||||
ollama_routes.setup_routes(app)
|
||||
unsloth_routes.setup_routes(app)
|
||||
partner_routes.setup_routes(app)
|
||||
eagle_routes.setup_routes(app)
|
||||
nodes_routes.setup_routes(app)
|
||||
prompts_routes.setup_routes(app)
|
||||
|
||||
+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.4"
|
||||
version = "0.8.7"
|
||||
license = { file = "LICENSE" }
|
||||
requires-python = ">= 3.10"
|
||||
dependencies = ["jinja2"]
|
||||
|
||||
@@ -492,6 +492,7 @@ function applyI18nToHtml() {
|
||||
"wfm-help-gen-29": "helpGen29",
|
||||
"wfm-help-gen-30": "helpGen30",
|
||||
"wfm-help-gen-31": "helpGen31",
|
||||
"wfm-help-gen-32": "helpGen32",
|
||||
"wfm-help-feeder-title": "helpFeederTitle",
|
||||
"wfm-help-feeder-desc": "helpFeederDesc",
|
||||
"wfm-help-feeder-imgloop-title": "helpFeederImgloopTitle",
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
import { prepareVramForGeneration } from "./vram-prepare.js";
|
||||
import { t } from "./i18n.js";
|
||||
|
||||
function _uuid() {
|
||||
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
||||
@@ -194,6 +195,21 @@ export const comfyUI = {
|
||||
return this._fetchModelList(["KSampler"], "scheduler");
|
||||
},
|
||||
|
||||
// パートナー(API)ノード(Nano Banana等)は /prompt の extra_data にComfyの認証情報が必要。ComfyUI画面は
|
||||
// ログイン情報を自動で付けるが、本アプリの直接fetchは付けないため、サーバー側の COMFY_API_KEY(.env) が
|
||||
// 設定されていれば WFSサーバー経由で投入してキーを付与する(キーはブラウザへ出さない)。
|
||||
async isPartnerKeyConfigured() {
|
||||
const now = Date.now();
|
||||
if (this._partnerKey && now - this._partnerKey.at < 60000) return this._partnerKey.value;
|
||||
let value = false;
|
||||
try {
|
||||
const res = await fetch("/api/wfm/partner/status");
|
||||
if (res.ok) value = !!(await res.json()).configured;
|
||||
} catch { /* 無視 */ }
|
||||
this._partnerKey = { value, at: now };
|
||||
return value;
|
||||
},
|
||||
|
||||
// Generation
|
||||
async queuePrompt(workflow, extraData = null) {
|
||||
// Settings tab "VRAM Management": unload Ollama models to free VRAM (no-op when off, never throws)
|
||||
@@ -203,7 +219,10 @@ export const comfyUI = {
|
||||
client_id: this.clientId,
|
||||
};
|
||||
if (extraData) body.extra_data = extraData;
|
||||
const res = await fetch(`${this.baseUrl}/prompt`, {
|
||||
// 接続先が同一オリジン(このComfyUI)のときだけ中継を使う(別サーバーへキーを送らない)
|
||||
const sameOrigin = !this.baseUrl || this.baseUrl === location.origin;
|
||||
const viaProxy = sameOrigin && await this.isPartnerKeyConfigured();
|
||||
const res = await fetch(viaProxy ? "/api/wfm/partner/prompt" : `${this.baseUrl}/prompt`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(body),
|
||||
@@ -251,7 +270,10 @@ export const comfyUI = {
|
||||
}
|
||||
}
|
||||
if (msg.type === "execution_error" && msg.data?.prompt_id === promptId) {
|
||||
finish(false, new Error(msg.data.exception_message || "Execution error"));
|
||||
let message = msg.data.exception_message || "Execution error";
|
||||
// パートナー(API)ノードの認証エラーには、設定方法を案内する
|
||||
if (/Unauthorized|login first/i.test(message)) message = `${message.trim()} ${t("partnerAuthHint")}`;
|
||||
finish(false, new Error(message));
|
||||
}
|
||||
if (msg.type === "execution_interrupted" && msg.data?.prompt_id === promptId) {
|
||||
finish(false, new Error("Execution interrupted"));
|
||||
|
||||
@@ -172,6 +172,11 @@ function _getWidgetInputTypes(objectInfo, classType) {
|
||||
* presence_penalty under optional — all 7 still occupy a widgets_values slot). Dropping the
|
||||
* optional ones here under-counts how many slots the combo actually consumed, misaligning
|
||||
* every widget declared after it in the node's schema.
|
||||
*
|
||||
* Only sub-fields that are actually widgets count: a sub-field can also be a link socket (e.g. the
|
||||
* Nano Banana 2.1 node's "images" Autogrow group and its "files" GEMINI_INPUT_FILES input), which the
|
||||
* frontend does NOT serialize into widgets_values — counting those would shift every value after
|
||||
* them (seed read as "IMAGE", the system prompt landing in response_modalities, ...).
|
||||
*/
|
||||
function _getDynamicComboSubNames(objectInfo, classType, widgetName, selectedKey) {
|
||||
const info = objectInfo[classType];
|
||||
@@ -179,9 +184,13 @@ function _getDynamicComboSubNames(objectInfo, classType, widgetName, selectedKey
|
||||
const options = spec?.[1]?.options;
|
||||
if (!Array.isArray(options)) return [];
|
||||
const opt = options.find((o) => o.key === selectedKey) || options[0];
|
||||
const isWidget = ([, sub]) => {
|
||||
if (Array.isArray(sub) && sub[1]?.forceInput) return false;
|
||||
return !!_resolveWidgetType(Array.isArray(sub) ? sub[0] : sub, sub);
|
||||
};
|
||||
return [
|
||||
...Object.keys(opt?.inputs?.required || {}),
|
||||
...Object.keys(opt?.inputs?.optional || {}),
|
||||
...Object.entries(opt?.inputs?.required || {}).filter(isWidget).map(([k]) => k),
|
||||
...Object.entries(opt?.inputs?.optional || {}).filter(isWidget).map(([k]) => k),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -192,6 +201,14 @@ function _getDynamicComboSubNames(objectInfo, classType, widgetName, selectedKey
|
||||
*/
|
||||
const _CONTROL_AFTER_GENERATE = new Set(["fixed", "increment", "decrement", "randomize"]);
|
||||
|
||||
// True when the widget's object_info spec declares control_after_generate (seed-style INT widgets):
|
||||
// the frontend then serializes one extra "randomize"/"fixed"/... slot right after the widget's value.
|
||||
function _hasControlAfterGenerate(objectInfo, classType, widgetName) {
|
||||
const info = objectInfo[classType]?.input;
|
||||
const spec = info?.required?.[widgetName] || info?.optional?.[widgetName];
|
||||
return !!(Array.isArray(spec) && spec[1]?.control_after_generate);
|
||||
}
|
||||
|
||||
function _isExtraWidgetValue(val, expectedType) {
|
||||
if (expectedType === "INT" || expectedType === "FLOAT") {
|
||||
// If we expect a number but got a string like "fixed", it's a control widget
|
||||
@@ -441,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];
|
||||
@@ -458,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) {
|
||||
@@ -470,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) {
|
||||
@@ -764,6 +796,16 @@ export const comfyWorkflow = {
|
||||
if (wIdx >= widgets.length) break;
|
||||
const name = widgetNames[nIdx];
|
||||
const expectedType = widgetTypes[nIdx];
|
||||
// A control_after_generate widget (seed etc.) is followed by a frontend-only
|
||||
// "randomize"/"fixed"/... slot even when the next widget is not numeric (e.g.
|
||||
// Nano Banana 2.1: seed -> response_modalities); the type heuristic below only
|
||||
// catches it when the next widget happens to be INT/FLOAT.
|
||||
if (nIdx > 0 && !linkedInputNames.has(widgetNames[nIdx - 1])
|
||||
&& _hasControlAfterGenerate(objectInfo, node.type, widgetNames[nIdx - 1])
|
||||
&& _CONTROL_AFTER_GENERATE.has(widgets[wIdx])) {
|
||||
wIdx++;
|
||||
if (wIdx >= widgets.length) break;
|
||||
}
|
||||
// Skip if this input is already linked
|
||||
if (linkedInputNames.has(name)) {
|
||||
if (!linkedSlotNames.has(name)) {
|
||||
@@ -819,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({
|
||||
@@ -879,6 +929,7 @@ export const comfyWorkflow = {
|
||||
_meta: { title: node.title || node.type },
|
||||
};
|
||||
}
|
||||
_unifyPromptEnhancerText(api);
|
||||
return api;
|
||||
},
|
||||
|
||||
@@ -1109,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.
|
||||
@@ -1141,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.
|
||||
@@ -1165,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;
|
||||
@@ -1435,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({
|
||||
@@ -1457,6 +1545,16 @@ export const comfyWorkflow = {
|
||||
});
|
||||
}
|
||||
|
||||
// Gemini image nodes (Nano Banana etc., partner API nodes) — like the video all-in-one nodes above
|
||||
// they hold their own "prompt" widget (no negative counterpart; the node's reference images
|
||||
// arrive through LoadImage nodes, which GenerateUI's Image tab already handles generically).
|
||||
if (/^Gemini(Image|NanoBanana)/.test(ct) && typeof inputs.prompt === "string") {
|
||||
result.prompt_nodes.push({
|
||||
id, type: ct, title, role: "positive",
|
||||
text: inputs.prompt, textKey: "prompt",
|
||||
});
|
||||
}
|
||||
|
||||
// --- Latent nodes ---
|
||||
// EmptyFlux2LatentImage (Flux.2 templates) often has width/height wired to a
|
||||
// GetImageSize node (auto-follows the reference image) rather than a direct number —
|
||||
@@ -1466,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
|
||||
@@ -1721,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);
|
||||
|
||||
@@ -1082,6 +1082,9 @@ async function loadImageDetail(img) {
|
||||
apiFetch(API.imageWorkflow(img.path)),
|
||||
]);
|
||||
state.embeddedWorkflow = wfRes.has_workflow ? wfRes.workflow : null;
|
||||
// cc_nanobananaフォルダでも、ComfyUIネイティブノード経由(半自動マンガ・Auto等)の画像にはワークフロー/
|
||||
// プロンプトが埋め込まれているため、Promptタブを表示する(埋め込みの無いGemini API直叩きの画像だけ非表示のまま)
|
||||
if (state.embeddedWorkflow && isNanobananaFolderImage(img)) updatePromptTabVisibility(false);
|
||||
renderWorkflowJson(state.embeddedWorkflow);
|
||||
_updateCopyCanvasBtn();
|
||||
renderImagePromptSection(metaRes.image_prompt);
|
||||
|
||||
@@ -927,12 +927,14 @@ const LANGUAGES = {
|
||||
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",
|
||||
helpGen19: "Lora batch: for each LoRA, its syntax (<lora:name:strength_model:strength_clip>) and CivitAI trained words are automatically appended to the Positive prompt — rebuilt from the original prompt each time, not accumulated; the prompt is automatically restored to its pre-batch state when the batch completes or is stopped; if a selected LoRA is not yet recognized by ComfyUI's model list, a warning toast is shown (Refresh or restart ComfyUI)",
|
||||
helpGen20: "Three ways LoRAs are attached: a chain of standard LoraLoader nodes (one LoRA per node — add more by chaining additional nodes), a single Lora Loader (LoraManager) node (from the ComfyUI-Lora-Manager custom node pack) that holds a list of LoRAs internally, each with its own active/model-strength/clip-strength, or ComfyUI's native Load LoRA (Model) + Load LoRA (Text Encoder) node pair (v0.40+; each holds up to 20 rows of LoRA / strength / enabled — the Model node takes Str M, the Text Encoder node takes Str C, and Apply writes both nodes together; API-format workflows only for now, because ComfyUI frontend 1.55.17 cannot add rows to these nodes in its own graph editor); the Single/Stack tabs below adapt automatically depending on which type the target node is",
|
||||
partnerAuthHint: "(Partner API node authentication failed. Add COMFY_API_KEY=... — issued at platform.comfy.org — to the plugin's .env file and restart ComfyUI; or run the workflow from ComfyUI's own screen while logged in to Comfy.)",
|
||||
helpGen21: "Single tab: pick one LoRA + Str M/Str C, then Apply — for a Lora Manager node this replaces its entire internal LoRA list with just this one entry, discarding any others it had; the native Load LoRA nodes likewise have all their rows replaced by this single row",
|
||||
helpGen22: "Stack tab — Use Stack Group checkbox (shown only when a Lora Manager node exists in the workflow): OFF (the default whenever a workflow is loaded) shows and edits the LoRAs actually configured in the workflow's Lora Manager node itself; ON shows and edits the \"Stack\" group registered in the Models tab instead; switching either direction clears the node's LoRA list first, then loads it from the newly selected source; switching back to OFF restores exactly the LoRA list that was present when the workflow was loaded (captured as a snapshot at load time)",
|
||||
helpGen23: "Stack tab controls: each row has an active checkbox and Str M / Str C fields; the header \"Stack\" checkbox toggles all rows at once; the +/- step buttons adjust the strength of all currently active rows together; a \"Showing: LoRAs currently in workflow\" / \"Showing: registered Stack group\" label indicates which source is currently displayed; Apply writes the full list back to the target node and also appends LoRA syntax + CivitAI trigger words to the Positive prompt",
|
||||
helpGen24: "Caution for CLIP Text Encode edit+ (CLIPTextEncodeEditPlus) nodes: when a Lora Manager node's trigger_words output feeds this node's text1 input (RAW/EDIT/front/back modes combine text1 with the editable text_edit field), trigger words are already included automatically at generation time; clicking a LoRA Apply button or turning on Use Stack Group additionally writes LoRA syntax/trigger words into text_edit, duplicating them — leave Use Stack Group off and avoid the LoRA Apply buttons if you want the workflow's original prompt and LoRA composition to stay unmodified",
|
||||
helpGen29: "Bypass button (⛔, in the LoRA column header, next to Refresh Stack group): forces the target LoRA node's strength to 0 — strength_model/strength_clip for a standard LoraLoader, every entry's strength/clipStrength for a Lora Manager node (its LoRA list is kept intact, not replaced), or every row's strength on both native Load LoRA nodes (Model and Text Encoder; rows kept) — without touching the actual ComfyUI node's mode; click again to restore the exact values that were there before toggling; targets whichever node Single/Stack Apply default to (the workflow's Lora Manager node if it has one, else the first LoRA node); clicking a Single or Stack Apply button clears the bypass state so it can't silently reassert itself on a later toggle",
|
||||
helpGen30: "The Save button (right end of the subtab bar) is hidden while the Batch or Lab subtab is active, since those work on workflow copies / their own Plan files rather than the currently loaded workflow; it reappears on Input/Model/Settings/Feeder",
|
||||
helpGen32: "Partner API nodes (Nano Banana / Gemini image nodes, etc.): GenerateUI can run workflows that contain ComfyUI's partner API nodes. These nodes need Comfy credentials in the /prompt request — ComfyUI's own screen adds them automatically, but a separate page cannot — so add COMFY_API_KEY=... (a Comfy API key issued at platform.comfy.org) to the plugin's .env file and restart ComfyUI. With the key set, GenerateUI sends the request through the plugin server, which adds the key only when the workflow contains a partner API node (the key never reaches the browser); usage is billed as Comfy credits. A Gemini image node's prompt appears in the Prompt tab, and its reference images go through LoadImage nodes in the Image tab. Sample: ws_nano_banana_2_1_t2i",
|
||||
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",
|
||||
@@ -2633,12 +2635,14 @@ const LANGUAGES = {
|
||||
helpGen18: "Applyボタンを Alt+Click すると Apply & Generate を1操作で実行 — 対象:Positive Prompt・Checkpoint・KSamplerの各Applyボタン;ワークフローに値を書き込んだ後、即座に生成をキューに追加;対象ノードが存在しない場合は何もしない",
|
||||
helpGen19: "Loraバッチ:各LoRA適用時にLora構文(<lora:名前:strength_model:strength_clip>)とCivitAIトリガーワードをPositiveプロンプトへ自動追加 — 毎回元のプロンプトを起点に再構築するため蓄積しない;バッチ完了・停止後はプロンプトを開始前の状態へ自動復元;選択したLoRAがComfyUIのモデル一覧にまだ認識されていない場合は警告トーストを表示(ComfyUIのRefreshまたは再起動が必要)",
|
||||
helpGen20: "LoRAの接続方式は3通り:標準の LoraLoader ノードをチェーン接続する方式(1ノードにつき1LoRA — 増やすにはノードを追加接続)、単一の Lora Loader (LoraManager) ノード(ComfyUI-Lora-Manager由来のカスタムノード)にLoRA一覧を内部保持する方式(各LoRAごとに有効/モデル強度/CLIP強度を個別管理)、またはComfyUI標準の Load LoRA (Model) と Load LoRA (Text Encoder) のノードペア(v0.40以降。各ノードにLoRA/強度/有効の行を最大20行保持 — Modelノードには Str M、Text Encoderノードには Str C を設定し、Applyは両ノードへ同時に書き込み;現状はAPI形式のワークフローのみ対応 — ComfyUIフロントエンド1.55.17は標準のグラフエディタでこれらのノードに行を追加できないため);下のSingle/Stackタブは対象ノードがどちらのタイプかによって自動的に挙動が変わる",
|
||||
partnerAuthHint: "(パートナーAPIノードの認証に失敗しました。プラグインの .env に COMFY_API_KEY=...(platform.comfy.org で発行)を追加して ComfyUI を再起動してください。ComfyUI 本体の画面でログインして実行する方法もあります)",
|
||||
helpGen21: "Singleタブ:LoRAを1つ選びStr M/Str Cを設定してApply — Lora Managerノードが対象の場合、内部のLoRA一覧を丸ごとこの1件だけに置き換え、既存の他のLoRAは失われる;ComfyUI標準の Load LoRA ノードも同様に、全行がこの1行に置き換わる",
|
||||
helpGen22: "Stackタブ — Use Stack Groupチェックボックス(ワークフロー内にLora Managerノードがある場合のみ表示):OFF(ワークフロー読み込み時の既定)はLora Managerノードに実際に設定されているLoRAをそのまま表示・編集;ONにするとModelsタブに登録済みの「Stack」グループを表示・編集;どちらへの切替もまずノードのLoRA一覧をクリアしてから切替先のソースを読み込む;OFFへ戻すとワークフロー読み込み時点のLoRA一覧(読み込み時にスナップショットとして保存済み)へ正確に復元される",
|
||||
helpGen23: "Stackタブの操作:各行に有効チェックボックスとStr M / Str Cフィールド;ヘッダーの「Stack」チェックボックスで全行を一括切替;上部の+/-ステップボタンで現在有効な全行の強度をまとめて増減;「Showing: LoRAs currently in workflow」/「Showing: registered Stack group」のラベルで現在どちらのソースを表示中か分かる;Applyで対象ノードへ一覧全体を書き込み、同時にLoRA構文とCivitAIトリガーワードをPositiveプロンプトへ追加",
|
||||
helpGen24: "CLIP Text Encode edit+(CLIPTextEncodeEditPlus)ノードを使う場合の注意:Lora Managerノードのtrigger_words出力がこのノードのtext1入力に接続されている構成(RAW/EDIT/front/backモードでtext1と編集可能なtext_editを結合)では、生成時にトリガーワードは既に自動的に反映済み;LoRAのApplyボタンをクリックしたりUse Stack GroupをONにしたりすると、LoRA構文・トリガーワードがtext_editへも追加で書き込まれ二重になる — ワークフロー本来のプロンプト・LoRA構成を変更せず維持したい場合は、Use Stack GroupをOFFのままにしLoRAのApply系ボタンには触れないこと",
|
||||
helpGen29: "バイパスボタン(⛔、LoRA列ヘッダー内、Refresh Stack groupボタンの隣):対象のLoRAノードの強度を強制的に0にします — 通常のLoraLoaderならstrength_model/strength_clip、Lora Managerノードならリスト内の全エントリのstrength/clipStrength(LoRAリスト自体は差し替えず維持)、ComfyUI標準の Load LoRA ノードなら両ノード(Model/Text Encoder)の全行のstrength(行は維持)が対象で、実際のComfyUIノードのmodeには一切触れません;もう一度クリックすると、切り替え前の値に正確に戻ります;対象はSingle/Stack Applyがデフォルトで対象とするノード(ワークフローにLora Managerノードがあればそれ、無ければ最初のLoRAノード);SingleまたはStackのApplyボタンをクリックするとバイパス状態はクリアされ、後から無言で再適用されることはありません",
|
||||
helpGen30: "Saveボタン(サブタブバー右端)は、BatchまたはLabサブタブがアクティブな間は非表示になります — これらは現在読み込み中のワークフロー本体ではなく、ワークフローの複製や独自のPlanファイルを操作するためです。Input/Model/Settings/Feederでは再表示されます",
|
||||
helpGen32: "パートナーAPIノード(Nano Banana/Gemini画像ノードなど):GenerateUIで、ComfyUIのパートナーAPIノードを含むワークフローを実行できます。これらのノードは /prompt リクエストにComfyの認証情報が必要で、ComfyUI本体の画面は自動で付けますが別ページからは付けられないため、プラグインの .env に COMFY_API_KEY=...(platform.comfy.org で発行するComfy APIキー)を追加して ComfyUI を再起動してください。キーを設定すると、GenerateUIはプラグインのサーバー経由でリクエストを送り、ワークフローにパートナーAPIノードがあるときだけキーを付与します(キーはブラウザへは出ません)。課金はComfyクレジットです。Gemini画像ノードのプロンプトはPromptタブに表示され、参考画像はImageタブのLoadImageノード経由で指定します。サンプル: ws_nano_banana_2_1_t2i",
|
||||
helpFeederTitle: "GenerateUI Tab — Feeder サブタブ",
|
||||
helpFeederDesc: "左ペイン上部の [Image Loop] / [Gallery] トグルで2つのモードを切り替えられます。",
|
||||
helpFeederImgloopTitle: "Image Loop モード",
|
||||
@@ -4339,12 +4343,14 @@ const LANGUAGES = {
|
||||
helpGen18: "Alt+单击Apply按钮(Positive Prompt / Checkpoint / KSampler)可一步完成Apply & Generate — 将参数写入工作流后立即排队生成;仅当工作流中存在目标节点时才触发生成",
|
||||
helpGen19: "Lora批处理:应用每个LoRA时,会自动将其语法(<lora:名称:strength_model:strength_clip>)和CivitAI触发词追加到Positive提示词 — 每次都基于原始提示词重新构建,不会累积;批处理完成或停止后提示词会自动恢复到批处理前的状态;若所选LoRA尚未被ComfyUI模型列表识别,会显示警告提示(需在ComfyUI中Refresh或重启)",
|
||||
helpGen20: "LoRA有三种连接方式:链式连接标准 LoraLoader 节点(每个节点1个LoRA — 需要更多则继续串联节点)、使用单个 Lora Loader (LoraManager) 节点(来自ComfyUI-Lora-Manager自定义节点包,内部保存一个LoRA列表,每个LoRA各自管理启用/模型强度/CLIP强度),或使用ComfyUI原生的 Load LoRA (Model) 与 Load LoRA (Text Encoder) 节点对(v0.40及以上;每个节点最多保存20行LoRA/强度/启用 — Model节点使用 Str M,Text Encoder节点使用 Str C,Apply会同时写入两个节点;目前仅支持API格式的工作流 — 因为ComfyUI前端1.55.17无法在其自带图编辑器中为这些节点添加行);下方的Single/Stack标签会根据目标节点类型自动调整行为",
|
||||
partnerAuthHint: "(合作伙伴API节点认证失败。请在插件的 .env 中添加 COMFY_API_KEY=...(在 platform.comfy.org 获取)并重启 ComfyUI;也可以在 ComfyUI 自带界面登录后运行)",
|
||||
helpGen21: "Single标签:选择一个LoRA并设置Str M/Str C后点击Apply — 若目标是Lora Manager节点,则会将其内部LoRA列表整体替换为仅这一项,其余原有LoRA将丢失;ComfyUI原生 Load LoRA 节点同样会将全部行替换为这一行",
|
||||
helpGen22: "Stack标签 — Use Stack Group复选框(仅当工作流中存在Lora Manager节点时显示):OFF(加载工作流时的默认状态)显示并编辑Lora Manager节点中实际配置的LoRA;ON则改为显示并编辑Models标签中已注册的\"Stack\"分组;切换任一方向都会先清空节点的LoRA列表,再从新选择的来源加载;切回OFF会精确恢复为加载工作流那一刻的LoRA列表(加载时已保存快照)",
|
||||
helpGen23: "Stack标签的操作:每行都有启用复选框及Str M / Str C字段;表头的\"Stack\"复选框可一次性切换所有行;顶部的+/-步进按钮可同时调整所有当前启用行的强度;\"Showing: LoRAs currently in workflow\" / \"Showing: registered Stack group\"标签指示当前显示的是哪个来源;点击Apply会将完整列表写回目标节点,并同时将LoRA语法和CivitAI触发词追加到Positive提示词",
|
||||
helpGen24: "使用 CLIP Text Encode edit+(CLIPTextEncodeEditPlus)节点时的注意事项:当Lora Manager节点的trigger_words输出连接到该节点的text1输入时(RAW/EDIT/front/back模式会将text1与可编辑的text_edit字段组合),触发词在生成时已自动包含;此时点击LoRA的Apply按钮或开启Use Stack Group会额外把LoRA语法/触发词写入text_edit,造成重复 — 如果想保持工作流原始的提示词和LoRA配置不被修改,请保持Use Stack Group为OFF,并避免点击LoRA的Apply类按钮",
|
||||
helpGen29: "绕过按钮(⛔,位于LoRA列表头,紧邻Refresh Stack group):将目标LoRA节点的强度强制设为0——普通LoraLoader对应strength_model/strength_clip,Lora Manager节点则对应列表中每一项的strength/clipStrength(LoRA列表本身保持不变,不会被替换),ComfyUI原生 Load LoRA 节点则对应两个节点(Model/Text Encoder)所有行的strength(行保持不变),不会改动实际ComfyUI节点的mode;再次点击可精确恢复切换前的数值;作用于Single/Stack Apply默认所用的节点(工作流中若有Lora Manager节点则用它,否则用第一个LoRA节点);点击Single或Stack的Apply按钮会清除绕过状态,避免其在之后被无声地重新生效",
|
||||
helpGen30: "Save按钮(子标签栏右端)在Batch或Lab子标签处于激活状态时会隐藏,因为它们操作的是工作流副本或各自的Plan文件,而不是当前加载的工作流本身;切换回Input/Model/Settings/Feeder时会重新显示",
|
||||
helpGen32: "合作伙伴API节点(Nano Banana/Gemini图像节点等):GenerateUI可以运行包含ComfyUI合作伙伴API节点的工作流。这些节点需要在 /prompt 请求中携带Comfy认证信息——ComfyUI自带界面会自动添加,独立页面则无法添加——因此请在插件的 .env 中添加 COMFY_API_KEY=...(在 platform.comfy.org 获取的Comfy API密钥)并重启ComfyUI。设置密钥后,GenerateUI会通过插件服务器发送请求,仅当工作流包含合作伙伴API节点时才附加密钥(密钥不会到达浏览器);费用按Comfy积分计算。Gemini图像节点的提示词显示在Prompt标签中,参考图通过Image标签的LoadImage节点指定。示例:ws_nano_banana_2_1_t2i",
|
||||
helpFeederTitle: "GenerateUI Tab — Feeder 子标签",
|
||||
helpFeederDesc: "通过左侧面板顶部的 [图片循环] / [图库] 切换按钮可在两种模式间切换。",
|
||||
helpFeederImgloopTitle: "图片循环模式",
|
||||
|
||||
@@ -201,7 +201,12 @@ function extractDiffusionModels(wf) {
|
||||
if (!wf || typeof wf !== "object") return [];
|
||||
const UNET_TYPES = new Set(["UNETLoader", "UnetLoaderGGUF", "UNETLoaderGGUF"]);
|
||||
if (Array.isArray(wf.nodes)) return collectUnique(collectAllNodes(wf).filter(n => UNET_TYPES.has(n.type)).map(n => n.widgets_values?.[0]));
|
||||
return collectUnique(Object.values(wf).filter(n => UNET_TYPES.has(n?.class_type)).map(n => n.inputs?.unet_name));
|
||||
// Gemini系の画像生成ノード(Nano Banana等、API形式)は"model"入力がモデル名(例: "Gemini Nano Banana 2.1")
|
||||
const isGeminiImage = (ct) => /^Gemini(Image|NanoBanana)/.test(ct ?? "");
|
||||
return collectUnique([
|
||||
...Object.values(wf).filter(n => UNET_TYPES.has(n?.class_type)).map(n => n.inputs?.unet_name),
|
||||
...Object.values(wf).filter(n => isGeminiImage(n?.class_type)).map(n => typeof n.inputs?.model === "string" ? n.inputs.model : undefined),
|
||||
]);
|
||||
}
|
||||
function extractTextEncoders(wf) {
|
||||
if (!wf || typeof wf !== "object") return [];
|
||||
@@ -300,6 +305,11 @@ function extractSamplerSettings(apiWf) {
|
||||
// 補助ノードから不足分を補う。
|
||||
const AUX = {
|
||||
RandomNoise: ["noise_seed"],
|
||||
// Gemini系の画像生成ノード(Nano Banana等)はseedのみ(GeminiへはseedではなくComfyUIのキャッシュキーとして働く)
|
||||
GeminiImageNode: ["seed"],
|
||||
GeminiImage2Node: ["seed"],
|
||||
GeminiNanoBanana2: ["seed"],
|
||||
GeminiNanoBanana2V2: ["seed"],
|
||||
BasicScheduler: ["steps", "scheduler", "denoise"],
|
||||
KSamplerSelect: ["sampler_name"],
|
||||
CFGGuider: ["cfg"],
|
||||
@@ -613,7 +623,8 @@ function extractPromptsAPI(wf) {
|
||||
// MiniMaxH3ImageToVideo等の動画生成オールインワンノード。CLIPTextEncode等を経由せず
|
||||
// 自ノードの"prompt"入力に直接テキストを持つ(positive/negativeの区別も無い)ため、
|
||||
// isTextEncoderNode判定を通さずtextMapへ直接投入する(fallbackのtextsに載る)。
|
||||
if (typeof n.inputs?.prompt === "string" && /ImageToVideo|TextToVideo/i.test(ct)) {
|
||||
// Gemini系の画像生成ノード(Nano Banana等)も同様に自ノードの"prompt"入力を持つ。
|
||||
if (typeof n.inputs?.prompt === "string" && /ImageToVideo|TextToVideo|^Gemini(Image|NanoBanana)/i.test(ct)) {
|
||||
textMap.set(id, n.inputs.prompt);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1431,6 +1431,7 @@
|
||||
<li id="wfm-help-gen-31">LTX-2.5 and Wan2.2 video workflows also work when loaded as regular workflows in this tab (not just the dedicated Video tab): Positive/Negative Prompt detection follows LTX-2.5's LTXVDualCFGGuider / LTXVConditioning nodes to find the actual prompt text, and the Settings tab's Latent Image section recognizes Wan2.2's EmptyHunyuanLatentVideo and LTX-2.5's EmptyLTXVLatentVideo nodes (with an added Length (frames) field) instead of showing "No EmptyLatentImage node found"; generating from these workflows also gets the same extended timeout as MiniMax H3 video generations</li>
|
||||
<li id="wfm-help-gen-7">Raw JSON always visible in the right column of each tab — edit directly and Apply to reload the workflow; if the loaded workflow has Bypass or Mute nodes, a note listing them appears above the search bar (Bypass nodes are excluded with their wires reconnected around them; Mute nodes are excluded with no reconnection, matching ComfyUI itself); the search bar highlights matches and scrolls to them without moving the cursor into the editor, so typing right after a search can't accidentally overwrite the JSON — click into the editor first to actually edit</li>
|
||||
<li id="wfm-help-gen-30">The <b>Save</b> button (right end of the subtab bar) is hidden while the <b>Batch</b> or <b>Lab</b> subtab is active, since those work on workflow copies / their own Plan files rather than the currently loaded workflow; it reappears on Input/Model/Settings/Feeder</li>
|
||||
<li id="wfm-help-gen-32"><b>Partner API nodes</b> (Nano Banana / Gemini image nodes, etc.): GenerateUI can run workflows that contain ComfyUI's partner API nodes. These nodes need Comfy credentials in the /prompt request — ComfyUI's own screen adds them automatically, but a separate page cannot — so add <code>COMFY_API_KEY=...</code> (a Comfy API key issued at platform.comfy.org) to the plugin's .env file and restart ComfyUI. With the key set, GenerateUI sends the request through the plugin server, which adds the key only when the workflow contains a partner API node (the key never reaches the browser); usage is billed as Comfy credits. A Gemini image node's prompt appears in the Prompt tab, and its reference images go through LoadImage nodes in the Image tab. Sample: ws_nano_banana_2_1_t2i</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="wfm-help-card">
|
||||
|
||||
@@ -3214,7 +3214,12 @@ function _extractDiffusionModels(wf) {
|
||||
if (!wf || typeof wf !== "object") return [];
|
||||
const _UNET_TYPES = new Set(["UNETLoader", "UnetLoaderGGUF", "UNETLoaderGGUF"]);
|
||||
if (Array.isArray(wf.nodes)) return _collectUnique(_collectAllNodes(wf).filter(n => _UNET_TYPES.has(n.type)).map(n => n.widgets_values?.[0]));
|
||||
return _collectUnique(Object.values(wf).filter(n => _UNET_TYPES.has(n?.class_type)).map(n => n.inputs?.unet_name));
|
||||
// Gemini系の画像生成ノード(Nano Banana等、API形式)は"model"入力がモデル名(例: "Gemini Nano Banana 2.1")
|
||||
const _isGeminiImage = (ct) => /^Gemini(Image|NanoBanana)/.test(ct ?? "");
|
||||
return _collectUnique([
|
||||
...Object.values(wf).filter(n => _UNET_TYPES.has(n?.class_type)).map(n => n.inputs?.unet_name),
|
||||
...Object.values(wf).filter(n => _isGeminiImage(n?.class_type)).map(n => typeof n.inputs?.model === "string" ? n.inputs.model : undefined),
|
||||
]);
|
||||
}
|
||||
function _extractTextEncoders(wf) {
|
||||
if (!wf || typeof wf !== "object") return [];
|
||||
@@ -3537,7 +3542,8 @@ function _extractPromptsAPI(wf) {
|
||||
// MiniMaxH3ImageToVideo等の動画生成オールインワンノード。CLIPTextEncode等を経由せず
|
||||
// 自ノードの"prompt"入力に直接テキストを持つ(positive/negativeの区別も無い)ため、
|
||||
// _isTextEncoderNode判定を通さずtextMapへ直接投入する(fallbackのtextsに載る)。
|
||||
if (typeof n.inputs?.prompt === "string" && /ImageToVideo|TextToVideo/i.test(ct)) {
|
||||
// Gemini系の画像生成ノード(Nano Banana等)も同様に自ノードの"prompt"入力を持つ。
|
||||
if (typeof n.inputs?.prompt === "string" && /ImageToVideo|TextToVideo|^Gemini(Image|NanoBanana)/i.test(ct)) {
|
||||
textMap.set(id, n.inputs.prompt);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,246 @@
|
||||
{
|
||||
"id": "ws-nano-banana-2-1-t2i",
|
||||
"revision": 0,
|
||||
"last_node_id": 2,
|
||||
"last_link_id": 1,
|
||||
"nodes": [
|
||||
{
|
||||
"id": 1,
|
||||
"type": "GeminiNanoBanana2V2",
|
||||
"pos": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"size": [
|
||||
400,
|
||||
398
|
||||
],
|
||||
"flags": {},
|
||||
"order": 0,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"localized_name": "prompt",
|
||||
"name": "prompt",
|
||||
"type": "STRING",
|
||||
"widget": {
|
||||
"name": "prompt"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"localized_name": "aspect_ratio",
|
||||
"name": "model.aspect_ratio",
|
||||
"type": "COMBO",
|
||||
"widget": {
|
||||
"name": "model.aspect_ratio"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"localized_name": "resolution",
|
||||
"name": "model.resolution",
|
||||
"type": "COMBO",
|
||||
"widget": {
|
||||
"name": "model.resolution"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"localized_name": "thinking_level",
|
||||
"name": "model.thinking_level",
|
||||
"type": "COMBO",
|
||||
"widget": {
|
||||
"name": "model.thinking_level"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"localized_name": "image_1",
|
||||
"name": "model.images.image_1",
|
||||
"shape": 7,
|
||||
"type": "IMAGE",
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"localized_name": "files",
|
||||
"name": "model.files",
|
||||
"shape": 7,
|
||||
"type": "GEMINI_INPUT_FILES",
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"localized_name": "model",
|
||||
"name": "model",
|
||||
"type": "COMFY_DYNAMICCOMBO_V3",
|
||||
"widget": {
|
||||
"name": "model"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"localized_name": "seed",
|
||||
"name": "seed",
|
||||
"type": "INT",
|
||||
"widget": {
|
||||
"name": "seed"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"localized_name": "response_modalities",
|
||||
"name": "response_modalities",
|
||||
"type": "COMBO",
|
||||
"widget": {
|
||||
"name": "response_modalities"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"localized_name": "system_prompt",
|
||||
"name": "system_prompt",
|
||||
"shape": 7,
|
||||
"type": "STRING",
|
||||
"widget": {
|
||||
"name": "system_prompt"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"localized_name": "temperature",
|
||||
"name": "temperature",
|
||||
"shape": 7,
|
||||
"type": "FLOAT",
|
||||
"widget": {
|
||||
"name": "temperature"
|
||||
},
|
||||
"link": null
|
||||
},
|
||||
{
|
||||
"localized_name": "top_p",
|
||||
"name": "top_p",
|
||||
"shape": 7,
|
||||
"type": "FLOAT",
|
||||
"widget": {
|
||||
"name": "top_p"
|
||||
},
|
||||
"link": null
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"localized_name": "IMAGE",
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"links": [
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"localized_name": "STRING",
|
||||
"name": "STRING",
|
||||
"type": "STRING",
|
||||
"links": null
|
||||
},
|
||||
{
|
||||
"localized_name": "thought_image",
|
||||
"name": "thought_image",
|
||||
"type": "IMAGE",
|
||||
"links": null
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "GeminiNanoBanana2V2"
|
||||
},
|
||||
"widgets_values": [
|
||||
"a cute watercolor illustration of a red fox in a forest",
|
||||
"Gemini Nano Banana 2.1",
|
||||
"auto",
|
||||
"1K",
|
||||
"MEDIUM",
|
||||
42,
|
||||
"randomize",
|
||||
"IMAGE",
|
||||
"You are an expert image-generation engine. You must ALWAYS produce an image.\nInterpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition.\nIf a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept.\nPrioritize generating the visual representation above any text, formatting, or conversational requests.",
|
||||
1,
|
||||
0.95
|
||||
],
|
||||
"color": "#432",
|
||||
"bgcolor": "#653",
|
||||
"title": "Nano Banana 2.1"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"type": "SaveImage",
|
||||
"pos": [
|
||||
700,
|
||||
100
|
||||
],
|
||||
"size": [
|
||||
270,
|
||||
58
|
||||
],
|
||||
"flags": {},
|
||||
"order": 1,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"localized_name": "images",
|
||||
"name": "images",
|
||||
"type": "IMAGE",
|
||||
"link": 1
|
||||
},
|
||||
{
|
||||
"localized_name": "filename_prefix",
|
||||
"name": "filename_prefix",
|
||||
"type": "STRING",
|
||||
"widget": {
|
||||
"name": "filename_prefix"
|
||||
},
|
||||
"link": null
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"localized_name": "images",
|
||||
"name": "images",
|
||||
"type": "IMAGE",
|
||||
"links": null
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "SaveImage"
|
||||
},
|
||||
"widgets_values": [
|
||||
"nano_banana"
|
||||
],
|
||||
"widgets_values_named": {
|
||||
"filename_prefix": "ComfyUI"
|
||||
}
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
[
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
"IMAGE"
|
||||
]
|
||||
],
|
||||
"groups": [],
|
||||
"config": {},
|
||||
"extra": {
|
||||
"bvSmartPipeRootId": "fab0b8d3-84d9-402b-a229-8e739ac71670",
|
||||
"bvSmartPipeRoutes": {},
|
||||
"ds": {
|
||||
"scale": 1.0545043882575544,
|
||||
"offset": [
|
||||
944.7666109676784,
|
||||
628.4452835934753
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": 0.4
|
||||
}
|
||||
Reference in New Issue
Block a user