Nodes/ComfyUI-TinyBee/Encode Any Property
ComfyUI Node

Encode Any Property

Wrap a Value So It Can Travel With Your Workflow

By TinyBeeman·Created about a year ago·Updated about a month ago· 1
Encode Any Property
  • property_value
  • property
property_nameproperty
property_typeUNKNOWN

ComfyUI is built on typed wires: images, tensors, strings, floats. There is no native "this is a named piece of data with a type and a value" wire - which is a pain when you want to collect a pile of metadata (a prompt, a seed, a model name, a score) and hand it to a save node or a queue system as one structured bundle. That's the gap TinyBee's property system fills, and Encode Any Property is the node that creates a single property from any value you give it. Think of it as putting a label on a value so the rest of the pipeline can treat it as data.

How it works

Three inputs, one output:

  • property_name - the label (default "property").
  • property_value - the value, and here's the nice part: it accepts any type (*), so you can wire a string, an int, a float, a boolean, or even a list/object in.
  • property_type - a dropdown: STRING, INT, FLOAT, BOOLEAN, OBJECT, LIST, JSON, NULL, UNKNOWN. Default is UNKNOWN, which means "figure it out."

The output property is a TINYPROP: a JSON object of the form {"name": ..., "type": ..., "value": ...}.

What UNKNOWN triggers is a genuinely useful auto-detection. A string that parses as valid JSON becomes type JSON (with the value re-serialized); a bare 5 becomes INT; 3.5 becomes FLOAT; a dict becomes OBJECT; a list becomes LIST; None becomes NULL. So you can usually leave the type alone and let the node infer it. The explicit dropdown exists for the cases where inference gets it wrong or you want to force a type.

Where you'd actually use it

  • Metadata assembly: wrap a seed, a prompt, a CFG value, and a model name into separate TINYPROPs, then combine them with TinyBee's Combine Properties into one TINYPROPS bundle for a save node.
  • Queue-style workflows: this pack's Queue category is built around passing property bundles around - Encode Any Property is where those bundles start.
  • Typed bookkeeping: keep values carrying their type explicitly instead of everything degrading to a string.

Installing it

Part of ComfyUI-TinyBee under 🐝TinyBee/Queue:

  1. ComfyUI Manager → Install Custom Nodes → search "ComfyUI-TinyBee" → Install, then restart ComfyUI.
cd ComfyUI/custom_nodes
git clone https://github.com/TinyBeeman/ComfyUI-TinyBee

Restart. No models; this node is a bit of JSON wrapping and needs nothing beyond the standard library - the pack's requirements.txt (pillow, jsonata) isn't involved.

Gotchas

The UNKNOWN type inference is usually right, but its JSON check has a quirk: a string that happens to be valid JSON (like "3" or "[1,2]") gets typed as JSON and re-serialized, so a prompt that's accidentally JSON-shaped will come back as a JSON value rather than a plain string. If your metadata is quirky, set the type explicitly. Also, the property is a dict, not a string - if you want the JSON text, you'll combine it (Combine Properties has a JSON-string output) or serialize downstream. And NULL types null out the value (None), so don't pick it unless you mean it.

Category🐝TinyBee/Queue

Inputs (3)

NameTypeDefaultDescription
property_nameSTRINGproperty
property_value*
property_typeCOMBOUNKNOWN9 options: STRING, INT, FLOAT, BOOLEAN, OBJECT, LIST, +3

Outputs (1)

NameTypeDescription
propertyTINYPROP