Nodes/Bubba Nodes/Bubba Filename Builder
ComfyUI Node

Bubba Filename Builder

Bubba Filename Builder

By bubbafett5611·Created 5 months ago·Updated 2 months ago· 0
Bubba Filename Builder
  • pipe
  • metadata
  • pipe
  • metadata
  • save_prefix
character_nameCharacter
scene_nameScene

If you've ever stared at an output folder full of ComfyUI_00001_ files and lost the will to live, this node is aimed at you. Bubba Filename Builder takes two strings - a character name and a scene name - and turns them into a clean relative save prefix like Character/Scene. You wire that into Bubba Save Image, and your renders land in output/Character/Scene/ instead of an undifferentiated pile.

The mechanism is deliberately tiny: character_name becomes the folder, scene_name becomes the filename. The node's own tooltips say it plainly - "Output folder name" for the character, "Output file name" for the scene. Both are single-line strings with sane defaults (Character / Scene), so the node works the moment you drop it in and gets better the moment you type real names.

What actually comes out

The headline output is save_prefix, a STRING like alice/rooftop. That's the thing you wire to Bubba Save Image's save-prefix input, which turns it into the on-disk path and also records it in the metadata as save_prefix.

And that metadata tie-in is the sneaky part. The node accepts an optional pipe and metadata, and it writes the prefix into them. So even if you never look at the save_prefix output directly, the filename decision travels in the pipe - and when Bubba Save Image later embeds bubba_metadata into the PNG, the save path is part of the provenance record. Reload that PNG with Bubba Load Image (With Metadata) later and the path comes back with it.

Why two fields instead of one big string

Because the split is the point. Character name as folder, scene name as file means you get a stable grouping structure: every render of Alice lives in one folder regardless of which scene it was, and every scene is findable by name. That's the naming convention that survives a thousand images. If you want to go further - add a seed, a date, a model name - the clean move is to leave this node producing the two-part prefix and let Bubba Save Image append its own numbering or use a separate string-builder to enrich the filename.

The pack's own docs note it supports the legacy filepath metadata key from older saved workflows - those still load and migrate to save_prefix, so an old image you saved with the previous scheme keeps working when you reload it.

Where it sits in the pack

This is a "Workflow" category node, which in Bubba terms means it's scaffolding. The recommended pipeline is: load a pipe, build your prompt, generate, then let this node decide where it all goes before Bubba Save Image commits it. It's also the natural destination for a character_name that another node produced - say a loop or a prompt randomizer that's generating a batch of characters - so the filenames stay in sync with what's being drawn.

Install

Same one-pack install as everything else here:

cd ComfyUI/custom_nodes
git clone https://github.com/bubbafett5611/Bubba_Nodes

or ComfyUI Manager → search "Bubba Nodes", then restart. ComfyUI 0.27.0+ required (V3 node API), no extra dependencies, nothing to download.

The one thing that bites people: if you never wire the save_prefix anywhere, the node quietly does nothing visible - it builds a string and hands it back, and if you didn't connect it, it's a no-op. It's a helper node, not a savior. Use it inside the Bubba save pipeline where the metadata side actually pays off, or don't bother; a plain string-format node does the same thing if you're not using the pipe.

CategoryBubba Nodes/Workflow

Inputs (4)

NameTypeDefaultDescription
character_nameSTRINGCharacterOutput folder name.
scene_nameSTRINGSceneOutput file name.
pipeoptBUBBA_PIPE
metadataoptBUBBA_METADATA

Outputs (3)

NameTypeDescription
pipeBUBBA_PIPE
metadataBUBBA_METADATA
save_prefixSTRING