Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4298fd9ea2 | ||
|
|
b8b4a65881 |
@@ -1,5 +1,151 @@
|
||||
# DEVLOG - ComfyUI-Workflow-Studio
|
||||
|
||||
## 2026-05-17: v0.3.11 Metadata タブ対応ノードタイプ拡張 / Settings テキストサイズ UI 追加
|
||||
|
||||
### 概要
|
||||
|
||||
- `metadata-tab.js`(Metadata タブ本体)に `UnetLoaderGGUF` / `UNETLoaderGGUF` / `QuadrupleCLIPLoader` 対応を追加
|
||||
- `node_sets_menu.js` の I タブには v0.3.10 で追加済みだったが、Metadata タブには未反映だった
|
||||
- Settings タブに「Text Size」セクションを追加 — プロンプト・チャット系の全テキストエリアのフォントサイズを一括変更するスライダー
|
||||
|
||||
### 変更内容
|
||||
|
||||
#### `static/js/metadata-tab.js`
|
||||
|
||||
**`extractDiffusionModels` 拡張**
|
||||
|
||||
- `UNETLoader` のみ → `UNETLoader` / `UnetLoaderGGUF` / `UNETLoaderGGUF` に拡張(Set を使った判定に変更)
|
||||
- HiDream i1 Full GGUF など GGUF 形式の Diffusion Model が Metadata タブでも正しく読み取れるようになった
|
||||
|
||||
**`extractTextEncoders` 拡張**
|
||||
|
||||
- `QuadrupleCLIPLoader`(`clip_name1`〜`clip_name4`)を追加、LiteGraph 形式・API 形式の両方に対応
|
||||
- HiDream の 4-CLIP(clip_l / clip_g / t5xxl / llama_3.1)が全件表示されるようになった
|
||||
|
||||
#### `static/js/settings-tab.js`
|
||||
|
||||
**`applyTextareaFontSize(size)` 追加(export)**
|
||||
|
||||
- `<style id="wfm-ta-font-size-style">` を `<head>` に注入
|
||||
- 対象セレクタ(対象を 8 箇所に一括適用):
|
||||
|
||||
| 対象 | ID |
|
||||
|---|---|
|
||||
| Generate UI — Positive Prompt | `#wfm-prompt-pos-text` |
|
||||
| Generate UI — Negative Prompt | `#wfm-prompt-neg-text` |
|
||||
| Prompt タブ — AI Assistant チャット | `#wfm-ollama-input` |
|
||||
| Prompt タブ — Preset Positive | `#wfm-preset-pos` |
|
||||
| Prompt タブ — Preset Negative | `#wfm-preset-neg` |
|
||||
| Prompt タブ — Wildcard プロンプト | `#wfm-wc-prompt` |
|
||||
| Prompt タブ — Wildcard ファイルエディタ | `#wfm-wc-editor-content` |
|
||||
| Metadata タブ — PROMPT 全文プレビュー | `#wfm-meta-prompt-full` |
|
||||
|
||||
- 範囲: 10〜28px(clamp)、デフォルト 13px
|
||||
|
||||
**Settings タブ HTML「Text Size」セクション追加**
|
||||
|
||||
- Language Settings の下、Workflow Data Folder の上に新規 `<details>` セクション
|
||||
- `<input type="range">` スライダー (min=10, max=28, step=1) + px 値表示
|
||||
- スライダー操作でリアルタイム適用
|
||||
- 「Save Settings」ボタンで `textareaFontSize` を localStorage に保存
|
||||
|
||||
#### `static/js/app.js`
|
||||
|
||||
- `applyTextareaFontSize` をインポート
|
||||
- ページ読み込み直後(テーマ適用と同タイミング)に localStorage の保存値を読み込んで適用
|
||||
|
||||
#### `templates/index.html`
|
||||
|
||||
- `wfm-help-metadata-5`: 対応ローダーを明記(UNETLoader / UnetLoaderGGUF / UNETLoaderGGUF / CLIPLoader / DualCLIPLoader / TripleCLIPLoader / QuadrupleCLIPLoader)
|
||||
- `wfm-help-settings-11` 新規追加: Text Size スライダーの説明
|
||||
|
||||
### 検証済みファイル
|
||||
|
||||
| ファイル | Metadata タブでの検出内容 |
|
||||
|---|---|
|
||||
| `n-hidream_i1_full.png` | Diffusion Model: `hidream-i1-full-Q5_0.gguf`(UnetLoaderGGUF)、Text Encoder: 4 件(QuadrupleCLIPLoader)、VAE: 1 件 |
|
||||
|
||||
---
|
||||
|
||||
## 2026-05-17: v0.3.10 Information タブ キャンバスドラッグ対応 / ノードタイプ拡張 / バグ修正
|
||||
|
||||
### 概要
|
||||
|
||||
- サイドパネル I タブ(model / lora / Prompts)からキャンバスへのドラッグ&ドロップでノードを配置できるようにした
|
||||
- Multiple LORA セクションの追加(全 LoRA を Lora Loader (LoraManager) に一括配置)
|
||||
- `UnetLoaderGGUF` / `QuadrupleCLIPLoader` 対応(HiDream 等の GGUF / 4-CLIP ワークフロー)
|
||||
- `CLIPLoader` のウィジェット名誤りを修正
|
||||
- プレビューエリアの高さを固定し、モデル/プロンプトリストが潰れる問題を修正
|
||||
|
||||
### 変更内容
|
||||
|
||||
#### `web/comfyui/node_sets_menu.js`
|
||||
|
||||
**キャンバスドラッグ対応(新規)**
|
||||
|
||||
- `placeClipTextEncodeNode(text, pos)` 追加 — `CLIPTextEncode` ノードをテキスト入力済みで配置
|
||||
- `placeLoraMgrNode(loras, pos)` 追加 — `Lora Loader (LoraManager)` ノードを全 LoRA データ付きで配置
|
||||
- キャンバスドロップハンドラに新 MIME タイプを追加:
|
||||
- `application/x-wfm-lora-multi` → `placeLoraMgrNode`
|
||||
- `application/x-wfm-clip-text` → `placeClipTextEncodeNode`
|
||||
|
||||
**`renderInfoModels` 更新**
|
||||
|
||||
- 各セクションに `modelType`(`checkpoint` / `vae` / `unet` / `textencoder`)を追加
|
||||
- アイテムを `draggable = true` に設定、`dragstart` で `application/x-wfm-model` を送信
|
||||
- ダブルクリックで `placeModelNode` 呼び出し
|
||||
|
||||
**`renderInfoLoras` 更新**
|
||||
|
||||
- 各 LoRA アイテムを `draggable = true` に設定、`dragstart` で `application/x-wfm-model`(type: `"lora"`)を送信
|
||||
- ダブルクリックで `placeModelNode` 呼び出し
|
||||
- **Multiple LORA セクション追加** — LoRA が 1 件以上あれば下部に表示
|
||||
- `application/x-wfm-lora-multi` で全 LoRA データを転送
|
||||
- ダブルクリックで `placeLoraMgrNode` 呼び出し
|
||||
|
||||
**`renderInfoPrompts` 更新**
|
||||
|
||||
- 各プロンプトアイテムを `draggable = true` に設定、`dragstart` で `application/x-wfm-clip-text` を送信
|
||||
- ダブルクリックで `placeClipTextEncodeNode` 呼び出し
|
||||
|
||||
**`_extractDiffusionModels` 更新**
|
||||
|
||||
- `UNETLoader` のみ → `UNETLoader` / `UnetLoaderGGUF` / `UNETLoaderGGUF` に拡張(GGUF 形式対応)
|
||||
|
||||
**`_extractTextEncoders` 更新**
|
||||
|
||||
- `QuadrupleCLIPLoader`(`clip_name1`〜`clip_name4`)を追加(HiDream 等 4-CLIP モデル対応)
|
||||
- LiteGraph 形式・API 形式の両方に対応
|
||||
|
||||
**バグ修正: `MODEL_NODE_MAP` の `textencoder` ウィジェット名**
|
||||
|
||||
- `clip_name1`(DualCLIPLoader のウィジェット名)→ `clip_name`(CLIPLoader の正しいウィジェット名)に修正
|
||||
- これにより Text Encoder ドラッグ時に正しいモデルファイル名が設定される
|
||||
|
||||
**プレビューエリア高さ固定**
|
||||
|
||||
- `.wfm-nlp-info-drop` を `min-height: 54px`(可変)→ `height: 110px`(固定)に変更
|
||||
- 大きな画像ロード時にモデル/プロンプトリストが圧迫される問題を解消
|
||||
|
||||
**CSS 追加**
|
||||
|
||||
- `.wfm-nlp-info-item--draggable` — `cursor: grab`、ホバー背景、ドラッグ中 `opacity: 0.5`
|
||||
- `.wfm-nlp-info-prompt-item` — `cursor: pointer` → `cursor: grab` に変更、`user-select: none` 追加
|
||||
|
||||
**ヘルプ更新**
|
||||
|
||||
- `index.html`: `wfm-help-sidepanel-13` 更新、`wfm-help-sidepanel-14` / `15` 新規追加
|
||||
- `app.js`: i18n マッピングに `14` / `15` 追加
|
||||
- `i18n.js`: EN / JA / ZH 3 言語すべてに `helpSidepanel13` 更新と `helpSidepanel14` / `15` 追加
|
||||
|
||||
### 対応確認済みワークフロー
|
||||
|
||||
| ファイル | 検出内容 |
|
||||
|---|---|
|
||||
| `non-hidream_i1_full.png` | Diffusion Model: `hidream-i1-full-Q5_0.gguf`(UnetLoaderGGUF)、Text Encoder: 4 件(QuadrupleCLIPLoader)、VAE: 1 件 |
|
||||
|
||||
---
|
||||
|
||||
## 2026-05-16: v0.3.9 サイドパネル I タブ追加 / トップバーアイコン修正
|
||||
|
||||
### 概要
|
||||
|
||||
@@ -5,7 +5,7 @@ A comprehensive workflow management and generation UI plugin for [ComfyUI](https
|
||||
Browse, organize, and execute workflows directly from a dedicated studio interface — without switching between windows or manually editing JSON.
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## Screenshots
|
||||
|
||||
@@ -95,7 +95,7 @@ Requires the **[comfyui-image-feeder](https://github.com/ketle-man/comfyui-image
|
||||
### Metadata Tab (v0.3.8)
|
||||
- **3-column layout** — Drop zone (left) | Model info (center) | LoRA + Prompt (right)
|
||||
- **File drop** — drop a ComfyUI-generated PNG / WebP or workflow JSON onto the drop zone (or click to open a file picker); PNG/WebP images are shown as a preview
|
||||
- **Model extraction** — automatically extracts Checkpoint, VAE, Diffusion Model, and Text Encoder names from the workflow; supports both standard and subgraph-based workflows (Flux.2 Dev/Klein, Qwen-Image-Edit/2511/Layered, Z-Image Base/Turbo, Ernie Image, WAN2.2)
|
||||
- **Model extraction** — automatically extracts Checkpoint, VAE, Diffusion Model, and Text Encoder names from the workflow; supports both standard and subgraph-based workflows (Flux.2 Dev/Klein, Qwen-Image-Edit/2511/Layered, Z-Image Base/Turbo, Ernie Image, WAN2.2); node types covered: UNETLoader, UnetLoaderGGUF, UNETLoaderGGUF (e.g. HiDream GGUF), CLIPLoader, DualCLIPLoader, TripleCLIPLoader, QuadrupleCLIPLoader (e.g. HiDream 4-CLIP)
|
||||
- **LoRA extraction** — lists all LoRA models with `strength_model / strength_clip` values
|
||||
- **Prompt extraction** — lists prompts with POS / NEG badges when positive/negative can be determined; when distinction is not possible (e.g. `SamplerCustomAdvanced`, intermediate nodes, cross-level connections), prompts are shown without a badge as plain **Text**; click any entry to view the full text below
|
||||
- **Prompt actions** — Copy to clipboard, **GenUI:P/N** (set GenerateUI positive/negative prompt), **Prompt:P/N** (set Prompt tab preset positive/negative)
|
||||
@@ -113,6 +113,7 @@ Requires the **[comfyui-image-feeder](https://github.com/ketle-man/comfyui-image
|
||||
- **Ollama connection** — configure Ollama server URL
|
||||
- **Default workflow** — set a workflow to auto-load on startup
|
||||
- **Data Management** — export all plugin data (settings, metadata, prompts, etc.) to a single JSON file; import to restore data (useful when migrating or reinstalling)
|
||||
- **Text Size** — one slider (10–28 px) adjusts font size for all prompt and chat textareas at once: Generate UI positive/negative prompts, AI Assistant chat input, Preset prompts, Wildcard prompt and file editor, and Metadata prompt full preview; takes effect immediately and saved with Save Settings
|
||||
- **Wildcard Integration** — link the WFS wildcard directory to ComfyUI-Impact-Pack's `wildcards/` directory (directory junction on Windows, symlink on other OS); existing WFS wildcard files are automatically migrated; requires [ComfyUI-Impact-Pack](https://github.com/ltdrdata/ComfyUI-Impact-Pack)
|
||||
- **Language** — English / Japanese / Chinese
|
||||
|
||||
@@ -163,10 +164,10 @@ Requires the **[comfyui-image-feeder](https://github.com/ketle-man/comfyui-image
|
||||
- **Package sub-tab** — dropdown to filter nodes by custom node package name
|
||||
- **M — Models tab** — browse installed models (All / ★ Favorites / Groups / By Type sub-tabs)
|
||||
- **P — Prompts tab** — browse prompt presets with All / Favorites / Categories sub-tabs
|
||||
- **I — Information tab** — drop a ComfyUI-generated PNG/WebP or workflow JSON directly in the side panel to view its metadata without leaving the ComfyUI canvas
|
||||
- **model sub-tab** — Checkpoint, VAE, Diffusion Model, and Text Encoder extracted from the workflow
|
||||
- **lora sub-tab** — LoRA names with `strength_model / strength_clip` values
|
||||
- **Prompts sub-tab** — POS / NEG badge list; click any entry to view full text + Copy button
|
||||
- **I — Information tab** — drop a ComfyUI-generated PNG/WebP or workflow JSON in the side panel to view its metadata; supports `UnetLoaderGGUF` and `QuadrupleCLIPLoader` node types; preview area fixed at 110px
|
||||
- **model sub-tab** — Checkpoint, VAE, Diffusion Model, and Text Encoder; drag items to canvas to place the corresponding loader node (Checkpoint → `CheckpointLoaderSimple`, VAE → `VAELoader`, Diffusion Model → `UNETLoader`, Text Encoder → `CLIPLoader`); double-click also places at canvas center
|
||||
- **lora sub-tab** — LoRA names with `strength_model / strength_clip` values; drag individual LoRA to place `LoraLoader`; **Multiple LORA** section (appears for 1+ LoRAs) drags all LoRAs into a single `Lora Loader (LoraManager)` node
|
||||
- **Prompts sub-tab** — POS / NEG badge list; drag a prompt to place `CLIPTextEncode` with text pre-filled; click any entry to view full text + Copy button
|
||||
- **Drag & drop workflows** — drag a workflow onto the canvas to load it
|
||||
- **Drag & drop nodes** — drag nodes/node sets onto the canvas to place them
|
||||
- **Drag & drop prompts** — drag a preset onto the canvas to create a WFS_PromptText node with positive/negative prompts
|
||||
@@ -250,6 +251,19 @@ Click the **camera icon** (next to the W button) in ComfyUI's top bar to capture
|
||||
|
||||
## Changelog
|
||||
|
||||
### v0.3.11
|
||||
- **Metadata Tab — extended loader support** — `metadata-tab.js` now recognizes `UnetLoaderGGUF` and `UNETLoaderGGUF` as Diffusion Model (e.g. HiDream GGUF workflows), and `QuadrupleCLIPLoader` as Text Encoder (e.g. HiDream 4-CLIP); previously these were detected only in the side panel I tab, not in the Metadata tab itself
|
||||
- **Settings Tab — Text Size** — new slider (10–28 px) in the Settings tab adjusts font size for all prompt and chat text areas at once: Generate UI positive/negative prompts, AI Assistant chat input, Preset prompts, Wildcard text area and file editor, and Metadata prompt full preview; applied immediately on drag and persisted with Save Settings
|
||||
|
||||
### v0.3.10
|
||||
- **Information tab — drag to canvas** — model, lora, and Prompts sub-tabs in the side panel I tab now support drag & drop onto the ComfyUI canvas; double-click also places nodes at canvas center
|
||||
- model sub-tab: each item places the corresponding loader node (Checkpoint → `CheckpointLoaderSimple`, VAE → `VAELoader`, Diffusion Model → `UNETLoader`, Text Encoder → `CLIPLoader`)
|
||||
- lora sub-tab: drag individual LoRA to place `LoraLoader`; **Multiple LORA** section (shown for 1+ LoRAs) places all LoRAs in a single `Lora Loader (LoraManager)` node
|
||||
- Prompts sub-tab: drag a prompt to place `CLIPTextEncode` with the full text pre-filled
|
||||
- **Extended node type support** — `UnetLoaderGGUF` / `UNETLoaderGGUF` now detected as Diffusion Model; `QuadrupleCLIPLoader` (HiDream and similar 4-CLIP workflows) now detected as Text Encoder
|
||||
- **Bug fix: CLIPLoader widget name** — `textencoder` type in `MODEL_NODE_MAP` was incorrectly using `clip_name1` (DualCLIPLoader's widget) instead of `clip_name`; Text Encoder models now drop with the correct filename
|
||||
- **Preview area fixed height** — Information tab drop zone fixed at 110px so model/prompt lists are no longer compressed when a large image is loaded
|
||||
|
||||
### v0.3.9
|
||||
- **Side panel I tab** — new Information tab in the Workflow Studio Library side panel; drop a ComfyUI PNG/WebP/JSON directly in the panel to inspect models, LoRAs, and prompts without opening the Metadata tab; sub-tabs: model / lora / Prompts with full-text preview and Copy button
|
||||
- **Side panel tab redesign** — tabs shortened to single letters (W / N / P / M / I) with full name shown on hover
|
||||
|
||||
+8
-1
@@ -307,6 +307,7 @@ function applyI18nToHtml() {
|
||||
"wfm-help-sidepanel-9": "helpSidepanel9", "wfm-help-sidepanel-10": "helpSidepanel10",
|
||||
"wfm-help-sidepanel-11": "helpSidepanel11", "wfm-help-sidepanel-12": "helpSidepanel12",
|
||||
"wfm-help-sidepanel-13": "helpSidepanel13",
|
||||
"wfm-help-sidepanel-14": "helpSidepanel14", "wfm-help-sidepanel-15": "helpSidepanel15",
|
||||
"wfm-help-shortcuts-title": "helpShortcutsTitle",
|
||||
"wfm-help-shortcuts-1": "helpShortcuts1", "wfm-help-shortcuts-2": "helpShortcuts2",
|
||||
"wfm-help-shortcuts-3": "helpShortcuts3", "wfm-help-shortcuts-4": "helpShortcuts4",
|
||||
@@ -360,7 +361,7 @@ import { initWorkflowTab } from "./workflow-tab.js";
|
||||
import { initNodesTab } from "./nodes-tab.js";
|
||||
import { initGenerateTab } from "./generate-tab.js";
|
||||
import { initPromptTab } from "./prompt-tab.js";
|
||||
import { initSettingsTab, applyTheme, getSavedTheme } from "./settings-tab.js";
|
||||
import { initSettingsTab, applyTheme, getSavedTheme, applyTextareaFontSize } from "./settings-tab.js";
|
||||
import { initModelsTab } from "./models-tab.js";
|
||||
import { initGalleryTab } from "./gallery-tab.js";
|
||||
import { initMetadataTab } from "./metadata-tab.js";
|
||||
@@ -368,6 +369,12 @@ import { initMetadataTab } from "./metadata-tab.js";
|
||||
// Apply saved theme immediately to prevent flash of default theme
|
||||
applyTheme(getSavedTheme());
|
||||
|
||||
// Apply saved textarea font size
|
||||
try {
|
||||
const _s = JSON.parse(localStorage.getItem("wfm_settings") || "{}");
|
||||
if (_s.textareaFontSize) applyTextareaFontSize(_s.textareaFontSize);
|
||||
} catch {}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
applyI18nToHtml();
|
||||
initTabs();
|
||||
|
||||
+9
-3
@@ -421,7 +421,9 @@ const LANGUAGES = {
|
||||
helpSidepanel10: "Search within each sub-tab to quickly find items",
|
||||
helpSidepanel11: "Models tab: All / ★ Favorites / Groups / By Type sub-tabs",
|
||||
helpSidepanel12: "⚙ Theme button (header): customize panel background, sub-header background, text, border, and secondary text colors — changes are saved to localStorage and applied on next open",
|
||||
helpSidepanel13: "I tab (Information): drop a ComfyUI PNG/WebP/JSON to inspect model, LoRA, and prompt metadata directly in the side panel — sub-tabs: model / lora / Prompts; click any prompt to view full text and copy",
|
||||
helpSidepanel13: "I tab (Information): drop a ComfyUI PNG/WebP/JSON to inspect model, LoRA, and prompt metadata in the side panel — sub-tabs: model / lora / Prompts; supports UnetLoaderGGUF and QuadrupleCLIPLoader node types",
|
||||
helpSidepanel14: "Information tab — drag items to canvas: model sub-tab places the loader node (Checkpoint → CheckpointLoaderSimple, VAE → VAELoader, Diffusion Model → UNETLoader, Text Encoder → CLIPLoader); double-click also places at canvas center",
|
||||
helpSidepanel15: "Information tab — LoRA sub-tab: drag individual LoRA to place LoraLoader; \"Multiple LORA\" section at bottom places all LoRAs in a single Lora Loader (LoraManager) node; Prompts sub-tab: drag a prompt to place CLIPTextEncode node with text pre-filled; click prompt to view full text and copy",
|
||||
helpShortcutsTitle: "Keyboard Shortcuts",
|
||||
helpShortcuts1: "Escape: Close modal/panel",
|
||||
helpShortcuts2: "Enter: Confirm rename, send chat",
|
||||
@@ -992,7 +994,9 @@ const LANGUAGES = {
|
||||
helpSidepanel10: "各サブタブ内で検索してアイテムをすばやく検索",
|
||||
helpSidepanel11: "Modelsタブ:All / ★ Favorites / Groups / By Typeサブタブ",
|
||||
helpSidepanel12: "⚙ テーマボタン(ヘッダー):パネル背景・サブヘッダー背景・文字色・ボーダー・補助テキスト色をカスタマイズ可能、設定はlocalStorageに保存され次回起動時も反映",
|
||||
helpSidepanel13: "I タブ(Information):ComfyUI の PNG / WebP / JSON をドロップするとサイドパネル内でモデル・LoRA・プロンプトのメタデータを確認可能 — サブタブ: model / lora / Prompts;プロンプトをクリックで全文表示・Copyボタンでコピー",
|
||||
helpSidepanel13: "I タブ(Information):ComfyUI の PNG / WebP / JSON をドロップするとサイドパネル内でモデル・LoRA・プロンプトのメタデータを確認可能 — サブタブ: model / lora / Prompts;UnetLoaderGGUF・QuadrupleCLIPLoader ノードタイプに対応",
|
||||
helpSidepanel14: "Information タブ — キャンバスへドラッグ:model サブタブのアイテムをドラッグすると対応ローダーノードを配置(Checkpoint → CheckpointLoaderSimple、VAE → VAELoader、Diffusion Model → UNETLoader、Text Encoder → CLIPLoader);ダブルクリックでもキャンバス中央に配置可能",
|
||||
helpSidepanel15: "Information タブ — lora サブタブ:個別 LoRA をドラッグで LoraLoader を配置;下部の「Multiple LORA」セクションをドラッグすると全 LoRA を一括で Lora Loader (LoraManager) に配置;Prompts サブタブ:プロンプトをドラッグするとテキスト入力済みの CLIPTextEncode ノードを配置;クリックで全文表示・コピー可能",
|
||||
helpShortcutsTitle: "キーボード操作",
|
||||
helpShortcuts1: "Escape:モーダル・パネルを閉じる",
|
||||
helpShortcuts2: "Enter:名前変更の確定、チャット送信",
|
||||
@@ -1559,7 +1563,9 @@ const LANGUAGES = {
|
||||
helpSidepanel10: "在各子标签内搜索快速查找项目",
|
||||
helpSidepanel11: "Models标签:All / ★ Favorites / Groups / By Type子标签",
|
||||
helpSidepanel12: "⚙ 主题按钮(标题栏):可自定义面板背景、子标题背景、文字颜色、边框及辅助文字颜色,设置保存至localStorage并在下次打开时生效",
|
||||
helpSidepanel13: "I 标签(Information):拖放 ComfyUI PNG/WebP/JSON 即可在侧面板内查看模型、LoRA 和提示词元数据 — 子标签:model / lora / Prompts;点击提示词可查看全文并复制",
|
||||
helpSidepanel13: "I 标签(Information):拖放 ComfyUI PNG/WebP/JSON 即可在侧面板内查看模型、LoRA 和提示词元数据 — 子标签:model / lora / Prompts;支持 UnetLoaderGGUF 和 QuadrupleCLIPLoader 节点类型",
|
||||
helpSidepanel14: "Information 标签 — 拖拽到画布:model 子标签拖拽可放置对应加载节点(Checkpoint → CheckpointLoaderSimple、VAE → VAELoader、Diffusion Model → UNETLoader、Text Encoder → CLIPLoader);双击也可放置到画布中央",
|
||||
helpSidepanel15: "Information 标签 — lora 子标签:拖拽单个 LoRA 放置 LoraLoader;底部「Multiple LORA」区域可将全部 LoRA 一次性放入 Lora Loader (LoraManager) 节点;Prompts 子标签:拖拽提示词放置预填文本的 CLIPTextEncode 节点;点击可查看全文并复制",
|
||||
helpShortcutsTitle: "键盘操作",
|
||||
helpShortcuts1: "Escape:关闭弹窗/面板",
|
||||
helpShortcuts2: "Enter:确认重命名、发送聊天",
|
||||
|
||||
@@ -122,8 +122,9 @@ function extractVAEs(wf) {
|
||||
}
|
||||
function extractDiffusionModels(wf) {
|
||||
if (!wf || typeof wf !== "object") return [];
|
||||
if (Array.isArray(wf.nodes)) return collectUnique(collectAllNodes(wf).filter(n => n.type === "UNETLoader").map(n => n.widgets_values?.[0]));
|
||||
return collectUnique(Object.values(wf).filter(n => n?.class_type === "UNETLoader").map(n => n.inputs?.unet_name));
|
||||
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));
|
||||
}
|
||||
function extractTextEncoders(wf) {
|
||||
if (!wf || typeof wf !== "object") return [];
|
||||
@@ -133,6 +134,7 @@ function extractTextEncoders(wf) {
|
||||
if (n.type === "CLIPLoader") { if (n.widgets_values?.[0]) names.push(n.widgets_values[0]); }
|
||||
else if (n.type === "DualCLIPLoader") { [0,1].forEach(i => { if (n.widgets_values?.[i]) names.push(n.widgets_values[i]); }); }
|
||||
else if (n.type === "TripleCLIPLoader") { [0,1,2].forEach(i => { if (n.widgets_values?.[i]) names.push(n.widgets_values[i]); }); }
|
||||
else if (n.type === "QuadrupleCLIPLoader") { [0,1,2,3].forEach(i => { if (n.widgets_values?.[i]) names.push(n.widgets_values[i]); }); }
|
||||
}
|
||||
} else {
|
||||
for (const n of Object.values(wf)) {
|
||||
@@ -141,6 +143,7 @@ function extractTextEncoders(wf) {
|
||||
if (ct === "CLIPLoader") { if (n.inputs?.clip_name) names.push(n.inputs.clip_name); }
|
||||
else if (ct === "DualCLIPLoader") { if (n.inputs?.clip_name1) names.push(n.inputs.clip_name1); if (n.inputs?.clip_name2) names.push(n.inputs.clip_name2); }
|
||||
else if (ct === "TripleCLIPLoader") { ["clip_name1","clip_name2","clip_name3"].forEach(k => { if (n.inputs?.[k]) names.push(n.inputs[k]); }); }
|
||||
else if (ct === "QuadrupleCLIPLoader") { ["clip_name1","clip_name2","clip_name3","clip_name4"].forEach(k => { if (n.inputs?.[k]) names.push(n.inputs[k]); }); }
|
||||
}
|
||||
}
|
||||
return collectUnique(names);
|
||||
|
||||
@@ -314,6 +314,30 @@ function clearCustomOverrides() {
|
||||
if (fontEl) fontEl.remove();
|
||||
}
|
||||
|
||||
const TEXTAREA_FONT_SIZE_DEFAULT = 13;
|
||||
const TEXTAREA_FONT_SIZE_STYLE_ID = "wfm-ta-font-size-style";
|
||||
const TEXTAREA_FONT_SIZE_TARGETS = [
|
||||
"#wfm-prompt-pos-text",
|
||||
"#wfm-prompt-neg-text",
|
||||
"#wfm-ollama-input",
|
||||
"#wfm-preset-pos",
|
||||
"#wfm-preset-neg",
|
||||
"#wfm-wc-prompt",
|
||||
"#wfm-wc-editor-content",
|
||||
"#wfm-meta-prompt-full",
|
||||
].join(",\n ");
|
||||
|
||||
export function applyTextareaFontSize(size) {
|
||||
const px = Math.max(10, Math.min(28, parseInt(size) || TEXTAREA_FONT_SIZE_DEFAULT));
|
||||
let el = document.getElementById(TEXTAREA_FONT_SIZE_STYLE_ID);
|
||||
if (!el) {
|
||||
el = document.createElement("style");
|
||||
el.id = TEXTAREA_FONT_SIZE_STYLE_ID;
|
||||
document.head.appendChild(el);
|
||||
}
|
||||
el.textContent = `${TEXTAREA_FONT_SIZE_TARGETS} { font-size: ${px}px !important; }`;
|
||||
}
|
||||
|
||||
export function applyTheme(themeId) {
|
||||
if (themeId) {
|
||||
document.documentElement.setAttribute("data-theme", themeId);
|
||||
@@ -485,6 +509,24 @@ export async function initSettingsTab() {
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<!-- Text Size -->
|
||||
<details class="wfm-settings-section" open>
|
||||
<summary class="wfm-settings-summary">${t("textSizeLabel") || "Text Size"}</summary>
|
||||
<div class="wfm-form-group">
|
||||
<label style="display:flex;align-items:center;justify-content:space-between;">
|
||||
<span>${t("textSizeTextarea") || "Prompt / Chat Textarea"}</span>
|
||||
<span id="wfm-ta-font-size-val" style="font-size:12px;color:var(--wfm-text-secondary);">${settings.textareaFontSize || TEXTAREA_FONT_SIZE_DEFAULT}px</span>
|
||||
</label>
|
||||
<input type="range" class="wfm-range" id="wfm-ta-font-size"
|
||||
min="10" max="28" step="1"
|
||||
value="${settings.textareaFontSize || TEXTAREA_FONT_SIZE_DEFAULT}"
|
||||
style="width:100%;margin-top:4px;">
|
||||
<small style="color:var(--wfm-text-secondary);font-size:11px;display:block;margin-top:4px;">
|
||||
${t("textSizeHint") || "Applies to: Generate UI prompts, AI Assistant chat, Preset prompts, Wildcard textarea, Metadata prompt preview"}
|
||||
</small>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<!-- Workflow Data Folder -->
|
||||
<details class="wfm-settings-section">
|
||||
<summary class="wfm-settings-summary">${t("workflowsDir")}</summary>
|
||||
@@ -1032,8 +1074,17 @@ export async function initSettingsTab() {
|
||||
showToast(t("defaultWorkflowCleared"), "success");
|
||||
});
|
||||
|
||||
// --- Textarea font size slider ---
|
||||
document.getElementById("wfm-ta-font-size")?.addEventListener("input", (e) => {
|
||||
const px = parseInt(e.target.value);
|
||||
const valEl = document.getElementById("wfm-ta-font-size-val");
|
||||
if (valEl) valEl.textContent = `${px}px`;
|
||||
applyTextareaFontSize(px);
|
||||
});
|
||||
|
||||
// Save (local settings)
|
||||
document.getElementById("wfm-settings-save")?.addEventListener("click", () => {
|
||||
const taFontSize = parseInt(document.getElementById("wfm-ta-font-size")?.value) || TEXTAREA_FONT_SIZE_DEFAULT;
|
||||
const patch = {
|
||||
comfyuiUrl: document.getElementById("wfm-settings-comfyui-url")?.value.trim() || "",
|
||||
eagleUrl: document.getElementById("wfm-settings-eagle-url")?.value.trim() || "http://localhost:41595",
|
||||
@@ -1041,6 +1092,7 @@ export async function initSettingsTab() {
|
||||
uiLang: getLang(),
|
||||
summaryLang: getSummaryLang(),
|
||||
theme: document.documentElement.getAttribute("data-theme") || "",
|
||||
textareaFontSize: taFontSize,
|
||||
};
|
||||
|
||||
saveLocalSettings(patch);
|
||||
|
||||
@@ -864,7 +864,7 @@
|
||||
<li id="wfm-help-metadata-2">Center column: Checkpoint, VAE, Diffusion Model, and Text Encoder lists extracted from the workflow</li>
|
||||
<li id="wfm-help-metadata-3">Right column: LoRA list (with strength values) and Prompt list (click to view full text below)</li>
|
||||
<li id="wfm-help-metadata-4">Prompt actions — Copy: copy to clipboard; GenUI:P/N: set GenerateUI positive/negative prompt; Prompt:P/N: set Prompt tab preset positive/negative</li>
|
||||
<li id="wfm-help-metadata-5">Supported: ComfyUI PNG/WebP/JSON (standard + Flux.2 / Qwen-Image / Z-Image subgraph workflows), SD WebUI, SD Forge, Fooocus.</li>
|
||||
<li id="wfm-help-metadata-5">Supported: ComfyUI PNG/WebP/JSON (standard + Flux.2 / Qwen-Image / Z-Image subgraph workflows), SD WebUI, SD Forge, Fooocus. Model extraction covers UNETLoader, UnetLoaderGGUF, UNETLoaderGGUF (e.g. HiDream GGUF), CLIPLoader, DualCLIPLoader, TripleCLIPLoader, and QuadrupleCLIPLoader (e.g. HiDream 4-CLIP).</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -881,6 +881,7 @@
|
||||
<li id="wfm-help-settings-8">Data Management: export all plugin data to JSON / import to restore</li>
|
||||
<li id="wfm-help-settings-9">All sections are collapsible accordion panels</li>
|
||||
<li id="wfm-help-settings-10">Wildcard Integration: link WFS wildcard dir to ComfyUI-Impact-Pack wildcards (junction/symlink); existing files migrated automatically</li>
|
||||
<li id="wfm-help-settings-11">Text Size: one slider (10–28 px) adjusts font size for all prompt and chat textareas at once — Generate UI positive/negative prompts, AI Assistant chat input, Preset positive/negative, Wildcard prompt and file editor, and Metadata prompt full preview; takes effect immediately and saved with Save Settings</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -945,7 +946,9 @@
|
||||
<li id="wfm-help-sidepanel-9">Double-click items to load/place without dragging</li>
|
||||
<li id="wfm-help-sidepanel-10">Search within each sub-tab to quickly find items</li>
|
||||
<li id="wfm-help-sidepanel-12">⚙ Theme button (header): customize panel background, text, border colors — saved to localStorage</li>
|
||||
<li id="wfm-help-sidepanel-13">I tab (Information): drop a ComfyUI PNG/WebP/JSON to inspect model, LoRA, and prompt metadata directly in the side panel — sub-tabs: model / lora / Prompts; click any prompt to view full text and copy</li>
|
||||
<li id="wfm-help-sidepanel-13">I tab (Information): drop a ComfyUI PNG/WebP/JSON to inspect model, LoRA, and prompt metadata in the side panel — sub-tabs: model / lora / Prompts; supports UnetLoaderGGUF and QuadrupleCLIPLoader node types</li>
|
||||
<li id="wfm-help-sidepanel-14">Information tab — drag items to canvas: model sub-tab places the loader node (Checkpoint → CheckpointLoaderSimple, VAE → VAELoader, Diffusion Model → UNETLoader, Text Encoder → CLIPLoader); double-click also places at canvas center</li>
|
||||
<li id="wfm-help-sidepanel-15">Information tab — LoRA sub-tab: drag individual LoRA to place LoraLoader; "Multiple LORA" section at bottom places all LoRAs in a single Lora Loader (LoraManager) node; Prompts sub-tab: drag a prompt to place CLIPTextEncode node with text pre-filled; click prompt to view full text and copy</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
+157
-16
@@ -365,6 +365,33 @@ const placePromptNode = (posText, negText, promptName, pos) => {
|
||||
showToast(`Placed: ${promptName || "Prompt"}`, "success");
|
||||
};
|
||||
|
||||
// ============================================
|
||||
// CLIP Text Encode node placement
|
||||
// ============================================
|
||||
|
||||
const placeClipTextEncodeNode = (text, pos) => {
|
||||
const graph = app.graph;
|
||||
if (!graph) return;
|
||||
const node = LiteGraph.createNode("CLIPTextEncode");
|
||||
if (!node) {
|
||||
showToast("Node not found: CLIPTextEncode", "error");
|
||||
return;
|
||||
}
|
||||
const canvas = app.canvas;
|
||||
const centerPos = canvas
|
||||
? [-canvas.ds.offset[0] + canvas.canvas.width / 2 / canvas.ds.scale,
|
||||
-canvas.ds.offset[1] + canvas.canvas.height / 2 / canvas.ds.scale]
|
||||
: [100, 100];
|
||||
node.pos = pos || centerPos;
|
||||
graph.add(node);
|
||||
if (node.widgets) {
|
||||
const w = node.widgets.find(ww => ww.name === "text");
|
||||
if (w) { w.value = text; if (w.callback) w.callback(text); }
|
||||
}
|
||||
app.canvas.setDirty(true, true);
|
||||
showToast("Placed: CLIP Text Encode", "success");
|
||||
};
|
||||
|
||||
// ============================================
|
||||
// Model node placement
|
||||
// ============================================
|
||||
@@ -376,7 +403,7 @@ const MODEL_NODE_MAP = {
|
||||
vae: { classType: "VAELoader", widgetName: "vae_name" },
|
||||
controlnet: { classType: "ControlNetLoader", widgetName: "control_net_name" },
|
||||
unet: { classType: "UNETLoader", widgetName: "unet_name" },
|
||||
textencoder: { classType: "CLIPLoader", widgetName: "clip_name1" },
|
||||
textencoder: { classType: "CLIPLoader", widgetName: "clip_name" },
|
||||
hypernetwork: { classType: "HypernetworkLoader", widgetName: "hypernetwork_name" },
|
||||
// embedding has no loader node — copy-only
|
||||
};
|
||||
@@ -429,6 +456,34 @@ const placeModelNode = (modelName, modelType, pos) => {
|
||||
showToast(`Placed: ${filename}`, "success");
|
||||
};
|
||||
|
||||
// ============================================
|
||||
// Lora Loader (LoraManager) node placement
|
||||
// ============================================
|
||||
|
||||
const placeLoraMgrNode = (loras, pos) => {
|
||||
const graph = app.graph;
|
||||
if (!graph) return;
|
||||
const node = LiteGraph.createNode("Lora Loader (LoraManager)");
|
||||
if (!node) {
|
||||
showToast("Node not found: Lora Loader (LoraManager)", "error");
|
||||
return;
|
||||
}
|
||||
const canvas = app.canvas;
|
||||
const centerPos = canvas
|
||||
? [-canvas.ds.offset[0] + canvas.canvas.width / 2 / canvas.ds.scale,
|
||||
-canvas.ds.offset[1] + canvas.canvas.height / 2 / canvas.ds.scale]
|
||||
: [100, 100];
|
||||
node.pos = pos || centerPos;
|
||||
graph.add(node);
|
||||
if (node.widgets) {
|
||||
const loraList = loras.map(l => ({ name: l.name, strength: l.strength_model ?? 1.0, clipStrength: l.strength_clip ?? l.strength_model ?? 1.0, active: true }));
|
||||
const w = node.widgets.find(ww => Array.isArray(ww.value) || ww.name === "loras");
|
||||
if (w) { w.value = loraList; if (w.callback) w.callback(loraList); }
|
||||
}
|
||||
app.canvas.setDirty(true, true);
|
||||
showToast(`Placed: Lora Loader (${loras.length} loras)`, "success");
|
||||
};
|
||||
|
||||
// ============================================
|
||||
// Workflow canvas loading
|
||||
// ============================================
|
||||
@@ -466,7 +521,9 @@ const installCanvasDropHandler = () => {
|
||||
if (e.dataTransfer.types.includes("application/x-wfm-node") ||
|
||||
e.dataTransfer.types.includes("application/x-wfm-workflow") ||
|
||||
e.dataTransfer.types.includes("application/x-wfm-prompt") ||
|
||||
e.dataTransfer.types.includes("application/x-wfm-model")) {
|
||||
e.dataTransfer.types.includes("application/x-wfm-model") ||
|
||||
e.dataTransfer.types.includes("application/x-wfm-lora-multi") ||
|
||||
e.dataTransfer.types.includes("application/x-wfm-clip-text")) {
|
||||
e.preventDefault();
|
||||
e.dataTransfer.dropEffect = "copy";
|
||||
}
|
||||
@@ -483,6 +540,26 @@ const installCanvasDropHandler = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle Lora Loader (LoraManager) multi-lora drop
|
||||
const loraMultiRaw = e.dataTransfer.getData("application/x-wfm-lora-multi");
|
||||
if (loraMultiRaw) {
|
||||
e.preventDefault();
|
||||
const { loras } = JSON.parse(loraMultiRaw);
|
||||
const pos = getCanvasDropPos(e);
|
||||
placeLoraMgrNode(loras, pos);
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle CLIP Text Encode drop
|
||||
const clipTextRaw = e.dataTransfer.getData("application/x-wfm-clip-text");
|
||||
if (clipTextRaw) {
|
||||
e.preventDefault();
|
||||
const { text } = JSON.parse(clipTextRaw);
|
||||
const pos = getCanvasDropPos(e);
|
||||
placeClipTextEncodeNode(text, pos);
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle prompt drop
|
||||
const promptRaw = e.dataTransfer.getData("application/x-wfm-prompt");
|
||||
if (promptRaw) {
|
||||
@@ -2079,8 +2156,9 @@ function _extractVAEs(wf) {
|
||||
}
|
||||
function _extractDiffusionModels(wf) {
|
||||
if (!wf || typeof wf !== "object") return [];
|
||||
if (Array.isArray(wf.nodes)) return _collectUnique(_collectAllNodes(wf).filter(n => n.type === "UNETLoader").map(n => n.widgets_values?.[0]));
|
||||
return _collectUnique(Object.values(wf).filter(n => n?.class_type === "UNETLoader").map(n => n.inputs?.unet_name));
|
||||
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));
|
||||
}
|
||||
function _extractTextEncoders(wf) {
|
||||
if (!wf || typeof wf !== "object") return [];
|
||||
@@ -2090,6 +2168,7 @@ function _extractTextEncoders(wf) {
|
||||
if (n.type === "CLIPLoader") { if (n.widgets_values?.[0]) names.push(n.widgets_values[0]); }
|
||||
else if (n.type === "DualCLIPLoader") { [0,1].forEach(i => { if (n.widgets_values?.[i]) names.push(n.widgets_values[i]); }); }
|
||||
else if (n.type === "TripleCLIPLoader") { [0,1,2].forEach(i => { if (n.widgets_values?.[i]) names.push(n.widgets_values[i]); }); }
|
||||
else if (n.type === "QuadrupleCLIPLoader") { [0,1,2,3].forEach(i => { if (n.widgets_values?.[i]) names.push(n.widgets_values[i]); }); }
|
||||
}
|
||||
} else {
|
||||
for (const n of Object.values(wf)) {
|
||||
@@ -2098,6 +2177,7 @@ function _extractTextEncoders(wf) {
|
||||
if (ct === "CLIPLoader") { if (n.inputs?.clip_name) names.push(n.inputs.clip_name); }
|
||||
else if (ct === "DualCLIPLoader") { if (n.inputs?.clip_name1) names.push(n.inputs.clip_name1); if (n.inputs?.clip_name2) names.push(n.inputs.clip_name2); }
|
||||
else if (ct === "TripleCLIPLoader") { ["clip_name1","clip_name2","clip_name3"].forEach(k => { if (n.inputs?.[k]) names.push(n.inputs[k]); }); }
|
||||
else if (ct === "QuadrupleCLIPLoader") { ["clip_name1","clip_name2","clip_name3","clip_name4"].forEach(k => { if (n.inputs?.[k]) names.push(n.inputs[k]); }); }
|
||||
}
|
||||
}
|
||||
return _collectUnique(names);
|
||||
@@ -2480,13 +2560,13 @@ const renderInfoModels = (container, meta) => {
|
||||
return;
|
||||
}
|
||||
const sections = [
|
||||
{ label: "Checkpoint", items: meta.checkpoints },
|
||||
{ label: "VAE", items: meta.vaes },
|
||||
{ label: "Diffusion Model", items: meta.diffusionModels },
|
||||
{ label: "Text Encoder", items: meta.textEncoders },
|
||||
{ label: "Checkpoint", items: meta.checkpoints, modelType: "checkpoint" },
|
||||
{ label: "VAE", items: meta.vaes, modelType: "vae" },
|
||||
{ label: "Diffusion Model", items: meta.diffusionModels, modelType: "unet" },
|
||||
{ label: "Text Encoder", items: meta.textEncoders, modelType: "textencoder" },
|
||||
];
|
||||
let hasAny = false;
|
||||
for (const { label, items } of sections) {
|
||||
for (const { label, items, modelType } of sections) {
|
||||
if (!items || items.length === 0) continue;
|
||||
hasAny = true;
|
||||
const sec = document.createElement("div");
|
||||
@@ -2494,9 +2574,17 @@ const renderInfoModels = (container, meta) => {
|
||||
sec.innerHTML = `<div class="wfm-nlp-info-section-title">${esc(label)}</div>`;
|
||||
for (const name of items) {
|
||||
const item = document.createElement("div");
|
||||
item.className = "wfm-nlp-info-item";
|
||||
item.title = name;
|
||||
item.className = "wfm-nlp-info-item wfm-nlp-info-item--draggable";
|
||||
item.draggable = true;
|
||||
item.title = `${name}\nDrag to canvas to place node`;
|
||||
item.innerHTML = `<span class="wfm-nlp-info-item-name">${esc(name)}</span>`;
|
||||
item.addEventListener("dragstart", (e) => {
|
||||
e.dataTransfer.effectAllowed = "copy";
|
||||
e.dataTransfer.setData("application/x-wfm-model", JSON.stringify({ modelName: name, modelType }));
|
||||
item.classList.add("dragging");
|
||||
});
|
||||
item.addEventListener("dragend", () => item.classList.remove("dragging"));
|
||||
item.addEventListener("dblclick", () => placeModelNode(name, modelType));
|
||||
sec.appendChild(item);
|
||||
}
|
||||
container.appendChild(sec);
|
||||
@@ -2512,13 +2600,43 @@ const renderInfoLoras = (container, meta) => {
|
||||
}
|
||||
for (const lora of meta.loras) {
|
||||
const item = document.createElement("div");
|
||||
item.className = "wfm-nlp-info-item";
|
||||
item.title = lora.name;
|
||||
item.className = "wfm-nlp-info-item wfm-nlp-info-item--draggable";
|
||||
item.draggable = true;
|
||||
item.title = `${lora.name}\nDrag to canvas to place LoRA node`;
|
||||
const sm = typeof lora.strength_model === "number" ? lora.strength_model.toFixed(2) : "—";
|
||||
const sc = typeof lora.strength_clip === "number" ? lora.strength_clip.toFixed(2) : "—";
|
||||
item.innerHTML = `<span class="wfm-nlp-info-item-name">${esc(lora.name)}</span><span class="wfm-nlp-info-item-badge">${sm}/${sc}</span>`;
|
||||
item.addEventListener("dragstart", (e) => {
|
||||
e.dataTransfer.effectAllowed = "copy";
|
||||
e.dataTransfer.setData("application/x-wfm-model", JSON.stringify({ modelName: lora.name, modelType: "lora" }));
|
||||
item.classList.add("dragging");
|
||||
});
|
||||
item.addEventListener("dragend", () => item.classList.remove("dragging"));
|
||||
item.addEventListener("dblclick", () => placeModelNode(lora.name, "lora"));
|
||||
container.appendChild(item);
|
||||
}
|
||||
|
||||
if (meta.loras.length >= 1) {
|
||||
const sep = document.createElement("div");
|
||||
sep.className = "wfm-nlp-info-section-title";
|
||||
sep.style.marginTop = "8px";
|
||||
sep.textContent = "Multiple LORA";
|
||||
container.appendChild(sep);
|
||||
|
||||
const multiItem = document.createElement("div");
|
||||
multiItem.className = "wfm-nlp-info-item wfm-nlp-info-item--draggable";
|
||||
multiItem.draggable = true;
|
||||
multiItem.title = `Drag to canvas to place Lora Loader (LoraManager) with all ${meta.loras.length} loras`;
|
||||
multiItem.innerHTML = `<span class="wfm-nlp-info-item-name">All ${meta.loras.length} LoRAs</span><span class="wfm-nlp-info-item-badge">LoraManager</span>`;
|
||||
multiItem.addEventListener("dragstart", (e) => {
|
||||
e.dataTransfer.effectAllowed = "copy";
|
||||
e.dataTransfer.setData("application/x-wfm-lora-multi", JSON.stringify({ loras: meta.loras }));
|
||||
multiItem.classList.add("dragging");
|
||||
});
|
||||
multiItem.addEventListener("dragend", () => multiItem.classList.remove("dragging"));
|
||||
multiItem.addEventListener("dblclick", () => placeLoraMgrNode(meta.loras));
|
||||
container.appendChild(multiItem);
|
||||
}
|
||||
};
|
||||
|
||||
const renderInfoPrompts = (container, meta) => {
|
||||
@@ -2541,6 +2659,8 @@ const renderInfoPrompts = (container, meta) => {
|
||||
for (const { type, text } of allPrompts) {
|
||||
const item = document.createElement("div");
|
||||
item.className = "wfm-nlp-info-prompt-item";
|
||||
item.draggable = true;
|
||||
item.title = `Drag to canvas to place CLIP Text Encode node`;
|
||||
const snippet = text.length > 55 ? text.slice(0, 55) + "…" : text;
|
||||
const badge = type === "positive"
|
||||
? `<span class="wfm-nlp-info-badge-pos">POS</span>`
|
||||
@@ -2554,6 +2674,13 @@ const renderInfoPrompts = (container, meta) => {
|
||||
if (promptFull) promptFull.value = text;
|
||||
if (promptFullLabel) promptFullLabel.textContent = type === "positive" ? "Positive" : type === "negative" ? "Negative" : "Text";
|
||||
});
|
||||
item.addEventListener("dragstart", (e) => {
|
||||
e.dataTransfer.effectAllowed = "copy";
|
||||
e.dataTransfer.setData("application/x-wfm-clip-text", JSON.stringify({ text }));
|
||||
item.classList.add("dragging");
|
||||
});
|
||||
item.addEventListener("dragend", () => item.classList.remove("dragging"));
|
||||
item.addEventListener("dblclick", () => placeClipTextEncodeNode(text));
|
||||
container.appendChild(item);
|
||||
}
|
||||
const first = container.querySelector(".wfm-nlp-info-prompt-item");
|
||||
@@ -2794,13 +2921,13 @@ const injectStyles = () => {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 54px;
|
||||
height: 110px;
|
||||
flex-shrink: 0;
|
||||
border: 2px dashed var(--border-color, #4e4e4e);
|
||||
border-radius: 6px;
|
||||
margin: 8px 8px 0;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
flex-shrink: 0;
|
||||
transition: border-color 0.15s;
|
||||
position: relative;
|
||||
}
|
||||
@@ -2844,6 +2971,19 @@ const injectStyles = () => {
|
||||
justify-content: space-between;
|
||||
gap: 6px;
|
||||
}
|
||||
.wfm-nlp-info-item--draggable {
|
||||
cursor: grab;
|
||||
transition: background 0.12s;
|
||||
user-select: none;
|
||||
}
|
||||
.wfm-nlp-info-item--draggable:hover {
|
||||
background: var(--comfy-input-bg, #333);
|
||||
}
|
||||
.wfm-nlp-info-item--draggable.dragging,
|
||||
.wfm-nlp-info-prompt-item.dragging {
|
||||
opacity: 0.5;
|
||||
background: var(--comfy-input-bg, #333);
|
||||
}
|
||||
.wfm-nlp-info-item-name {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
@@ -2867,11 +3007,12 @@ const injectStyles = () => {
|
||||
padding: 5px 10px;
|
||||
font-size: 11px;
|
||||
border-bottom: 1px solid var(--border-color, #3a3a3a);
|
||||
cursor: pointer;
|
||||
cursor: grab;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
transition: background 0.12s;
|
||||
user-select: none;
|
||||
}
|
||||
.wfm-nlp-info-prompt-item:hover {
|
||||
background: var(--comfy-input-bg, #333);
|
||||
|
||||
Reference in New Issue
Block a user