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

Abierto
#873 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
api, cli

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
1k
Forks
176
Merge medio
1 d 11 h
PR fusionados (30 d)
87

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Comfy-Org/comfy-cli

Todos los issues de Comfy-Org/comfy-cli

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.