UI→API conversion ignores host values on a legacy proxyWidgets subgraph instance (convert path never runs flush_proxy_migration)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start with comfy_cli/workflow_to_api.py, especially _overlay_promoted_host_values, then read flush_proxy_migration in comfy_cli/cql/promoted.py and its existing call sites in workflow_ops.py and cql/engine.py. Reproduce with node 252 in tests/comfy_cli/fixtures/gallery/template_horizontal_vertical_extension.json; check whether conversion preserves the host value 9:16 rather than using the interior default. The suggested change is to run migration on an isolated copy before overlaying host values.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
convert_ui_to_api never runs the legacy proxyWidgets forward migration, so a subgraph instance whose promotion is still a legacy properties.proxyWidgets entry converts with its host-owned values ignored. The interior widget's default is submitted instead.
flush_proxy_migration (comfy_cli/cql/promoted.py:1985) is a full port of the frontend's flushProxyWidgetMigration, and it is called from exactly two places:
comfy_cli/workflow_ops.py:3458comfy_cli/cql/engine.py:5533
Both are write paths. comfy_cli/workflow_to_api.py never calls it. Instead _overlay_promoted_host_values resolves promoted values through _promoted.promoted_inputs(sg, subgraph_defs) filtered to is_widget, which enumerates the definition's declared linked inputs. A legacy entry that the definition does not yet back with a linked input is invisible to that walk, so the host value attached to it is dropped.
The module docstring is explicit that the migration is the mechanism that makes a legacy promotion addressable (promoted.py:19-25), and that the CLI runs it "on the one instance whose legacy promotion a write is about to edit". Conversion is not a write, so it gets no migration.
Reproduction
On main @4d054af, using a fixture already in the repo — tests/comfy_cli/fixtures/gallery/template_horizontal_vertical_extension.json, node 252:
proxyWidgets (4): [["233","$$canvas-image-preview"], ["232","$$canvas-image-preview"],
["234","$$canvas-image-preview"], ["285","aspect_ratio"]]
sg.inputs (1): [["image","IMAGE"]]
The definition declares one input, and it is an IMAGE socket — no widget-backed linked inputs at all. Write the host values the way the frontend writes them, positionally in proxyWidgets order with the preview pseudo-widgets holding null:
inst["widgets_values"] = [None, None, None, "9:16"]
api = convert_ui_to_api(wf, object_info)
api["252:285"]["inputs"]["aspect_ratio"]
# -> "9:16 (Portrait Widescreen)" the interior default
# expected "9:16" the host value
The user's choice is discarded and the graph validates and runs with a different aspect ratio.
Four more shipped gallery fixtures have the same shape — proxyWidgets longer than, or ordered differently from, the definition's inputs:
| fixture | node | proxyWidgets |
sg.inputs |
|---|---|---|---|
templates_graphic_design_recomposer.json |
143 | 3 | 1 |
template_horizontal_vertical_extension.json |
252 | 4 | 1 |
flux_dev_checkpoint_example.json |
56 | 9 | 7 |
image_z_image_turbo.json |
57 | 9 | 8 |
05_audio_ace_step_1_t2a_song_subgraphed.json |
127 | 12 | 12 |
All five carry widgets_values: [], which is why no existing test catches this — with no host values stored, falling back to the interior default happens to be correct. The defect only appears once the host holds values, which is the state a user's own save is in.
Impact
The 2026-10 Comfy Hub conversion audit flagged this as its largest and most damaging finding: 25 of 392 public workflows. It is often silent — when the misassigned values share a type (cfg ↔ shift, two model filenames) the graph passes comfy workflow validate and runs on Cloud with the wrong settings. In the rest a prompt lands in a model-name field, which at least fails loudly.
Suggested fix
Run the same forward migration on an isolated copy before _overlay_promoted_host_values walks the instance, so conversion sees the same repaired state a write would. The migration is already deterministic (every minted id derived from (instance path, source node, widget)), already handles the cases the audit describes — $$-prefixed preview pseudo-widgets that own no slot, PrimitiveNode fan-out, control_after_generate companions, quarantine of unrepairable entries — and already picks host values positionally in proxyWidgets order (pickHostValue). Conversion needs its result, not a second implementation of it.
Relationship to other work
- #1039 fixes a different half of promoted-value loss — a promoted value feeding a socket-only interior input — for promotions that are already backed by linked inputs. It does not add a migration step, so it does not cover this. Verified against its head: 13/13 parity, 99 promoted tests pass, and the fixture above still converts wrong.
- #862 runs the migration before the first host write in the two slot-editing paths (closing #858's write-order bug). Same function, different call sites; it does not touch
workflow_to_api.py. It is also currently conflicting and has had no activity since 2026-09-10. - #974 is the socket-target case #1039 addresses.
So this is uncovered by all three.
Cross-converter note
@comfyorg/api-to-workflow resolves promoted values through the proxyWidgets chain directly (comfy-cloud-mcp-server/src/converter/converter.ts:1571 resolveProxyWidgetValue), so it does not have this bug. The two converters therefore disagree on any legacy-promotion graph, and conversionParity.test.ts would show it — except that suite is skip-gated on comfy-cli being importable and CI installs no Python, so it never runs.
- Lingua principale
- Python
- Stelle
- 1k
- Fork
- 176
- Merge medio
- 1g 11h
- PR unite (30g)
- 87
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di 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 hostForse già presa @neverbiasu l’ha presa 10 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
Comfy-Org/comfy-cli#907 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
Comfy-Org/comfy-cli#781 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
`comfy launch --background` fails with FileNotFoundError when comfy-cli is invoked by pathForse già presa @RaphaelFakhri l’ha presa 42 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Comfy-Org/comfy-cli#691 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Comfy-Org/comfy-cli#670 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Comfy-Org/comfy-cli
Issue simili
-
add entry to blockAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
StevenBlack/hosts#3299 ·
-
`garak --report` overwrites the input report when its name has no ".report"Forse già presa @0z5a l’ha presa oggi. Apertaneeds-triage
Difficoltà 2/5 Mezza giornata Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
plot_graph crashes when a mesh node has no m2m edgeForse già presa @tygvi l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
mllam/neural-lam#883 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
future-agi/future-agi#4092 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
transcript analytics: a text whose only protected spans the prose pass redacts is withheld wholeAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
WingedGuardian/GENesis-AGI#4641 ·
I maintainer di solito rispondono entro 1 giorno