UI→API conversion assigns the wrong widget value when a node has a multi-type input
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
Tái hiện vấn đề với workflow canvas đã lưu bằng comfy --json run --workflow <saved.json> --print-prompt, sau đó kiểm tra đường dẫn chuyển đổi UI-to-API và các input của LTXVEmptyLatentAudio trong comfy_extras/nodes_lt_audio.py. So sánh graph được tạo ra với đầu ra Export (API) của ComfyUI và xác minh rằng các input đa kiểu không còn làm lệch các giá trị widget phía sau, đồng thời xử lý cảnh báo validation nếu nó dùng chung đường dẫn xử lý kiểu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
UI→API conversion assigns the wrong widget value when a node has a multi-type input
Environment
| comfy-cli | 1.18.0 |
| ComfyUI | 0.33.1 (Windows portable, python_embeded) |
| Python | 3.10.11 |
| OS / GPU | Windows, RTX 4090 |
| Workflow | ComfyUI built-in template Text to Video (LTX-2.5) |
Summary
When lowering a UI-format (canvas) workflow to API format, comfy-cli mis-assigns
widgets_values for nodes whose schema contains a multi-type input
(io.MultiType.Input, surfaced as a FLOAT,INT type). The multi-type input appears
to be skipped when building the ordered list of widget-capable inputs, so every
widget declared after it receives the value belonging to the previous one.
The result is a silently wrong graph that validates clean and then fails at runtime.
Concrete case
LTXVEmptyLatentAudio (comfy_extras/nodes_lt_audio.py) declares its inputs in this order:
frames_number : Int
frame_rate : MultiType(Float, [Int]) <-- multi-type
batch_size : Int
audio_vae : Vae
The frontend stores "widgets_values": [97, 25, 1]
(frames_number=97, frame_rate=25, batch_size=1).
In this workflow frames_number and frame_rate are both driven by links;
only batch_size uses its widget value.
Expected — ComfyUI's own Workflow > Export (API):
"405:366": {
"class_type": "LTXVEmptyLatentAudio",
"inputs": {
"frames_number": ["405:378", 1],
"frame_rate": ["405:359", 1],
"batch_size": 1,
"audio_vae": ["405:386", 0]
}
}
Actual — comfy --json run --workflow <canvas.json> --print-prompt:
"405:366": {
"class_type": "LTXVEmptyLatentAudio",
"inputs": {
"batch_size": 25,
"frames_number": ["405:378", 1],
"frame_rate": ["405:359", 1],
"audio_vae": ["405:386", 0]
}
}
batch_size receives 25, which is frame_rate's widget value.
The sibling node EmptyLTXVLatentVideo in the same graph — width, height,
length, batch_size, all plain Int, the first three linked — converts
correctly ("batch_size": 1). The only structural difference between the two
nodes is the multi-type input.
Consequence
The audio latent is built with batch size 25 while the video latent has batch size 1, and execution dies when the two are packed together:
node 405:344 SamplerCustomAdvanced RuntimeError: Sizes of tensors must match except in dimension 2. Expected size 1 but got size 25 for tensor number 1 in the list.
comfy/samplers.py:1282 in sample -> pack_latents(latent_image.unbind())
comfy/utils.py:1381 in pack_latents -> torch.cat(tensors, dim=-1)
Steps to reproduce
- Open the built-in template Text to Video (LTX-2.5) in the ComfyUI frontend and save it (canvas format).
- Run
comfy --json run --workflow <saved.json> --print-prompt. - Inspect the
LTXVEmptyLatentAudionode in the printed graph:batch_sizeis25instead of1. comfy runon the same file fails with the RuntimeError above. Pressing Run in the browser succeeds, and so does passing the frontend'sExport (API)output tocomfy run.
Possibly related
comfy workflow validate on the same graph reports, for the same field:
node 405:366, field frame_rate, code edge_type_mismatch
input 'frame_rate' expects FLOAT,INT but ComfyMathExpression[1] produces INT
INT is within the accepted set, so this warning is itself a false positive —
which suggests multi-type inputs are not fully modelled in the type-checking
layer either, not only in the widget-mapping path.
Workaround
Export the workflow with ComfyUI's Workflow > Export (API) and pass that file
to comfy-cli instead of the canvas-format file.
- 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
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Comfy-Org/comfy-cli
-
test_file_utils umask tests assert against a umask the code never reads (import-time _UMASK), so they only pass on a 0o022 hostCó thể đã có người làm @neverbiasu đã nhận 10 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Comfy-Org/comfy-cli#907 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Comfy-Org/comfy-cli#781 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`comfy launch --background` fails with FileNotFoundError when comfy-cli is invoked by pathCó thể đã có người làm @RaphaelFakhri đã nhận 42 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Comfy-Org/comfy-cli#691 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Comfy-Org/comfy-cli#670 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Comfy-Org/comfy-cli
Issue tương tự
-
add entry to blockĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
StevenBlack/hosts#3299 ·
-
`garak --report` overwrites the input report when its name has no ".report"Có thể đã có người làm @0z5a đã nhận hôm nay. Đang mởneeds-triage
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
plot_graph crashes when a mesh node has no m2m edgeCó thể đã có người làm @tygvi đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
mllam/neural-lam#883 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
future-agi/future-agi#4092 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
transcript analytics: a text whose only protected spans the prose pass redacts is withheld wholeĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
WingedGuardian/GENesis-AGI#4641 ·
Maintainer thường phản hồi trong vòng 1 ngày