Well-Typed ComfyUI Cannot Go Wrong: A Progressive Refinement Type System for Generative AI Workflow GraphsWell-Typed ComfyUI Cannot Go Wrong: Gradual Refinement Types for Generative-AI Workflow Graphs
The researchers propose ComfyTy, a progressive refinement type system for generative AI workflow graphs that can check the compatibility of model and operator combinations in ComfyUI workflows before execution. Such semantic composition failures arise from violated relationships among model families, tensor geometry, control modalities, and quantization levels, and occur even when connections pass ComfyUI's built-in validator, causing runtime crashes or silent failures. The authors used an LLM to classify all 8,766 issues and 1,368 discussions in the ComfyUI repository and performed cross-model consistency checks; such failures account for 8% of issue reports and 21% of runtime failures, of which 32% are silent failures. ComfyTy has each node declare the model families, sizes, modalities, and quantization levels it accepts and produces, and when nodes are connected it composes the schemas into constraints and solves them to report incompatibilities.