Nodes/MD Nodes/MD: YAML Configuration Tool
ComfyUI Node

MD: YAML Configuration Tool

The settings-as-files layer behind MD's samplers

By MDMAchine·Created about a year ago·Updated 3 months ago· 15
MD: YAML Configuration Tool
    • yaml_config_str
    • preset_info_string
    base_presetNone
    merge_strategyOverride (Smart Merge)
    force_updatefalse
    manual_edits# Type overrides here (e.g. cfg_scale: 5.0) # These will replace values in the Base Preset.
    save_new_preset_as
    debug_logfalse

    Most ComfyUI parameters live in little text boxes on the canvas. MD_YAML_Generator takes a different bet: your sampler and guider settings should live in YAML files you can version, diff, and share, and the node should be the thing that loads them. It's the configuration backbone of this pack - the PingPong sampler family and the APG guider accept a yaml_settings_str and are clearly designed to be driven from these files - and if you're using those nodes, this is how you keep 30+ parameters sane.

    If you're not using MD's samplers and guiders, be honest about the value here: it's a general-purpose YAML loader with a merge UI, but the pre-shipped presets are all tuned for the pack's own audio-diffusion and guidance workflows. That's the intended audience.

    How it works

    The node scans a yaml_presets folder for .yaml/.yml files - that folder lives inside the pack's own directory (ComfyUI_MD_Nodes/yaml_presets), not in your models folder, so if you want to add presets that's where they go. The base_preset dropdown lists everything found, recursively, including subfolders like guidance/. On execution it loads the chosen file and merges your manual overrides into it.

    The three inputs that matter:

    • base_preset - the YAML file to load (55 presets ship with it, mostly APG/HyperGuider configs for ACE-Step).
    • merge_strategy - Override (Smart Merge) replaces base values with your edits; Append Only just adds new keys; Pure Manual ignores the base file entirely. Override is the sensible default.
    • manual_edits - a YAML string you paste in, like cfg_scale: 5.0, that gets merged on top. Strict YAML: two spaces, no tabs.

    The optional save_new_preset_as writes the merged result back to disk as a new preset file, which is how you turn a good tweak into a reusable config. force_update (a boolean) bypasses the node's result cache so it re-reads the file on every run - the author recommends leaving it off for speed. And there's a debug_log that prints exactly which values changed during the merge, which is the closest thing to a diff view you'll get.

    Outputs: yaml_config_str is the final merged YAML as a string, ready to feed into a yaml_settings_str input on a PingPong or APG node, and preset_info_string carries metadata about which preset and merge produced it.

    Gotchas

    The cache is the classic trap: ComfyUI caches node output, so edit your YAML file, re-run, and nothing changes until you flip force_update. The other one is YAML syntax - a stray tab or a missing indent and the merge silently does something you didn't intend; debug_log exists precisely for this. And remember the presets are pack-specific: copying a guidance/ preset into a non-ACE-Step workflow is not going to mean anything to your sampler.

    Installing

    This node is part of MD Nodes:

    cd path/to/ComfyUI/custom_nodes
    git clone https://github.com/MDMAchine/ComfyUI_MD_Nodes.git
    cd ComfyUI_MD_Nodes && pip install -r requirements.txt
    

    Or via ComfyUI Manager - search MD Nodes - then restart ComfyUI. As with everything in this pack, the requirements file pulls in a lot more than YAML parsing (audio libraries, matplotlib, Ollama clients), so budget for that.

    Bottom line: if you live in the PingPong/APG world, this is the "save my 40 dials as a file" node that makes experiments repeatable. Otherwise it's a well-built tool looking for a problem you may not have.

    CategoryMD_Nodes/Utility

    Inputs (6)

    NameTypeDefaultDescription
    base_presetCOMBONoneBASE PRESET • Purpose: The foundational YAML file to load. • Requirement: Files must be stored in the 'yaml_presets' folder.
    merge_strategyCOMBOOverride (Smart Merge)MERGE STRATEGY • Purpose: How manual edits interact with the base preset. • Override: Replaces base values with your manual edits. • Append Only: Only adds new keys, ignores existing ones. • Pure Manual: Ignores the base preset entirely. ⭐ Recommended: Override (Smart Merge).
    force_updateBOOLEANfalseFORCE UPDATE • Purpose: Bypasses caching to re-read the file every generation. ⭐ Recommended: Only on Change (Faster).
    manual_editsoptSTRING# Type overrides here (e.g. cfg_scale: 5.0) # These will replace values in the Base Preset.MANUAL EDITS • Purpose: YAML string to merge with the base preset. • Warning: Must use exact YAML syntax (2 spaces, no tabs).
    save_new_preset_asoptSTRINGSAVE AS NEW PRESET • Purpose: Saves the final merged result to disk. • Requirement: Leave blank unless you want to create a new file.
    debug_logoptBOOLEANfalseDEBUG LOG • Purpose: Prints exactly which values were changed during the merge.

    Outputs (2)

    NameTypeDescription
    yaml_config_strSTRING
    preset_info_stringSTRING