Nodes/MD Nodes/MD: Dynamic LoRA Stacker (Style Butler)
ComfyUI Node

MD: Dynamic LoRA Stacker (Style Butler)

Stack LoRAs like a preset bank — MD's Style Butler, minus the hype

By MDMAchine·Created about a year ago·Updated 3 months ago· 15
MD: Dynamic LoRA Stacker (Style Butler)
  • model
  • clip
  • model
  • clip
  • enhanced_prompt
  • style_info
style_presetNone
global_strength_multiplier1.00
base_prompt
override_prefix
override_suffix

MD_DynamicLoRAStacker is a "style preset" that applies a whole stack of LoRAs at once, with per-LoRA weights and a prompt prefix/suffix to match. Think of it as a saved look: pick Cinematic_Film from the dropdown and it tries to load three or four LoRAs, patches them into your model and CLIP, and wraps your prompt in "cinematic, dramatic lighting, film photography, ..." automatically.

The name overpromises a little - this is not a smart stylistic AI. It's a YAML-driven LoRA loader with prompt templating, which is genuinely useful if you maintain a handful of recurring looks and are tired of rebuilding LoRA stacks by hand. It's a quality-of-life node, not a magic button.

How it works

Every style lives in lora_styles.yaml, which ships in the pack's lora/ folder. A style entry lists up to 10 LoRAs with strength_model and strength_clip values, plus a prompt_prefix, prompt_suffix, and description. When you hit a preset, the node:

  1. Loads each named LoRA from your ComfyUI/models/loras folder,
  2. Scales its strength by the global_strength_multiplier,
  3. Applies it via ComfyUI's standard load_lora_for_models path,
  4. Builds enhanced_prompt as prefix + base_prompt + suffix.

That last bit is why the prompt outputs are there. If you'd rather not type prompts into the node, you can run the enhanced prompt out into a standard CLIP text encode instead.

The inputs that matter

  • style_preset - the dropdown of 23 shipped presets, or None to skip. The file is there to be edited; the shipped names are scaffolding.
  • global_strength_multiplier - scales every LoRA in the stack. 0.5 halves everything, 1.0 uses the YAML values as-is.
  • base_prompt - your actual subject. It gets wrapped by the preset's prefix/suffix.
  • override_prefix / override_suffix - replaces the preset's tags if you want a modified look without editing YAML.

Outputs: the patched model and clip (into your KSampler), the enhanced_prompt string, and a style_info report showing how many LoRAs actually loaded.

Where people get burned

Here's the honest catch, and it's the trap that makes people think the node is broken: the shipped YAML references filenames like add-detail-xl.safetensors and cinematic_lighting_v2.safetensors that you almost certainly don't have. The node handles this gracefully - it logs LoRA not found - Skipping and carries on with just the prompt tags - so a preset can "work" while silently loading zero LoRAs. Open the style_info string output to see the real load count. Before you rely on a preset, either install the named files or edit the YAML to point at LoRAs you actually own. That's the intended workflow: this is your personal preset bank, pre-seeded with examples.

Installing

Part of the MD Nodes pack, so install the whole thing once:

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 in ComfyUI Manager, search for MD Nodes and install. Restart ComfyUI after. The node needs pyyaml for the YAML loading - it's a standard dependency but the code will warn loudly if it's missing. No model files to download for this node itself; just make sure the LoRAs your styles reference are on disk.

CategoryMD_Nodes/LoRa

Inputs (7)

NameTypeDefaultDescription
modelMODELMODEL INPUT • Purpose: The base diffusion model. • Action: Selected LoRAs will be patched into this model.
clipCLIPCLIP INPUT • Purpose: The text encoder. • Action: Selected LoRAs will be patched into this encoder.
style_presetCOMBONoneSTYLE PRESET • Purpose: Loads a pre-configured LoRA stack from lora_styles.yaml. • Action: Applies multiple LoRAs, weights, and prompt tags instantly. ⭐ Tip: Edit the YAML file to create your own custom studio presets.
global_strength_multiplierFLOAT1.000–3GLOBAL STRENGTH MULTIPLIER • Purpose: Scales the intensity of the entire preset stack. • Note: 1.0 uses YAML values exactly. 0.5 cuts all strengths in half. ⭐ Recommended: 1.0.
base_promptoptSTRINGBASE PROMPT • Purpose: Your main subject prompt. • Action: The node will automatically wrap this with the preset's prefix/suffix.
override_prefixoptSTRINGOVERRIDE PREFIX • Purpose: Replaces the preset's default prefix with your own.
override_suffixoptSTRINGOVERRIDE SUFFIX • Purpose: Replaces the preset's default suffix with your own.

Outputs (4)

NameTypeDescription
modelMODEL
clipCLIP
enhanced_promptSTRING
style_infoSTRING