UI→API conversion gives no widgets_values slot to newer frontend widget types (COLOR, CURVE, ...)

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

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

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

評価

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

調査の方向性

Start with the converter's _is_widget_input logic and engine._is_link, then compare them with the widget registrations in src/scripts/widgets.ts and serialization behavior in useColorWidget.ts. Check which listed frontend widget types write slots and reconcile NUMBER handling. Done means UI-to-API conversion preserves positional widget values and the converter and engine agree on widget inputs.

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

説明

Found while reviewing #891.

1. Newer frontend widget types get no slot

_is_widget_input knows INT, FLOAT, STRING, BOOLEAN, COMBO, the _FRONTEND_DOM_WIDGET_TYPES set and V3 dynamic combos. The frontend's core registry (ComfyWidgets in src/scripts/widgets.ts) also registers MARKDOWN, COLOR, IMAGECOMPARE, BOUNDING_BOX, BOUNDING_BOXES, CHART, GALLERIA, PAINTER, COMPOSITOR, TEXTAREA, CURVE, RANGE, VIDEO_EDIT, RESOLUTION_PREVIEW and COLORS. The converter treats all of these as links. engine._is_link does too.

Core nodes use several of them as widget inputs: TextOverlay.color, Painter.bg_color, ImageCropToMask.background, MediaPipeFaceMeshVisualize.color, CurveEditor.curve, ImageCompositor.compositor, CreateBoundingBoxes.editor_state.

The COLOR widget writes a slot (useColorWidget.ts passes serialize: true), so every widget after it shifts by one. Repro on main (f35e41c) with the TextOverlay schema from /object_info and a hand-built node:

widgets_values = ["hello", 24, "#ff0000", "top", "left", True]
# text, font_size, color, position, align, outline
{'text': 'hello', 'font_size': 24, 'color': '#ffffff', 'position': '#ff0000', 'align': 'top', 'outline': 'left'}

color falls back to its default and every later value lands one input early.

I only checked serialize for COLOR. Each of the other types needs the same check before it goes in the set, since some may not write a slot (like LOAD3D_CAMERA).

2. Converter and engine disagree on NUMBER

engine._IMPLICIT_WIDGET_TYPES includes NUMBER, so the engine treats a NUMBER input as a widget. The converter treats it as a link. The frontend's core registry has no NUMBER widget. I did not check whether any extension registers one.

WAS Node Suite (Number Operation.number_a, ...) and ComfyMath (CM_NumberBinaryOperation.a, ...) declare NUMBER inputs. #891 aims for the converter and the engine to use one rule, and they still differ here.

Related: #873 suggests pairing widgets_values by name, which would avoid positional shifts like the one above.

主要言語
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 を短くまとめたダイジェスト。