ComfyUI Node

DXF Save

Get your drawing out of the graph and into a .dxf file

By orion4d·Created about a year ago·Updated 12 months ago· 11
DXF Save
  • dxf
  • dxf
  • path
directoryoutput/dxf
filenameshape.dxf
timestamp_suffixtrue
save_filetrue

Everything in the DXF lane of ComfyUI_DAO_master is in-memory until this node. DXF Save is the node that writes your drawing to disk as an actual .dxf file - the thing your laser cutter, CNC controller, or vector editor will happily open. It's the payoff step of the whole "generate a shape → transform it → export it" chain, and it's refreshingly honest about what it does: it saves the file and tells you the path.

How it works

The node takes the DXF object, and if save_file is on, writes it with ezdxf's saveas(). Two behaviors are worth understanding because they bite people:

  • Timestamp suffix is on by default. Every run writes a new file like shape_20260816_143022.dxf rather than overwriting. Great for iterating and not clobbering a good version; annoying when you've accumulated 40 files and want one clean shape.dxf.
  • Anti-overwrite logic. Even with the suffix off, if the target exists it appends _1, _2, etc. You'll never silently lose a file.

Inputs that matter

  • dxf - the document to save.
  • directory (default output/dxf) - where it lands, relative to ComfyUI's working directory, so output/dxf ends up at ComfyUI/output/dxf.
  • filename (default shape.dxf) - the base name. The extension is appended if you forget it.
  • timestamp_suffix (default true) - new file every run.
  • save_file (default true) - the kill switch. Flip this off and the node writes nothing and returns an empty path, but still passes the DXF through so your graph keeps running.

Outputs

Two outputs: dxf - the document passed straight through, so you can keep chaining nodes after a save without re-running the whole upstream chain - and path, the absolute path of the written file (or "" if nothing was saved). path is handy if you're stringing this into a node that wants a file location, or just to confirm where the file went.

How to install

This is one node in the orion4d/ComfyUI_DAO_master pack:

cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/ComfyUI_DAO_master.git
pip install ezdxf        # or pip install -r requirements.txt

Restart ComfyUI after installing. No models involved.

Common issues

The classic gotcha is "I saved it but where is it?" - the path output is absolute, so wire it into a Show Text or preview node and read the exact location. If the node writes nothing, check that save_file is actually on and filename isn't blank; both are silently tolerated. And if you're opening the output in a vector editor and seeing units you didn't expect, the units come from the document's header - which is set by DXF New when you picked units, so fix it upstream, not here.

CategoryDAO_master/DXF/Utils

Inputs (5)

NameTypeDefaultDescription
dxfDXF
directorySTRINGoutput/dxf
filenameSTRINGshape.dxf
timestamp_suffixBOOLEANtrue
save_fileBOOLEANtrue

Outputs (2)

NameTypeDescription
dxfDXF
pathSTRING