Nodes/BrainDead Nodes/BD Save Workflow Image
ComfyUI Node

BD Save Workflow Image

The \"workflow included\" card, drawn by the graph itself

By BizaNator·Created 8 months ago·Updated about 3 hours ago· 15
BD Save Workflow Image
  • image
  • logo_image
  • logo_mask
  • card
  • path
  • status
filename_prefixworkflow_card
title
subtitle
wordmarkBrainDead
wordmark_size34
bullets
chips
footnote
footerBrainDeadGuild.com · BrainDead.TV · github.com/BizaNator/ComfyUI-BrainDead
draw_graphtrue
image_blend1.00
stamp_versiontrue
workflow_name
workflow_version
formatpng
embed_workflowtrue
width1180
height680
quality88
accent#aa78ff
wordmark_color#16a34a
background_color#18181e
draw_logotrue
logo_mask_invertedtrue
logo_path
logo_height60
logo_margin18
logo_cornerbottom-right

ComfyUI can already export a picture of your canvas - right-click → Export (PNG/SVG). The catch is the words "right-click": it's manual, one at a time, and it only happens when you remember. BD Save Workflow Image is that same idea as a node, so the picture gets rendered during the run, titled, with the graph still embedded so the PNG opens by drag-and-drop.

If you post workflows or ship workflow templates, this is for you. If you only wanted the graph riding inside your output PNG, ComfyUI's own SaveImage already does that.

It does three jobs at once

Renders the BrainDead card. Same renderer the pack's template thumbnails come from (utils/thumbnail.py, lifted out of tools/make_thumbnail.py) - deliberately one implementation, so a node drawing its own card couldn't drift away from the thumbnails. Every knob the CLI accepts is exposed here, watermark included.

Takes its background from the graph, or from you. Left alone it draws a stylized LiteGraph-ish view of the current workflow: node boxes, bezier wires, BrainDead nodes titled in the accent colour. Connect an image and that still draws underneath - image_blend decides how much shows through.

Embeds the workflow. It writes workflow and prompt PNG text chunks the way SaveImage does, which makes the file re-openable, and why PNG is the default. JPEG has no text chunks, so a .jpg card is a picture of a workflow that cannot load as one.

How it finds the graph

Not on disk - in extra_pnginfo, which the frontend sends with every submission. If it isn't there (a headless caller that didn't post it), the status output says so instead of writing a file that looks fine and isn't. Same honesty for JPEG.

The outputs are card (the rendered IMAGE, for previewing in-graph), path (the absolute path written) and status (what was drawn, and whether the chunks went in).

