π PD Project Context
How one node names every render your pipeline makes
- context
- context
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 tov001.
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
projecton 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_versiononly 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 likesh020simple and let spaces live in descriptions, not filenames.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| project | STRING | β | |
| sequence | STRING | β | |
| shot | STRING | β | |
| version | STRING | v001 | β |
| contextopt | PROJECT_CONTEXT | β | |
| artistopt | STRING | β | |
| auto_increment_versionopt | BOOLEAN | false | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| context | PROJECT_CONTEXT | β |