UI→API conversion emits frontend-only custom nodes (rgthree Bookmark) → unknown_class_type; consider pairing widgets by name via widgets_values_named

オープン
#873 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
api, cli

調査の方向性

Start in comfy_cli/workflow_to_api.py at convert_ui_to_api and review _UI_ONLY_NODE_TYPES, then compare the related workflow_ops.UI_ONLY_NODE_TYPES behavior. Reproduce with the Bookmark (rgthree) workflow using comfy workflow validate and inspect how widgets_values_named is handled. Done means the affected UI workflow validates without unknown_class_type errors and the chosen conversion behavior is covered consistently.

索引モデルが issue の本文から書いたものです。

説明

convert_ui_to_api (comfy_cli/workflow_to_api.py) skips only the frontend's own virtual nodes — _UI_ONLY_NODE_TYPES = {Note, MarkdownNote, PrimitiveNode, GetNode, SetNode, Reroute}. Popular packs ship more of them: rgthree's Bookmark (rgthree), Label (rgthree), Fast Groups Muter (rgthree)… are isVirtualNode in the frontend, have no Python class and never reach the executor. The converter still emits them, so comfy workflow validate / comfy workflow run (and comfy-mcp's validate_workflow / run_workflow, which call the same code) fail with unknown_class_type on a workflow that runs fine from the UI.

Repro: any UI-format workflow with one Bookmark (rgthree) node (rgthree-comfy installed):

comfy workflow validate --workflow my_ui_workflow.json
→ valid: false, errors: [{"type": "unknown_class_type", "node_id": "160", "class_type": "Bookmark (rgthree)"}]

Measured on comfy-cli 1.18.0 and on main (2026-09-15) with a 149-node workflow carrying 5 bookmarks: 5 × unknown_class_type, nothing else wrong with the graph (the same graph exported to API from the UI validates clean).

Two suggestions

  1. Skip a node whose type is absent from object_info when it declares neither inputs nor outputs (decorative by construction), and/or extend _UI_ONLY_NODE_TYPES (and workflow_ops.UI_ONLY_NODE_TYPES) with rgthree's virtual types. We run exactly that as a 20-line wrapper loaded by a .pth in our venv: https://github.com/sickbraintwo/WextraUI/blob/main/tools/comfy_cli_patch.py — with it the same workflow converts to 60 clean nodes.

  2. The frontend (≥ 1.5x) now saves widgets_values_named next to widgets_values (a {input name: value} map, present on every node of files saved by recent frontends). When it is there, pairing widget values by name instead of by position would make the converter — and comfy workflow slots — immune to the positional drift that produces pairing_suspect slots whenever a custom node draws a widget its schema does not list, or changed its input order between versions. We hit this on our own pack (40 suspect slots on one workflow) and fixed it on our side, but the name map is already in the file and would make the converter robust for every pack.

Happy to open a PR for either if you tell me which shape you prefer.

主要言語
Python
スター
1k
フォーク
176
平均マージ
1日 11時間
マージ済み PR(30日)
87

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Comfy-Org/comfy-cli のほかの issue

Comfy-Org/comfy-cli の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。