The inputs that actually matter

  • filename_prefix - a name under the ComfyUI output dir, or an absolute path. There's no auto-incrementing _00001_ counter here, so two runs at the default workflow_card and you've overwritten the first card. Fold something variable into it.
  • draw_graph / image / image_blend - 1.0 is image only, 0.0 graph only, 0.5 mixes. Ignored with no image connected.
  • format / embed_workflow - keep them on png and true. That combination is the whole point.
  • title, subtitle, wordmark, bullets, chips, footnote, footer - the text chrome. First 8 bullets and first 6 chips are drawn; an empty wordmark hides that line and its dot. A blank title falls back to the workflow's own name if the graph carries one, otherwise "Workflow" - don't leave it empty and then wonder why the card says Workflow. Replace the default BrainDead footer.
  • workflow_name / workflow_version / stamp_version - the version label appended to the subtitle line.
  • accent / wordmark_color / background_color - hex (#aa78ff) or r,g,b (170,120,255), both work. It's a text field because ComfyUI has no colour picker for custom nodes.
  • logo_image / logo_mask / logo_mask_inverted / logo_path / logo_height / logo_margin / logo_corner - the watermark, and where people lose ten minutes. A ComfyUI MASK is inverted alpha - 1 means transparent, and LoadImage emits it that way - hence the default on logo_mask_inverted. Feed it a straight-alpha mask without flipping that to false and your logo is a blank square; connect logo_image with no mask and it composites as an opaque rectangle. logo_path points at a file on disk, which won't exist on a hosted ComfyUI, so use the IMAGE input there.

Install

Manager → search "BrainDead" → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/BizaNator/ComfyUI-BrainDead
cd ComfyUI-BrainDead
pip install -r requirements.txt

Then restart. The pack is large - around 113 nodes, a bundled Blender, Pixal3D weights that download on first use - but none of that is triggered by this node. It needs PIL, numpy and torch, which your ComfyUI already has. The heavy lines in requirements.txt (moge, pinned utils3d/pipeline, natten) belong to the Pixal3D nodes and are imported defensively, so a failed optional install won't take the pack down. Manager will still try, so the install isn't instant.

It's a V3-API node, so run a current ComfyUI. It's also registered as an output node: it runs every queue. Note the category is BrainDead/save, not the cache group the README files everything else under.

Gotchas

  • The card isn't your render. It's a separate file about the workflow, not a replacement for SaveImage. You'll want both.
  • A JPEG card has no graph in it. That's a format limit, not a bug - status will confirm it.
  • Sending the prompt from code? Include extra_data.extra_pnginfo.workflow, or you get a lovely card with no graph drawn and nothing embedded. The frontend always sends it; your script has to.
  • Posting the PNG somewhere that recompresses - Reddit, most CDNs, any inline Discord preview - strips the text chunks. The card looks right and the file is no longer loadable.

Which is the honest summary of who this is for. The polish is chrome; the load-bearing part is embed_workflow on PNG, which any ComfyUI output already has. What this buys you is a publishing tool - one place that renders your pack's template thumbnails and the "workflow included" card you paste into a post, from the same code. If that's a weekly job, it earns its slot.

CategoryBrainDead/save

Inputs (31)

NameTypeDefaultDescription
filename_prefixoptSTRINGworkflow_cardOutput name under the ComfyUI output dir, or an absolute path. The extension is set by `format`.
titleoptSTRINGBig headline. Empty = the workflow's own name if one is known.
subtitleoptSTRING
wordmarkoptSTRINGBrainDeadThe small top line above the title. Empty hides it and the accent dot. Colour it with wordmark_color.
wordmark_sizeoptINT348–200Point size of the wordmark line.
bulletsoptSTRINGOne bullet per line. First 8 are drawn.
chipsoptSTRINGComma-separated tag chips. First 6 are drawn.
footnoteoptSTRING
footeroptSTRINGBrainDeadGuild.com · BrainDead.TV · github.com/BizaNator/ComfyUI-BrainDeadBottom bar text. Empty to omit.
imageoptIMAGEUse THIS as the background instead of drawing the graph — a screenshot, a render, anything. Wins over the graph.
draw_graphoptBOOLEANtrueAuto-draw the current workflow as the background. STILL draws when an image is connected -- use image_blend to mix them. False = no graph.
image_blendoptFLOAT1.000–1How much of the connected image to show over the graph. 1.0 = image only, 0.0 = graph only, 0.5 = both. Ignored with no image.
stamp_versionoptBOOLEANtrueAppend the workflow name/version to the subtitle line.
workflow_nameoptSTRINGLabel to stamp. Empty = taken from the graph if it carries one.
workflow_versionoptSTRINGVersion to stamp alongside the name, e.g. 'v16'.
formatoptCOMBOpngpng embeds the workflow (openable in ComfyUI). jpg cannot carry text chunks — card only, no embedded graph.
embed_workflowoptBOOLEANtrueWrite the workflow + prompt into the PNG text chunks, exactly as ComfyUI's SaveImage does. PNG only.
widthoptINT1180256–8192
heightoptINT680256–8192
qualityoptINT881–100JPEG quality. Ignored for png.
accentoptSTRING#aa78ffAccent colour - top bar, bullets, the dot, BD node titles. Hex '#aa78ff' OR r,g,b '170,120,255' -- both work. ComfyUI has no colour-picker widget for custom nodes, so this is a text field. Clear it to fall back to the default.
wordmark_coloroptSTRING#16a34aColour of the wordmark line. Hex '#aa78ff' OR r,g,b '170,120,255' -- both work. ComfyUI has no colour-picker widget for custom nodes, so this is a text field. Clear it to fall back to the default.
background_coloroptSTRING#18181eCard background. Hex '#aa78ff' OR r,g,b '170,120,255' -- both work. ComfyUI has no colour-picker widget for custom nodes, so this is a text field. Clear it to fall back to the default.
draw_logooptBOOLEANtrueComposite the brand watermark.
logo_imageoptIMAGEUse THIS as the watermark instead of a file on disk. Wins over logo_path. Works on hosted ComfyUI, where a path would not exist. ComfyUI IMAGE is RGB, so connect logo_mask too or the logo composites as an opaque rectangle.
logo_maskoptMASKAlpha for logo_image -- connect LoadImage's MASK output. Without it the logo has no transparency.
logo_mask_invertedoptBOOLEANtrueComfyUI's MASK is INVERTED alpha: 1 means transparent. LoadImage emits it that way, so this defaults to True. Set False only if your mask is already straight alpha (1 = opaque), otherwise the logo comes out as a blank square.
logo_pathoptSTRINGWatermark file on disk. Ignored when logo_image is connected. Empty = the repo logo.
logo_heightoptINT608–1024
logo_marginoptINT180–512
logo_corneroptCOMBObottom-right4 options: bottom-right, bottom-left, top-right, top-left

Outputs (3)

NameTypeDescription
cardIMAGEThe rendered card, for previewing in-graph.
pathSTRINGAbsolute path of the file written.
statusSTRINGWhat was drawn and whether the workflow could be embedded.