Nodes/BV Nodes/πŸŒ€ BV Vector Permutation
ComfyUI Node

πŸŒ€ BV Vector Permutation

Enumerate every ordering of a set of block indices

By BlackVortexAIΒ·Created 2 years agoΒ·Updated 11 months agoΒ· 3
πŸŒ€ BV Vector Permutation
  • vector
  • PERMUTATIONS
β—„indices_to_permuteβ–Ί

BV Vector Permutation is the combinatorial oddball of the vector family. Give it a vector plus a string of indices and it outputs every permutation of those indices - as strings, one per line. It doesn't change any weights; it enumerates orderings. For the right (narrow) job, that's surprisingly useful.

The block-weight connection: when you're exploring which arrangement of LoRA block strengths works, permutations are the brute-force tool. If you've settled on, say, four blocks to experiment with, the permutations of those four indices give you the full list of orderings to test. It turns a "have I tried this order yet?" hunch into an exhaustive list you can run through.

Inputs

  • vector (required) - the list. It's read for its length and contents, and it's what defines the universe your indices live in.
  • indices_to_permute (default empty string) - the indices to permute, as a string. Something like 0,1,2,3 - the comma-separated form matches what you'd see in a block-weight preset. Empty string gets you nothing out, so type something.

Output

  • PERMUTATIONS (STRING, list) - every ordering of the given indices, each as its own string. For 0,1,2 that's six strings; for 0,1,2,3 it's twenty-four. It grows factorially, so keep the set small unless you enjoy long lists.

The honest framing

This is a niche node even by this pack's standards, and its output is deliberately raw - you get the permutations as strings and then do whatever you want with them (log them, feed them elsewhere, wire them into an experiment runner). There's no validation that the indices you typed are within the vector's length, so an out-of-range index produces permutations that reference slots that don't exist.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/BlackVortexAI/ComfyUI-BVortexNodes.git

or ComfyUI Manager β†’ "BV Nodes", then restart. No dependencies, no models.

When to reach for it

If you're systematically testing block-weight orderings, it's a genuine time-saver - it's the difference between guessing and enumerating. If you just want to tune a couple of block weights, skip it; the edit nodes are the tool for that. Know which problem you're solving and this node is either the one you needed or one you'll never open.

CategoryπŸŒ€ BVortex Nodes/Vectors

Inputs (2)

NameTypeDefaultDescription
vectorLISTβ€”
indices_to_permuteSTRINGβ€”

Outputs (1)

NameTypeDescription
PERMUTATIONSSTRINGβ€”