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

πŸ’­ PD Custom Context

{task}, {department}, whatever the studio needs

By TheOnlyAaronΒ·Created 5 months agoΒ·Updated 5 months agoΒ· 4
πŸ’­ PD Custom Context
  • context
  • context
β—„custom_1_nameβ–Ί
β—„custom_1_valueβ–Ί
β—„custom_2_nameβ–Ί
β—„custom_2_valueβ–Ί
β—„custom_3_nameβ–Ί
β—„custom_3_valueβ–Ί
β—„custom_4_nameβ–Ί
β—„custom_4_valueβ–Ί
β—„custom_5_nameβ–Ί
β—„custom_5_valueβ–Ί

Pipedream is built around a token engine: you write a filename template like {project}/{sequence}/{shot}/{shot}_{version}_{date}, and the output nodes swap in values from a context dict. Out of the box that dict has the usual VFX metadata - project, sequence, shot, version, artist. But real pipelines always have their own vocabulary. The comp department wants {task} in the filename, the lighting pass wants {department}, the whole thing lives under {element}. That's the gap πŸ’­ PD Custom Context exists to fill: it adds up to five of your own key/value pairs to a context, and from that point on you can use them as {anything} in any template downstream.

How it works

The context is just a dict that flows down a wire as the PROJECT_CONTEXT type. This node reads the incoming context (if you give it one), merges in every row where the name field is non-empty, and hands the result out the context output. The pattern is the same as everywhere else in this pack: chain it after πŸ’­ PD Project Context for custom tokens, then feed the merged context into an output node.

A typical chain looks like:

PD Project Context (project=DITC_Ep01, shot=sh020)
    β†’ PD Custom Context (task=comp, element=BG)
        β†’ PD Output Relative

That makes {task} and {element} resolve in the filename template, alongside the project/sequence/shot tokens from upstream. Non-empty names win; if a name is blank, the whole row is skipped, which is how you ignore the pairs you don't need.

The inputs that matter

There are five name/value pairs, each a plain string - custom_1_name / custom_1_value up through custom_5_name / custom_5_value. The schema marks all ten as required, but that's "required with an empty default" - you genuinely leave most of them blank. The only two things you'll touch:

  • The name field - this is the token. Keep it a single lowercase word with no spaces (task, department). The token engine matches \w+, so a space or a hyphen quietly breaks the match and the literal {my task} lands in your filename.
  • The value field - whatever text you want substituted.

There's also an optional context input if you want to extend a context that already exists instead of starting fresh. The output is a single context (PROJECT_CONTEXT), which wires into any other Pipedream node that accepts one.

Install

Every node in the pack ships the same way:

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

Restart ComfyUI and the Pipedream nodes show up under the "Pipedream" category (with the πŸ’­ prefix). Or use ComfyUI Manager and search for "Pipedream". The nice part: requirements.txt is literally a comment - zero dependencies, no model downloads, Python 3.10+ is all you need.

Gotchas

  • Token names are case-sensitive. {Task} is a different (missing) token from {task}, and unknown tokens aren't dropped - they're left in place with a warning printed to the console. A typo becomes a very visible artifact in your filename, which honestly makes it easier to debug than a silent failure.
  • Don't use a custom name that collides with a built-in token like date or frame; the explicit context value wins, but you'll confuse the next person reading the workflow.
  • This node changes nothing by itself. It just annotates a dict - wire the output somewhere that actually consumes context or you've built a very small filing cabinet.

If you only need one extra token, you could hardcode it into every output template and skip this node. The reason you don't is the same reason the whole pack exists: one context node upstream means the filename lives in one place, and your render farm isn't the only thing that cares about consistent naming.

CategoryPipedream

Inputs (11)

NameTypeDefaultDescription
custom_1_nameSTRINGβ€”
custom_1_valueSTRINGβ€”
custom_2_nameSTRINGβ€”
custom_2_valueSTRINGβ€”
custom_3_nameSTRINGβ€”
custom_3_valueSTRINGβ€”
custom_4_nameSTRINGβ€”
custom_4_valueSTRINGβ€”
custom_5_nameSTRINGβ€”
custom_5_valueSTRINGβ€”
contextoptPROJECT_CONTEXTβ€”

Outputs (1)

NameTypeDescription
contextPROJECT_CONTEXTβ€”