ComfyUI Node
Dynamic Diagram Node
Renders PlantUML / Mermaid / Graphviz code into images and shows them on the node. Tool paths are configured in the settings (Comfy Dynamic / Diagram). A PlantUML source may contain multiple @start* blocks and renders one image per block. Render failures (bad code, missing tools, timeout) raise an exception and terminate execution; strict PlantUML error reporting uses -failfast2, which requires a fairly recent PlantUML version (very old versions fail with an unrelated argument error).
Dynamic Diagram Node
- image
- text
◄code—►
◄engineauto►
◄formatpng►
◄layoutdot►
◄extra_args►
Categorydynamic/utils
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| code | STRING | Diagram source code. With engine 'auto' the engine is detected from the code (@start* -> plantuml, mermaid keywords -> mermaid, digraph/graph -> graphviz). For PlantUML, do not use named @start blocks (e.g. '@startuml myname'): their outputs are written under custom file names and get lost; use a plain '@start*' instead. | |
| engine | COMBO | auto | Which rendering engine to use. 'auto' detects the engine from the code with heuristics and defaults to mermaid when nothing matches. |
| format | COMBO | png | Output format. In svg mode the SVG source code is additionally provided through the text output (a png render is still produced for the image output); in png mode the text output is an empty string. |
| layout | COMBO | dot | Graphviz layout engine (ignored by other engines). The matching executable is resolved next to the configured graphviz tool at execution time; falls back to the configured executable with '-K<layout>', then to 'dot' on PATH. |
| extra_args | STRING | Custom command-line arguments appended to the target rendering tool's command line, after the built-in arguments (repeated flags typically take the later value, e.g. graphviz's -K / -G / -N / -E). Exceptions: do not pass -T to graphviz (a repeated -T adds output formats instead of overriding; change the format via the format port), and do not override mermaid's -i / -o (products would no longer be written to ComfyUI's temp directory). Arguments are split with shell-like quoting rules; quote values that contain spaces. Leave empty to pass nothing. In plantuml.jar mode the arguments are consumed by PlantUML itself, not by the java launcher. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | The rendered diagrams (always png renders, also in svg mode); one entry per diagram. |
| text | STRING | SVG source code, one entry per diagram, in svg mode (all entries are empty strings when the svg render failed); empty strings in png mode. |