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

Đang mở
#893 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
65/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python, typescript
Lĩnh vực
api, backend, cli

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
1k
Fork
176
Merge trung bình
1 ngày 11 giờ
Pull request đã merge (30 ngày)
87

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Comfy-Org/comfy-cli

Tất cả issue của Comfy-Org/comfy-cli

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.