Nodes/comfyui_dynamic/Dynamic Diagram Node
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).

By inkbottle-9·Created 9 months ago·Updated 6 days ago· 2
Dynamic Diagram Node
    • image
    • text
    ◄code—►
    ◄engineauto►
    ◄formatpng►
    ◄layoutdot►
    ◄extra_args►
    Categorydynamic/utils

    Inputs (5)

    NameTypeDefaultDescription
    codeSTRINGDiagram 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.
    engineCOMBOautoWhich rendering engine to use. 'auto' detects the engine from the code with heuristics and defaults to mermaid when nothing matches.
    formatCOMBOpngOutput 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.
    layoutCOMBOdotGraphviz 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_argsSTRINGCustom 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)

    NameTypeDescription
    imageIMAGEThe rendered diagrams (always png renders, also in svg mode); one entry per diagram.
    textSTRINGSVG source code, one entry per diagram, in svg mode (all entries are empty strings when the svg render failed); empty strings in png mode.