Nodes/Pipedream/πŸ’­ PD Project Context
ComfyUI Node

πŸ’­ PD Project Context

How one node names every render your pipeline makes

By TheOnlyAaronΒ·Created 5 months agoΒ·Updated 5 months agoΒ· 4
πŸ’­ PD Project Context
  • context
  • context
β—„projectβ–Ί
β—„sequenceβ–Ί
β—„shotβ–Ί
β—„versionv001β–Ί
β—„artistβ–Ί
β—„auto_increment_versionfalseβ–Ί

If you've ever written DITC_Ep01_sq010_sh020_v001 by hand in a Save Image widget, you've felt the problem this node exists to solve. πŸ’­ PD Project Context is the single source of truth for your shot metadata. You type project, sequence, shot, and version into it once, it emits a PROJECT_CONTEXT dict, and every Pipedream output node downstream resolves its filename tokens from that one place. Change the shot number in one widget and every file that render produces follows along.

How it works

The node builds a context dict from its widgets and passes it out as context. The genuinely clever part is override chaining: it accepts an optional incoming context, and any widget with a non-empty value overrides the incoming value, while empty widgets pass the incoming value through untouched. That's how you set up a base and then specialize:

PD Project Context (project=DITC, sequence=sq010)
    β†’ PD Project Context (shot=sh020, version=v001)
        β†’ PD Output Relative

The second node only overrides shot and version; project and sequence flow through from the first. One base context, per-shot overrides, zero duplicated typing. The packed-in README calls this exact pattern out, and it's the right way to use the thing.

The inputs that matter

The required four are all plain strings:

  • project - the show, e.g. DITC_Ep01.
  • sequence - e.g. sq010.
  • shot - e.g. sh020.
  • version - defaults to v001.

Optional: artist for who's working the shot, an incoming context for chaining, and auto_increment_version. That last one is a small gem: tick it on and every execution bumps the version widget (v001 β†’ v002), persisted in the node like a seed. Run a workflow, get v001; run it again, it's already rolled to v002. That alone kills an entire class of "I overwrote my approved render" accidents. The only output is context (PROJECT_CONTEXT), which feeds anything that accepts one - output nodes, πŸ’­ PD Custom Context, another Project Context.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/TheOnlyAaron/comfyui-pipedream

Restart ComfyUI, or install "Pipedream" via ComfyUI Manager. Zero dependencies, no model downloads, Python 3.10+ - it's plumbing, and it's proud of it.

Gotchas

  • The context wire doesn't show you what's inside it, which is disorienting at first. After execution, an output node downstream will display the resolved tokens - that's your inspection point. Until then, trust the chain.
  • Empty widgets deliberately pass through. That's a feature for chaining, but it means a blank project on a leaf node silently keeps the base value rather than clearing it. If you want to clear a value, put a space or set the upstream instead.
  • auto_increment_version only bumps when the workflow actually runs; queueing multiple batches in one go won't increment between queued items.
  • Token names are case-sensitive and must be single words (\w+), so keep values like sh020 simple and let spaces live in descriptions, not filenames.
CategoryPipedream

Inputs (7)

NameTypeDefaultDescription
projectSTRINGβ€”
sequenceSTRINGβ€”
shotSTRINGβ€”
versionSTRINGv001β€”
contextoptPROJECT_CONTEXTβ€”
artistoptSTRINGβ€”
auto_increment_versionoptBOOLEANfalseβ€”

Outputs (1)

NameTypeDescription
contextPROJECT_CONTEXTβ€”