Nodes/ComfyUi-MpiNodes/Mpi Style Selector
ComfyUI Node

Mpi Style Selector

One integer picks your style, its LoRA, and its trigger words

By MadPonyInteractive·Created 11 months ago·Updated 5 days ago· 3
Mpi Style Selector
  • model
  • clip
  • style
selector0
triggers
strength_model1.00
strength_clip0.00

A style is really two things glued together: a LoRA that shifts the model's aesthetic, and a trigger phrase that activates it. MpiStyleSelector is the router that holds both. One selector integer picks a style, and the MPI_STYLE bundle it emits carries the chosen trigger words, the model and clip, and the LoRA strengths - which the pack's MpiStyleLoras banks then apply. It's the brain; the banks are the muscles.

This is the node you reach for when a workflow needs to be a style machine: the same prompt, rendered in any of a dozen styles, chosen by a single number. That number could come from a sweep, a seed, a host app, or just a widget you flip between renders. Instead of muting and unmuting five LoRA loaders, you change one integer and the whole style chain reconfigures itself.

How it works

You give it a list of triggers, one style per line, and a selector. It picks line selector, bundles it up with the model/clip and strengths, and hands the whole thing to the first MpiStyleLoras bank as an MPI_STYLE. The banks do the actual LoRA loading. The contract to internalize:

  • Line N = style N. Line 1 pairs with lora_1 of the first bank, line 6 with lora_1 of the second bank, and so on.
  • selector 0 = no style. Model and clip pass through untouched, prompt comes out empty. Handy as an "off" position.
  • A line whose LoRA slot is None is a prompt-only style - trigger words, no LoRA.

The strength_model / strength_clip floats (defaults 1.0 and 0.0) apply to whichever LoRA is active. The default of strength_clip = 0 is a deliberate choice: many LoRAs are model-only, and a clip strength of 0 means the CLIP conditioning is untouched - leave clip unconnected entirely if you're going model-only.

The inputs that matter

  • model - the base model, in and through.
  • selector - the style index, 0–1000. The one knob you actually touch.
  • triggers - one style trigger per line. This is your style library.
  • strength_model / strength_clip - strengths for the active LoRA.
  • clip (optional) - for clip-aware LoRAs.

Output: a single style output of type MPI_STYLE. It only routes; the LoRA work happens downstream.

Install

Part of ComfyUi-MpiNodes. ComfyUI Manager (search "MpiNodes" / publisher "mad-pony-interactive"), or:

cd ComfyUI/custom_nodes
git clone https://github.com/MadPonyInteractive/ComfyUi-MpiNodes

Restart. No extra deps.

Where people trip

The line-order contract is the failure mode - it's invisible until it's wrong. Add a style in the middle of the triggers box without shuffling the LoRA slots and every style below it shifts, so you get "watercolor" applying the "cyberpunk" LoRA. Keep the trigger list and the bank slots in sync or the whole system quietly lies to you. And don't expect selector to do anything visible by itself: it outputs only MPI_STYLE, so if you haven't chained a MpiStyleLoras (or several) after it, nothing gets applied and the "selector" appears to do nothing.

CategoryMpiNodes/ModelOps

Inputs (6)

NameTypeDefaultDescription
modelMODEL
selectorINT00–1000Which style to use. 0 = none, 1 = first trigger line / lora_1 of the first bank.
triggersSTRINGOne style trigger per line. Line N is style N — keep the line order in sync with the lora slots.
strength_modelFLOAT1.00-10–10
strength_clipFLOAT0.00-10–10
clipoptCLIP

Outputs (1)

NameTypeDescription
styleMPI_STYLE