Nodes/Yumil MPM/Yumil Value Reader
ComfyUI Node

Yumil Value Reader

Grab one setting out of a key=value string without parsing it yourself

By maigonia·Created 6 months ago·Updated about a month ago· 0
Yumil Value Reader
    • result
    value
    key
    default_value

    A Value(...) block in a Yumil prompt carries settings as a comma-separated key=value string: strength=0.8,mode=ipadapter. That's great for bundling metadata into a prompt, and useless to a ControlNet node, which wants a number, not prose. Yumil Value Reader is the little extractor that pulls one key out of that string and returns its value - or a default you set, if the key isn't there.

    It's the end of the pack's metadata pipeline. Parser extracts the blocks, Block Selector picks one block and hands you its raw value string, and then you need this node per setting you care about. Want both strength and mode? Drop in two Value Readers, same value input, different key - one authoritative source, fanned out to multiple consumers, which is the canonical plumbing-layer move.

    How it works

    Straightforward and robust about whitespace: it splits the input on commas, then each pair on the first =, and trims both sides before comparing. So "strength=0.8, mode=ipadapter" reads cleanly even with the sloppy spacing people actually type. If the key matches, you get the value; if it doesn't (or the input or key is blank), you get default_value.

    Inputs and output

    • value - the key=value string, typically from Yumil Block Selector's value output. It's forceInput, so wire it rather than typing.
    • key - the key to look up. Case-sensitive exact match on the trimmed key, so Strength won't find strength.
    • default_value - what comes back when the key isn't found. Default empty string. This is the safety valve: set it to something sensible and a missing key won't propagate None into a node that wants a number.

    The single result output is a plain STRING. It does not convert types - strength=0.8 comes out as the text "0.8", and whatever consumes it (ControlNet strength widget, IPAdapter input) will need a convert-to-number step if it doesn't accept a string. That's the one thing that catches people: the read is text-typed by design, so don't expect an INT or FLOAT socket out of it.

    Real limits worth knowing

    • A comma inside a value breaks it. The split is on = and ,, so Value(prompt=hello, world) would split world off as a separate malformed pair. Keep values comma-free; the format is designed for simple scalars, not prose.
    • It reads one key per instance. No wildcard, no "return all" mode - if you want three keys, you use three nodes.

    Install is the pack, as usual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/maigonia/comfyui-yumil-mpm.git
    cd comfyui-yumil-mpm
    pip install -r requirements.txt
    

    or ComfyUI Manager → search comfyui-yumil-mpm → restart, then it sits under the Yumil category. It's a few lines of parsing - no models, no extra dependencies - so troubleshooting is limited to the two things above: the exact key spelling and the comma-in-value limitation. When both check out, it quietly does the one job it was built for.

    CategoryYumil/Block

    Inputs (3)

    NameTypeDefaultDescription
    valueSTRINGKey=value string from Block Selector value output.
    keySTRINGKey to look up.
    default_valueSTRINGReturned if key is not found.

    Outputs (1)

    NameTypeDescription
    resultSTRING