Nodes/c4f-wire-loom/Loom Sampler In
ComfyUI Node

Loom Sampler In

Swap samplers from one subgraph, not a dozen wires

By Codes4Fun·Created 3 months ago·Updated about a month ago· 0
Loom Sampler In
  • loom
  • sampler
  • LOOM
label

In the modern sampler stack, SamplerCustom takes an actual SAMPLER object - a KSamplerSelect or SamplerCustomAdvanced wrapper - and that's a wire you end up duplicating in every branch. Loom Sampler In bundles a SAMPLER into a LOOM stream so one sampler choice drives the whole graph.

Why you'd reach for it

The c4f-wire-loom README's Lens demo is exactly this: a sampler subgraph that picks a sampler (the demo switches to a turbo variant with a boolean widget) and pushes the result into the loom. Every sampling stage downstream pulls the same SAMPLER out, so changing one widget changes the sampler everywhere - no hunting through a dozen KSamplerSelect nodes.

It also composes with the "looms inside looms" trick. Keep your main sampler in the main loom, but nest a separate loom holding an upscale-pass sampler so its SAMPLER key doesn't collide with the primary one. Pull the right one out at the right stage.

How it works

The standard typed loom insert:

key = f"SAMPLER_{label}" if label else "SAMPLER"
new_loom[key] = sampler
return (new_loom,)

Empty label → SAMPLER; a label like upscaleSAMPLER_upscale. The matching Loom Sampler Out uses the same label. Drag a sampler slot onto a collapsed Loom Split hub and the frontend auto-creates the node with the label filled in.

The inputs that matter

  • sampler (SAMPLER): from KSamplerSelect, SamplerCustomAdvanced, or scheduler-based sampler nodes.
  • label (string): the key. Empty for the main sampler, named for stage-specific ones.
  • loom (LOOM, optional): the bundle to extend.

Output is a single LOOM, wired into Loom Split or Loom Join, with the sampler pulled back out via Loom Sampler Out inside each sampling subgraph.

Installing

Part of c4f-wire-loom. ComfyUI Manager → search "c4f-wire-loom" → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Codes4Fun/c4f-wire-loom

No model downloads, no extra dependencies - it routes existing sampler objects.

Where it bites

The stream rule bites hardest here because sampler subgraphs are usually far from the top of the graph: if the Loom Sampler In sits after a sampling stage, that stage gets no sampler and will fall back to its own defaults. Also remember that a SAMPLER is just a name plus configuration - it doesn't carry your scheduler or step count (those live in SIGMAS and other inputs, which you can also loom). And the pack-wide Nodes 2.0 arrow-drag collapse quirk applies, with the workaround shipped.

Categoryutils/route

Inputs (3)

NameTypeDefaultDescription
loomoptLOOM
sampleroptSAMPLER
labeloptSTRING

Outputs (1)

NameTypeDescription
LOOMLOOM