Root cause: when a workflow has multiple nodes of the same type (e.g. two
GeminiNanoBanana2), extract_schema_params gave them identical parameter
names (e.g. both "seed"). build_final_schema deduped them, but the
unique names were never synced back to ui_parameters. When the frontend
saved using ui_parameters, the duplicate names caused one parameter to
silently overwrite the other.
Changes:
- Refactor _get_auto_mapping to only decide exposure/required, not naming
- Add _assign_parameter_names for global context-aware naming:
- Single node of a type → simple name (seed, prompt)
- Multiple nodes → disambiguate with node title or node_id
- Add sync_names_back option to build_final_schema so ui_parameters
and parameters stay consistent
- Enrich descriptions with node context for duplicate types
Closes#87
ComfyUI subgraph workflows use colon-separated node IDs like "14:10"
instead of plain integers. The previous int() coercion crashed on
these IDs with ValueError. Store node_id as string throughout the
schema pipeline to support both plain and subgraph workflows.