Extract Config Value
Unpack a config bundle anywhere in your graph, wirelessly
- value
The companion to UniversalProjectConfig. That node packs a dozen settings into a single JSON string and outputs it on one pin; this node is the wireless receiver that unpacks it. Instead of running a wire across your entire graph to every node that needs a setting, you plumb one bundle into this little box wherever you are, pick a key, and out pops the value with the right type.
Inputs: config_bundle (the JSON string from UniversalProjectConfig - its forceInput flag makes it a proper wire-able input rather than a text field), key, and default_fallback. The key dropdown is generated from the pack's schema, so it offers the same named settings you set on the config side: initial_upscale, final_upscale, tight_crop, blend_opacity, stitch_opacity, fuzz_tolerance, edge_uniformity, crop_pad_px, subject_mask, inpaint_prompt, outpaint_prompt, and a few more. There's also a <missing_or_custom> option if you're feeding it a bundle from somewhere else or a key you typed by hand.
The single output is typed as * (ANY_TYPE), which is the clever bit - the node reads the JSON, finds the value for your key, and emits it as the matching Python type: bool for booleans, float when there's a decimal point, int otherwise, string for text. So a tight_crop pulls out as a real boolean you can plug into a node's boolean input, and initial_upscale comes out as a float ready for an upscale node. If the key is missing from the bundle, it falls back to the schema's default for that key, then to default_fallback, then to 0.0. Nothing here does heavy lifting - it's JSON parsing plus type coercion, executed on the CPU in microseconds.
The use case is graph hygiene. Big workflows end up with the same numbers duplicated in six nodes, and every edit is a treasure hunt. Bundle the settings once in UniversalProjectConfig, feed the bundle to Extract nodes placed next to the consumers, and there's exactly one place to change a value. The README calls it "the wireless receiver," which is an honest description.
Install
Part of PortraitUtils - Manager → search "PortraitUtils", or:
cd ComfyUI/custom_nodes
git clone https://github.com/heyburns/PortraitUtils
Restart. No extra dependencies.
Common issues
- Output is always the fallback/0.0 - the key isn't in the bundle. Check the
keyspelling and that the bundle actually came from the pack's schema (a bundle from an older graph with a different schema won't have every key). - It returns a string where you expected a number - type inference is decimal-based, so a value that should be an int will come out as a float if it was serialized with a
.0. That's usually fine since numeric inputs accept floats. - It does nothing visible - right, it's not an image node. Wire its output into whatever consumes the setting; it has no preview.
If you've ever rebuilt a workflow from a screenshot because someone changed a number in a node you couldn't find, this is the node that ends that particular circle of hell.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| config_bundle | STRING | — | |
| key | COMBO | initial_upscale | 13 options: <missing_or_custom>, initial_upscale, final_upscale, tight_crop, blend_opacity, stitch_opacity, +7 |
| default_fallback | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | * | — |