Nodes/comfyui-conduit-optimizer/🎯 Conduit Gate (Precision Router)
ComfyUI Node

🎯 Conduit Gate (Precision Router)

Choose your precision without melting your GPU

By JosephOIbrahimΒ·Created 8 months agoΒ·Updated 8 months agoΒ· 1
🎯 Conduit Gate (Precision Router)
  • conduit_plan
  • precision_config
β—„modeβ–Ύβ–Ί
β—„diffusion_early_pct0.30β–Ί
β—„enable_fp8_attentiontrueβ–Ί
β—„force_precisionβ–Ύβ–Ί

Conduit Gate is the precision-routing node of the Conduit pack: it decides whether your diffusion runs in FP32, FP16, BF16, or FP8, per operation type, and hands that decision downstream as a CONDUIT_GATE config object. If you've ever fiddled with half-precision flags or wondered what "FP8 TensorCores" actually buys you, this is the node that formalizes the whole thing into a dropdown.

How it works

Gate checks your GPU's compute capability and builds a routing table from your chosen mode. The hardware detection is real and worth knowing: FP8 requires compute capability 8.9+ (RTX 40-series and newer), and BF16 needs 8.0+ (Ampere and up). On anything older, the node silently falls back to FP16 rather than crashing, which is the right behavior. The routing table assigns a precision to each op type - attention, linear, conv, norm - and it always keeps norm layers at FP32, which matches the community wisdom that norms are where half-precision quietly destroys quality. The diffusion_early_pct slider (default 0.3) controls the split between "early steps run at high precision" and "later steps run at reduced precision," on the theory that early diffusion needs more headroom.

Modes run from paranoid to reckless:

  • quality - everything FP32. Slower, safest.
  • balanced - FP16 attention/linear, BF16 convs where available.
  • speed - FP8 attention on capable cards, FP16 elsewhere.
  • extreme - FP8 across the board, gated on your hardware.

There's also force_precision (none / fp32 / fp16 / fp8), which overrides the routing table entirely if you want one precision everywhere. The estimates it reports (estimated_speedup, estimated_memory_savings) are calculations from a hard-coded table, not measurements - take the "4x faster" FP8 figure as a best-case ceiling, not a promise. FP8 is genuinely close to lossless for many models, but the KB's own notes flag that FP8 on some upscalers adds tiling artifacts; it's not free.

Inputs and outputs

The three required inputs are mode, diffusion_early_pct, and enable_fp8_attention (whether FP8 is allowed to touch attention layers at all - flip it off if you're chasing quality). The optional conduit_plan lets Core's mode inform Gate's defaults. Output is a single precision_config of type CONDUIT_GATE.

Install

Standard pack install - ComfyUI Manager, search "comfyui-conduit-optimizer", install, restart. Or clone it manually:

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

No models, no extra deps beyond PyTorch 2.0+.

Common issues

Gate produces a config - it doesn't patch your model. If you wire Gate straight into your KSampler, nothing will connect (it's not a MODEL type), and even feeding it to ConduitApply only gets your precision choice logged, because Apply is currently a pass-through. The node that actually changes model precision is ConduitPrecisionPatcher. And if you're on a 30-series card, remember there's no FP8 hardware acceleration at all - the "speed" promises are moot and FP16 is your realistic target.

CategoryConduit/Optimization

Inputs (5)

NameTypeDefaultDescription
modeCOMBO5 options: auto, quality, balanced, speed, extreme
diffusion_early_pctFLOAT0.300–1β€”
enable_fp8_attentionBOOLEANtrueβ€”
conduit_planoptCONDUIT_PLANβ€”
force_precisionoptCOMBO4 options: none, fp32, fp16, fp8

Outputs (1)

NameTypeDescription
precision_configCONDUIT_GATEβ€”