Nodes/comfyui-conduit-optimizer/🌿 Conduit Path (Speculative Gen)
ComfyUI Node

🌿 Conduit Path (Speculative Gen)

Speculative generation, on paper

By JosephOIbrahimΒ·Created 8 months agoΒ·Updated 8 months agoΒ· 1
🌿 Conduit Path (Speculative Gen)
  • conduit_plan
  • speculation_config
β—„initial_branches4β–Ί
β—„checkpoint_pct0.25β–Ί
β—„prune_ratio0.50β–Ί
β—„scoring_methodβ–Ύβ–Ί
β—„target_promptβ–Ί

Conduit Path is the pack's speculative-generation planner. The idea is a good one and you've probably felt it already: instead of committing one seed and one 20-step run and hoping, you start several candidate generations, score them partway through, kill the losers, and spend the remaining compute on the winner. Path turns that strategy into a config object (CONDUIT_PATH) that describes exactly how many branches, when to checkpoint, and how hard to prune.

How it works

Path is a pure config builder - it doesn't sample anything. Feed it initial_branches, checkpoint_pct, and prune_ratio, and it computes a checkpoint schedule: start N branches, run to X% of steps, keep the top (1 - prune_ratio) of them, repeat until one survives, finish that one at 100%. The output includes that schedule and an estimated_compute_savings figure derived from the geometry of the prune ladder. The README's worked example - 4 branches at 25% β†’ keep 2 β†’ keep 1, "~50% compute cost" - is exactly what this node calculates.

There are three knobs worth understanding:

  • initial_branches (default 4, 2–16) - how many seeds you launch. More branches means better odds of a winner and more upfront compute.
  • checkpoint_pct (default 0.25) - when you score. Too early and you can't tell the good from the bad; too late and you've already paid for the losers.
  • prune_ratio (default 0.5) - how many you kill at each checkpoint.

scoring_method offers clip_similarity, aesthetic, and hybrid as the scoring philosophies, and target_prompt is where you'd describe what "good" means. The honest footnote: these scoring fields are carried in the config, but the functional node that would execute this plan, ConduitSpeculativeKSampler, currently scores with a latent-statistics heuristic rather than real CLIP similarity. So Path describes the strategy the pack aspires to, and the sampler implements a simplified version of it.

Output

One output: speculation_config of type CONDUIT_PATH. It's meant to flow into ConduitApply (which acknowledges it) alongside the other config objects.

Install

Standard pack install:

cd ComfyUI/custom_nodes
git clone https://github.com/joe002/comfyui-conduit-optimizer

Or via ComfyUI Manager, search "comfyui-conduit-optimizer", then restart. No model downloads; PyTorch 2.0+ is the only requirement.

Common issues

The most common confusion is expecting Path to do the generating. It won't - you need the Speculative KSampler for that, and if you're only ever going to install one node from this pack, that's the one. Path is planning scaffolding: useful for understanding the prune schedule and for future-proofing a workflow, but on its own it changes nothing about your output. Also note that while the README calls speculative generation "parallel," the current sampler runs its branches sequentially - a real 8-branch fan-out costs you 8x the first checkpoint's compute before pruning pays off, so tune initial_branches with your patience (and step count) in mind.

CategoryConduit/Sampling

Inputs (6)

NameTypeDefaultDescription
initial_branchesINT42–16β€”
checkpoint_pctFLOAT0.250.1–0.5β€”
prune_ratioFLOAT0.500.25–0.75β€”
scoring_methodCOMBO3 options: clip_similarity, aesthetic, hybrid
target_promptoptSTRINGβ€”
conduit_planoptCONDUIT_PLANβ€”

Outputs (1)

NameTypeDescription
speculation_configCONDUIT_PATHβ€”